Hello, looking at Ecto.Repo.insert_all
documentation the typespec is:
@callback insert_all(
schema_or_source :: binary | {binary, module} | module,
entries :: [map | [{atom, term | Ecto.Query.t}]],
opts :: Keyword.t()
) :: {integer, nil | [term]}
Specifically the schema_or_source
can be a binary
, a module
or a {binary, module}
.
Now, looking at Ecto.Multi.insert_all
documentation, the typespec is:
@typep schema_or_source :: binary | {binary | nil, binary} | atom
@spec insert_all(t, name, schema_or_source, [map | Keyword.t], Keyword.t) :: t
So, why is schema_or_source
different from Ecto.Repo
and Ecto.Multi
insert_all?
Normally I use with Ecto.Repo
the format {"table_name", Table.Module}
, but it seems that this is not supported by the typespec when using Ecto.Multi
, what is the alternative then?
Thanks!