Ferricstore.Flow.Query.Request (ferricstore v0.10.0)

Copy Markdown View Source

Canonical, versioned Flow query request.

FQL and structured request formats normalize into this shape before authorization, planning, or execution. Values stay typed and separate from field identifiers throughout the pipeline.

Summary

Types

literal_type()

@type literal_type() :: :keyword | :integer | :float | :boolean | :null | :missing

predicate()

@type predicate() ::
  {:eq, Ferricstore.Flow.Query.Field.t(), value()}
  | {:in, Ferricstore.Flow.Query.Field.t(), [value()]}
  | {:range, Ferricstore.Flow.Query.Field.t(), value(), value()}
  | {:time_window, Ferricstore.Flow.Query.Field.t(), value(), value()}
  | {:is, Ferricstore.Flow.Query.Field.t(), :null | :missing}

t()

@type t() :: %Ferricstore.Flow.Query.Request{
  cursor: nil | value(),
  limit: pos_integer() | nil,
  mode: :execute | :explain | :analyze,
  order_by: [{Ferricstore.Flow.Query.Field.t(), :asc | :desc}],
  predicate: {:and, [predicate()]},
  return: :record | :count,
  source: :runs | :events,
  version: 1
}

value()

@type value() ::
  {:literal, literal_type(), term()}
  | {:parameter, literal_type() | :dynamic, binary()}