Return the primary key of a schema
EctoQueryString v0.2.0 EctoQueryString.Reflection View Source
Provides some conveniences to work with Queries and Schemas
You can use this module to make sure the passed in fields are valid for the Query /Schema
Link to this section Summary
Functions
Return an associated schema
Get the :atom
representation of a field if it exists in the passed in Ecto.Schema
Return an the foreign key of a schema's association
Check if an Ecto.Schema
has the passed in association
Check if an Ecto.Schema
has the passed in field
Return the primary key of a schema
Return all the primary keys of a schema
Return all the fields of the passed in Ecto.Schema
Find the source of an Ecto.Query
Link to this section Functions
assoc_schema(schema, assoc_name)
View Sourceassoc_schema(Ecto.Schema, :binary) :: Ecto.Schema
Return an associated schema
field(schema, field_name)
View Sourcefield(Ecto.Schema, :binary) :: :atom | nil
Get the :atom
representation of a field if it exists in the passed in Ecto.Schema
foreign_key(schema, assoc)
View Sourceforeign_key(Ecto.Schema, :atom) :: :atom
Return an the foreign key of a schema's association
has_assoc?(schema, assoc_name)
View Sourcehas_assoc?(Ecto.Schema, :binary) :: :boolean
Check if an Ecto.Schema
has the passed in association
has_field?(schema, field_name)
View Sourcehas_field?(Ecto.Schema, :binary) :: :boolean
Check if an Ecto.Schema
has the passed in field
Return all the primary keys of a schema
Return all the fields of the passed in Ecto.Schema
The fields are returned as strings
Find the source of an Ecto.Query