Engine-agnostic Ecto query builders for the nodes table.
The {table, schema} source is resolved from the active
MnemosyneEcto.Adapter carried in the state, so the same builders work for
both PostgreSQL and SQLite. Vector similarity search lives on the adapter
(MnemosyneEcto.Adapter.vector_search/4) because its expression differs
per engine.
Summary
Functions
Base query scoped to the current tenant.
Filters the query to only include nodes with the given IDs.
Filters the query to only include nodes of the given types.
Base query scoped to the current tenant and repo.
Returns the {table_name, schema} source tuple for the nodes table.
Functions
@spec base(map()) :: Ecto.Query.t()
Base query scoped to the current tenant.
@spec by_ids(Ecto.Query.t(), [String.t()]) :: Ecto.Query.t()
Filters the query to only include nodes with the given IDs.
@spec by_types(Ecto.Query.t(), [atom()]) :: Ecto.Query.t()
Filters the query to only include nodes of the given types.
@spec scoped(map()) :: Ecto.Query.t()
Base query scoped to the current tenant and repo.
Returns the {table_name, schema} source tuple for the nodes table.