nodejs-store 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llms-full.txt CHANGED
@@ -482,3 +482,25 @@ and computed columns built in.
482
482
  | Migration / DDL engine | no (introspection read-only) | no | yes | yes | yes |
483
483
  | Static type generation | no (runtime JSON, cross-language parity) | no | yes | partial | yes |
484
484
  | Shared native core across Node and Python | yes (Rust `rust-store`) | no | no | no | no |
485
+
486
+ ---
487
+
488
+ ## 15. Scenario walkthroughs
489
+
490
+ Step-by-step use cases live in
491
+ [`doc/use-cases/`](https://github.com/coenddt/nodejs-store/tree/main/doc/use-cases):
492
+
493
+ 1. **Multi-tenant SaaS** — bind a schema to `(source, namespace, collection)` and re-target each
494
+ request with a trusted `{ source, namespace }` route override.
495
+ 2. **AI data-QA agent** — compile and validate a GQL plan with `buildPipeline()` before
496
+ executing it, and capture degraded / non-pushdownable paths with `setFeedbackSink()`.
497
+ 3. **MongoDB → PostgreSQL migration** — same schema, same GQL, only the `init()` datasource
498
+ changes; introspect the physical structure read-only with `syncSchema()`.
499
+ 4. **Admin CRUD backend** — schema-driven CRUD with computed columns, soft-delete archives,
500
+ role whitelists, the `creator` pseudo-role and `queryWithCount` pagination.
501
+ 5. **Avoiding N+1 reads** — one nested GQL read instead of a parent-then-children loop (a single
502
+ `$lookup` aggregation on MongoDB, a single `LEFT JOIN` statement on SQL), including when the
503
+ planner switches to a two-phase read.
504
+ 6. **Serverless and connection reuse** — hoist `init()` and schema registration, keep the driver
505
+ client warm across invocations, and isolate each request with `setContext` plus fail-secure
506
+ `setRequireContext(true)`.
package/llms.txt CHANGED
@@ -23,7 +23,7 @@
23
23
 
24
24
  - [README](https://github.com/coenddt/nodejs-store#readme): full overview, quick start, GQL syntax, API, schema reference, FAQ
25
25
  - [Chinese README](https://github.com/coenddt/nodejs-store/blob/main/README.zh-CN.md): 中文文档
26
- - [Use cases](https://github.com/coenddt/nodejs-store/tree/main/doc/use-cases): scenario walkthroughs (multi-tenant SaaS, AI data-QA, cross-database migration, admin CRUD)
26
+ - [Use cases](https://github.com/coenddt/nodejs-store/tree/main/doc/use-cases): scenario walkthroughs (multi-tenant SaaS, AI data-QA, cross-database migration, admin CRUD, avoiding N+1 reads, serverless connection reuse)
27
27
  - [Scenario test suite](https://github.com/coenddt/nodejs-store/tree/main/example/course-platform): real-data, four-backend scenario cases (fields, relations, computes, permissions, aggregation, boundaries)
28
28
  - [CHANGELOG](https://github.com/coenddt/nodejs-store/blob/main/CHANGELOG.md)
29
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodejs-store",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Multi-backend data layer for Node.js (MongoDB, MySQL, SQLite, PostgreSQL): pure JSON schemas, GQL tree queries compiled to a single native query, GROUP BY/HAVING aggregation, computed columns, soft-delete and role-based access control",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -41,6 +41,10 @@
41
41
  "group-by",
42
42
  "computed-columns",
43
43
  "soft-delete",
44
+ "ai-agent",
45
+ "llm-tool",
46
+ "query-validation",
47
+ "natural-language-query",
44
48
  "node"
45
49
  ],
46
50
  "author": "leo <coen_ddt@qq.com>",