読者です 読者をやめる 読者になる 読者になる

DRYな備忘録

Don't Repeat Yourself.

【Elixir】Module内のfunctionのリストを取得する

elixir

stackoverflow.com

Ecto.Repo.__info__(:functions)
[__adapter__: 0, __pool__: 0, __query_cache__: 0, __repo__: 0, all: 1, all: 2,
 config: 0, delete: 1, delete: 2, delete!: 1, delete!: 2, delete_all: 1,
 delete_all: 2, get: 2, get: 3, get!: 2, get!: 3, get_by: 2, get_by: 3,
 get_by!: 2, get_by!: 3, insert: 1, insert: 2, insert!: 1, insert!: 2,
 insert_or_update: 1, insert_or_update: 2, insert_or_update!: 1,
 insert_or_update!: 2, log: 1, one: 1, one: 2, one!: 1, one!: 2, preload: 2,
 rollback: 1, start_link: 0, start_link: 1, stop: 1, stop: 2, transaction: 1,
 transaction: 2, update: 1, update: 2, update!: 1, update!: 2, update_all: 2,
 update_all: 3]

このEctoはちょっと古いようだ