trubo_ecto v0.1.1 Trubo.Ecto.Utils

Trubo Utils

Link to this section Summary

Functions

Returns queryable schema

Link to this section Functions

Link to this function schema_from_query(queryable)
schema_from_query(Ecto.Query.t()) :: Ecto.Query.t()

Returns queryable schema

Example

iex> schema_from_query(Product)
Product
iex> schema_from_query(#Ecto.Query<from t in subquery(from t in Product)>)
Product