Expand description
§adapto_store
An embedded, document-oriented database — SQLite for JSON documents.
use adapto_store::{AdaptoStore, Query};
use serde_json::json;
let store = AdaptoStore::open(None).unwrap(); // in-memory
let users = store.collection("users");
let id = users.insert(json!({"name": "Alice", "age": 30})).unwrap();
let doc = users.find_by_id(&id).unwrap().unwrap();
assert_eq!(doc.get_str("name"), Some("Alice"));Re-exports§
pub use cursor::Cursor;pub use document::Document;pub use engine::StoreStats;pub use error::StoreError;pub use index::IndexInfo;pub use index::IndexKey;pub use query::Filter;pub use query::Query;pub use query::SortDir;pub use query::Update;pub use query::UpdateResult;pub use slug::slugify;pub use slug::is_valid_slug;pub use tenant::TenantCollection;pub use tenant::TenantScope;
Modules§
Structs§
- Adapto
Store - The main entry point. Open a store, get collections, query documents.
- Collection
- A handle to a named collection within the store.
- Disk
Collection - A handle to a disk-backed collection. Data lives on disk; only indexes are kept in memory. Ideal for large datasets (100K+ documents).