EctoQueryParser.Builder (EctoQueryParser v0.3.0)

Copy Markdown View Source

Converts parsed AST nodes into Ecto dynamic expressions.

Summary

Functions

Builds an Ecto dynamic expression from a parsed AST.

Functions

build(ast, opts \\ [])

Builds an Ecto dynamic expression from a parsed AST.

Options

  • :allowed_fields - list of atom field names that are permitted. If provided, any field not in the list will return an error.
  • :schema - the Ecto schema module, needed to resolve dotted identifiers (association paths like author.name).

Returns {:ok, dynamic, joins} or {:error, reason}.