Module lock_query

Module lock_query 

Source
Expand description

Full SQL-like query support for locked data structures.

This module provides a complete Query API for collections of locked values, enabling WHERE, SELECT, ORDER BY, GROUP BY, aggregations, and JOIN operations without copying data unnecessarily.

§Example

use rust_queries_core::{LockQuery};
use std::sync::{Arc, RwLock};
use std::collections::HashMap;

let products: HashMap<String, Arc<RwLock<Product>>> = /* ... */;

// Full SQL-like syntax on locked data!
let expensive = LockQuery::new(&products)
    .where_(Product::category_r(), |cat| cat == "Electronics")
    .where_(Product::price_r(), |&p| p > 500.0)
    .order_by_float(Product::rating_r())
    .limit(10);

Structs§

LockQuery
A query builder for locked data structures.

Traits§

LockLazyQueryable
Extension trait for creating lazy lock queries.
LockQueryable
Helper to create LockQuery from HashMap.