View Source Electric.Replication.Eval.Parser (electric v0.9.5)

Summary

Types

@type refs_map() :: %{
  optional([String.t(), ...]) => Electric.Replication.Eval.Env.pg_type()
}
@type tree_part() ::
  %Electric.Replication.Eval.Parser.Const{
    location: term(),
    type: term(),
    value: term()
  }
  | %Electric.Replication.Eval.Parser.Ref{
      location: term(),
      path: term(),
      type: term()
    }
  | %Electric.Replication.Eval.Parser.Func{
      args: term(),
      immutable?: term(),
      implementation: term(),
      location: term(),
      map_over_array_in_pos: term(),
      name: term(),
      strict?: term(),
      type: term(),
      variadic_arg: term()
    }

Functions

Link to this function

find_refs(tree, acc \\ %{})

View Source
Link to this function

parse_and_validate_expression(query, refs \\ %{}, env \\ Env.new())

View Source
@spec parse_and_validate_expression(
  String.t(),
  refs_map(),
  Electric.Replication.Eval.Env.t()
) ::
  {:ok, Electric.Replication.Eval.Expr.t()} | {:error, String.t()}
Link to this function

parse_and_validate_expression!(query, refs \\ %{}, env \\ Env.new())

View Source
@spec parse_and_validate_expression!(
  String.t(),
  refs_map(),
  Electric.Replication.Eval.Env.t()
) ::
  Electric.Replication.Eval.Expr.t()
Link to this function

unwrap_node_string(node)

View Source