C++ Business Scenarios
The shared query contract and data operations concepts explain the common vocabulary. C++ syntax, ownership and verification remain scoped to the generated guides and C++ evidence below.
Begin with the SQLite console, then change one business
operation at a time. The generated cpp_lib_core/assist/ directory provides
native workflows for the evaluated tenant/document/entry model. Use those
files to discover methods; do not search the generated implementation.
| Reader task | Start with | What to verify |
|---|---|---|
| Load one tenant or a bounded list | assist/tenant/query.md | Bind Q to the executing UserContext; supply non-empty comment and purpose; inspect the typed result before Context close. |
| Change a tenant's name | assist/tenant/write.md, then assist/tenant/fields/name.md | Load complete scalar state, use the emitted mutation API and attach a non-empty audit reason. |
| Read selected fields | assist/tenant/expression.md | Distinguish a loaded value, explicit NULL and NotLoaded; getters do not run SQL. |
| Load documents or entries | The entity's Query guide and the selected relationship's field guide | Select relationships explicitly and use bounded child queries; keep composed requests in compatible Contexts. |
| Page a business list | assist/tenant/list_page.md | Stable ordering, bounded page size and the emitted page/result carrier. |
| Consume scalar rows incrementally | assist/tenant/stream.md | Complete or close the stream before its Context closes; scalar streaming does not enhance relationships or aggregates. |
| Add grouped statistics or facets | cpp_lib_core/ASSIST.md and relevant field guides | Discover the model-specific projection and aggregate names; compare full filtered totals with the actual rows. |
The Data Operations page explains the starter's read and audited-update helpers. The retained graph example adds twelve graph scenarios with assertions on callbacks, audit and database rows. Its test suite is separate from the public starter smoke test.
Keep the execution boundary visible
Use user_context for generated execution. Tenant, actor, provider and
authorization policy come from trusted application assembly. A client filter
or a decoded entity does not supply those permissions. Read authoritative
state before updating an existing object.
For several writes that must commit together, follow the generated Write and runtime customization guides for transaction-owned operations. Ordinary Q execution through the surrounding UserContext does not automatically join an outer transaction. An audit-delivery error after commit means the database write committed; handle delivery recovery separately from write retry.
These are C++/SQLite workflows. The existing seven-language Order isolation, pagination and lifecycle receipts do not qualify a C++ Order implementation. Record new evidence for the actual model and operation you ship.