pub struct Query;Expand description
Query builder entry point. Start all queries with Q::.
§Examples
ⓘ
// Vector similarity search
Q::similar_to(&embedding, 10)
// Start from a graph node
Q::from_node("node-label")
// Filter table rows
Q::table("hosts").where_("status").equals("active")
// Full collection scan
Q::all_in("vulnerabilities")Implementations§
Source§impl Q
impl Q
Sourcepub fn similar_to(vector: &[f32], k: usize) -> VectorQueryBuilder
pub fn similar_to(vector: &[f32], k: usize) -> VectorQueryBuilder
Start a vector similarity query
Sourcepub fn from_node(label: impl Into<String>) -> GraphQueryBuilder
pub fn from_node(label: impl Into<String>) -> GraphQueryBuilder
Start a query from a specific graph node
Sourcepub fn from_id(id: EntityId) -> GraphQueryBuilder
pub fn from_id(id: EntityId) -> GraphQueryBuilder
Start a query from a specific entity by ID
Sourcepub fn table(name: impl Into<String>) -> TableQueryBuilder
pub fn table(name: impl Into<String>) -> TableQueryBuilder
Query a specific table/collection
Sourcepub fn collection(name: impl Into<String>) -> TableQueryBuilder
pub fn collection(name: impl Into<String>) -> TableQueryBuilder
Shorthand for collection query
Sourcepub fn all_in(collection: impl Into<String>) -> ScanQueryBuilder
pub fn all_in(collection: impl Into<String>) -> ScanQueryBuilder
Query all entities in a collection
Sourcepub fn refs_from(id: EntityId, ref_type: RefType) -> RefQueryBuilder
pub fn refs_from(id: EntityId, ref_type: RefType) -> RefQueryBuilder
Find entities by cross-reference
Sourcepub fn text_search(query: impl Into<String>) -> TextSearchBuilder
pub fn text_search(query: impl Into<String>) -> TextSearchBuilder
Text search across all indexed content
Sourcepub fn document(collection: impl Into<String>) -> TableQueryBuilder
pub fn document(collection: impl Into<String>) -> TableQueryBuilder
Query documents in a collection
Documents are stored as enriched table rows, so this is a convenience
alias that delegates to TableQueryBuilder. The flattened top-level
document fields support path-based filtering through the table query DSL.
§Example
ⓘ
let results = Q::document("articles")
.where_("title").equals("Hello World")
.limit(10)
.execute(&store)?;Sourcepub fn kv(collection: impl Into<String>) -> KvQueryBuilder
pub fn kv(collection: impl Into<String>) -> KvQueryBuilder
Key-Value operations on a collection
§Examples
ⓘ
// Get a value
let result = Q::kv("config").get("theme").execute(&store)?;
// Set a value (upsert)
let result = Q::kv("config").set("theme", Value::text("dark")).execute(&store)?;
// Delete a key
let result = Q::kv("config").delete("theme").execute(&store)?;
// List all KV pairs
let result = Q::kv("config").list().execute(&store)?;Sourcepub fn hybrid() -> HybridQueryBuilder
pub fn hybrid() -> HybridQueryBuilder
Hybrid query combining multiple modes
Sourcepub fn cross_modal() -> ThreeWayJoinBuilder
pub fn cross_modal() -> ThreeWayJoinBuilder
Three-way cross-modal JOIN
Efficiently chains queries across Vector → Graph → Table (or any order).
§Example
ⓘ
// Find CVEs similar to vector, traverse to affected hosts, get host records
let results = Q::cross_modal()
.start_vector(&cve_embedding, 10)
.traverse("AFFECTS", 2)
.join_table("hosts")
.execute(&store)?;Auto Trait Implementations§
impl Freeze for Q
impl RefUnwindSafe for Q
impl Send for Q
impl Sync for Q
impl Unpin for Q
impl UnsafeUnpin for Q
impl UnwindSafe for Q
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request