Ecto v3.0.7 Ecto.Adapter.Queryable behaviour View Source
Specifies the query API required from adapters.
Link to this section Summary
Types
Proxy type to the adapter meta
Cache query metadata
Ecto.Query metadata fields (stored in cache)
Functions
Plans a query using the given adapter
Plans and prepares a query for the given repo, leveraging its query cache
Callbacks
Executes a previously prepared query
Commands invoked to prepare a query for all
, update_all
and delete_all
Streams a previously prepared query
Link to this section Types
Proxy type to the adapter meta
Cache query metadata
Ecto.Query metadata fields (stored in cache)
Link to this section Functions
Plans a query using the given adapter.
This does not expect the repository and therefore does not leverage the cache.
Plans and prepares a query for the given repo, leveraging its query cache.
This operation uses the query cache if one is available.
Link to this section Callbacks
execute( adapter_meta(), query_meta(), query_cache(), params :: list(), options() ) :: {integer(), [[term()]] | nil}
Executes a previously prepared query.
It must return a tuple containing the number of entries and
the result set as a list of lists. The result set may also be
nil
if a particular operation does not support them.
The adapter_meta
field is a map containing some of the fields found
in the Ecto.Query
struct.
prepare(atom :: :all | :update_all | :delete_all, query :: Ecto.Query.t()) :: {:cache, prepared()} | {:nocache, prepared()}
Commands invoked to prepare a query for all
, update_all
and delete_all
.
The returned result is given to execute/6
.
stream(adapter_meta(), query_meta(), query_cache(), params :: list(), options()) :: Enumerable.t()
Streams a previously prepared query.
It returns a stream of values.
The adapter_meta
field is a map containing some of the fields found
in the Ecto.Query
struct.