Expand description
§Aurora Query System
This module provides a powerful, fluent query interface for filtering, sorting, and retrieving documents from Aurora collections.
§Architectural Note: “The Query as a Stream”
Unlike traditional databases that parse SQL strings into an execution plan, Aurora’s query engine is built around the Fluent Builder Pattern and Iterators.
- Type-Safe Construction: Queries are built using Rust method chaining, ensuring validity at compile time (or runtime construction without parsing overhead).
- Zero-Allocation Filtering: The
Queryabletrait andDocumentFiltertype allow us to stack closures. These filters run directly on the data stream without intermediate allocations. - Reactive Core: The
watch()method transforms a static query into a live stream ofQueryUpdateevents. This is the heart of the “Embedded Platform” concept—allowing the application to react to data changes instantly.
§Examples
// Get all active users over 21 let users = db.query(“users”) .filter(|f| f.eq(“status”, “active”) && f.gt(“age”, 21)) .order_by(“last_login”, false) .limit(20) .collect() .await?;
Structs§
- Filter
Builder - Builder for constructing document filter expressions.
- Query
Builder - Builder for creating and executing document queries.
- Search
Builder - Builder for performing full-text search operations
- Simple
Query Builder
Enums§
Traits§
- Queryable
- Trait for objects that can filter documents.