AshAge.Query (AshAge v1.0.1)

Copy Markdown View Source

Query structure for AGE graph queries.

Summary

Functions

Adds a parameter to the query, returning the updated query and a $paramN reference.

Converts a query to Cypher with parameters.

Types

t()

@type t() :: %AshAge.Query{
  expression: Ash.Filter.t() | nil,
  filters: [String.t()],
  graph: atom() | String.t(),
  label: atom() | String.t(),
  limit: non_neg_integer() | nil,
  offset: non_neg_integer() | nil,
  params: map(),
  repo: module(),
  resource: module(),
  sort: [{atom(), :asc | :desc}],
  tenant: term() | nil
}

Functions

add_param(query, value)

@spec add_param(t(), term()) :: {t(), String.t()}

Adds a parameter to the query, returning the updated query and a $paramN reference.

to_cypher(query)

@spec to_cypher(t()) :: {String.t(), map()}

Converts a query to Cypher with parameters.

Returns {cypher_string, params_map}.