View Source Dx.Ecto.Query (dx v0.3.0)

Functions to dynamically generate Ecto query parts.

Link to this section Summary

Functions

Applies all known options to the given queryable and returns it, along with all options that were unknown.

Apply all options to the given queryable, raise on any unknown option.

Returns generated SQL for given query with all params replaced

Add predicate-based filters to a queryable and return it.

Link to this section Functions

Link to this function

apply_condition(queryable, condition, eval)

View Source

Returns a 2-tuple with

  1. the modified queryable with the given conditions applied as WHERE clauses
  2. any remaining conditions that couldn't be added to the query

Returns {query, true} if all conditions could be added to the query.

Link to this function

apply_options(queryable, opts)

View Source

Applies all known options to the given queryable and returns it, along with all options that were unknown.

Link to this function

from_options(queryable, opts)

View Source

Apply all options to the given queryable, raise on any unknown option.

Link to this macro

is_simple(val)

View Source (macro)
Link to this function

order_by(queryable, field)

View Source

Returns generated SQL for given query with all params replaced

Link to this function

where(queryable, condition, opts \\ [])

View Source

Add predicate-based filters to a queryable and return it.