Represents a nGQL query to be executed against NebulaGraph.
You typically do not build %Query{} structs directly — use
NebulaGraphEx.Graph.query/4 instead. The struct is part of the public API
so that callers can introspect prepared queries or pass them to
DBConnection.execute/4 directly when using the connection without the pool.
Fields
:statement— nGQL string to execute:params— map of binary keys to parameter values (forexecuteWithParameter):opts— per-query option overrides (seeNebulaGraphEx.Options)
Summary
Functions
Builds a %Query{} struct.
Types
Functions
Builds a %Query{} struct.
Examples
iex> NebulaGraphEx.Query.new("RETURN 1")
%NebulaGraphEx.Query{statement: "RETURN 1", params: %{}, opts: []}
iex> NebulaGraphEx.Query.new(
...> "MATCH (v:Player{name: $name}) RETURN v",
...> %{"name" => "Tim Duncan"}
...> )
%NebulaGraphEx.Query{
statement: "MATCH (v:Player{name: $name}) RETURN v",
params: %{"name" => "Tim Duncan"},
opts: []
}