Use cases
Scenario walkthroughs for rust-store.
Each document starts from a concrete problem, explains why the engine fits, then walks through a small example built only from documented APIs. Read them alongside the main README.
| # | Scenario | In one line |
|---|---|---|
| 01 | Embed the core in a Rust service | Use rust-store-core as a path dependency: register schemas, plan a query, translate it to SQL, and hand the command to your own driver. |
| 02 | Natural language → query compiler | Turn model output into a reviewable plan: compile GQL to a plan before anything touches a database, and classify rejections by stable error prefixes. |
| 03 | One dialect across four databases | Write GQL once, plan to MongoDB command JSON, then translate the same command to parameterized MySQL / PostgreSQL / SQLite. |
| 04 | Node.js / Python parity | One Rust core, two bindings: camelCase vs snake_case is the only difference, and parity suites plus golden fixtures keep it that way. |
| 05 | Reuse the permission model | Embed the core and keep ownership and role checks in the schema: the context shape, the creator pseudo-role, owner-condition injection, and the routeOverride caveat. |
| 06 | SQL pushdown limits by dialect | What MongoDB, MySQL, PostgreSQL and SQLite each push down natively, what degrades to degraded events, and what the engine refuses outright. |
See also
- README — architecture, API reference, GQL capabilities, dialects, permission model, parity testing, gotchas.
- rust-store skill — condensed repo guide for agents.