nodejs-store 2.0.1 → 2.0.3
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/README.md +2 -0
- package/llms-full.txt +22 -0
- package/llms.txt +2 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
> Also looking for the Python version? See [`py-store`](https://github.com/coenddt/py-store) (pip `storepy`). Both are thin hosts over the shared Rust engine [`rust-store`](https://github.com/coenddt/rust-store).
|
|
14
14
|
> 中文文档见 [README.zh-CN.md](README.zh-CN.md)。
|
|
15
15
|
|
|
16
|
+
**Documentation site:** <https://coenddt.github.io/nodejs-store/> — every scenario walkthrough with runnable code and the engine's exact limits, one indexable page per scenario.
|
|
17
|
+
|
|
16
18
|
---
|
|
17
19
|
|
|
18
20
|
## Table of contents
|
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
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
|
|
22
22
|
## Docs
|
|
23
23
|
|
|
24
|
+
- [Documentation site](https://coenddt.github.io/nodejs-store/): the scenario walkthroughs as individual, indexable pages — the fastest way in
|
|
24
25
|
- [README](https://github.com/coenddt/nodejs-store#readme): full overview, quick start, GQL syntax, API, schema reference, FAQ
|
|
25
26
|
- [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)
|
|
27
|
+
- [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
28
|
- [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
29
|
- [CHANGELOG](https://github.com/coenddt/nodejs-store/blob/main/CHANGELOG.md)
|
|
29
30
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodejs-store",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
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
|
+
"homepage": "https://coenddt.github.io/nodejs-store/",
|
|
6
7
|
"files": [
|
|
7
8
|
"src",
|
|
8
9
|
"README.md",
|
|
@@ -41,6 +42,10 @@
|
|
|
41
42
|
"group-by",
|
|
42
43
|
"computed-columns",
|
|
43
44
|
"soft-delete",
|
|
45
|
+
"ai-agent",
|
|
46
|
+
"llm-tool",
|
|
47
|
+
"query-validation",
|
|
48
|
+
"natural-language-query",
|
|
44
49
|
"node"
|
|
45
50
|
],
|
|
46
51
|
"author": "leo <coen_ddt@qq.com>",
|