nedb-engine 4.3.0 → 4.3.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/README.md CHANGED
@@ -31,6 +31,23 @@ One Rust core → ships to **PyPI** and **npm** from a single source.
31
31
 
32
32
  ---
33
33
 
34
+ ## What's next — [neSQL](https://github.com/Eth-Interchained/neSQL)
35
+
36
+ Nobody should have to learn a query language to use a database. NEDB's PostgreSQL
37
+ endpoint already answers `psql`, SQLAlchemy Core **and** ORM, asyncpg and
38
+ node-postgres against a live store — but it gets there by *translating* SQL into
39
+ NQL, and a translation can only reach as far as the target language's shape.
40
+
41
+ **[neSQL](https://github.com/Eth-Interchained/neSQL)** removes the translation:
42
+ PostgreSQL's real grammar, vendored with its licence intact, extended with NEDB's
43
+ temporal and causal clauses. Two front-ends, one plan. NQL folded in, not deleted.
44
+
45
+ [![neSQL on PyPI](https://img.shields.io/pypi/v/nesql?label=nesql%20·%20PyPI&color=a855f7)](https://pypi.org/project/nesql/)
46
+ [![neSQL on crates.io](https://img.shields.io/crates/v/nesql?label=nesql%20·%20crates.io&color=a855f7)](https://crates.io/crates/nesql)
47
+ [![neSQL on npm](https://img.shields.io/npm/v/nesql-engine?label=nesql-engine%20·%20npm&color=a855f7)](https://www.npmjs.com/package/nesql-engine)
48
+
49
+ ---
50
+
34
51
  ## New in 3.3.0 — the query language grew up
35
52
 
36
53
  `WHERE` was six operators wide (`= != > < >= <=`) joined by an implicit `AND`.
@@ -178,16 +195,51 @@ SELECT _id, _hash, _seq FROM audit ORDER BY _seq;
178
195
  ```
179
196
 
180
197
  **This is not "NEDB speaks SQL", and the endpoint is careful to say so.** It is
181
- a documented subset of `SELECT` translated to NQL:
198
+ a documented subset of `SELECT` **translated** to NQL — and that word is doing
199
+ all the work in this sentence. Every refusal below traces to the same cause:
200
+ NQL is the engine's native language, so SQL has to be rewritten into it, and a
201
+ rewrite can only ever reach as far as the target language's shape.
182
202
 
183
- | Supported | Refused, with the reason |
184
- | --- | --- |
185
- | `*`, a column list, `COUNT(*)`, `SUM`/`AVG`/`MIN`/`MAX(col)` | `JOIN` — NQL is single-collection |
186
- | `WHERE` — the whole NQL predicate surface | subqueries, `UNION`, window functions |
187
- | `GROUP BY`, `HAVING`, `ORDER BY`, `LIMIT`, `OFFSET` | expressions in the select list |
188
- | `AS OF SYSTEM TIME <seq>` | DDL, `TRUNCATE`, `GRANT`/`REVOKE` |
189
- | `INSERT` / `UPDATE` / `DELETE`, all with `RETURNING` | an `INSERT` with no column list |
190
- | `_caused_by` / `_valid_from` / `_valid_to` as INSERT columns | values that are expressions, not literals |
203
+ | Supported today | Refused, with the reason | neSQL |
204
+ | --- | --- | --- |
205
+ | `*`, a column list, `COUNT(*)`, `SUM`/`AVG`/`MIN`/`MAX(col)` | `JOIN` — NQL is single-collection | ✅ joins already exist in the executor |
206
+ | `WHERE` — the whole NQL predicate surface | subqueries, `UNION`, window functions | ✅ subqueries + set ops exist; windows arrive with the grammar |
207
+ | `GROUP BY`, `HAVING`, `ORDER BY`, `LIMIT`, `OFFSET` | expressions in the select list | ✅ |
208
+ | one named aggregate per grouped row | `sum(x), avg(x)` in one query — NQL's grouped row holds *one* | ✅ the row-model cap goes away |
209
+ | `AS OF SYSTEM TIME <seq>` | DDL, `TRUNCATE`, `GRANT`/`REVOKE` | ⛔️ still refused, and always will be |
210
+ | `INSERT` / `UPDATE` / `DELETE`, all with `RETURNING` | an `INSERT` with no column list | ✅ |
211
+ | `_caused_by` / `_valid_from` / `_valid_to` as INSERT columns | values that are expressions, not literals | ✅ |
212
+
213
+ The `⛔️` row is the one that is not a limitation. `TRUNCATE` is refused because
214
+ NEDB is append-only *so that history cannot be discarded* — that is the product,
215
+ not a gap — and DDL is refused because collections are created by the first write
216
+ to them. Those answers do not change.
217
+
218
+ ### Every other row on that table is a translation artefact, and it is going away
219
+
220
+ > ### 🆕 [**neSQL**](https://github.com/Eth-Interchained/neSQL) — PostgreSQL's grammar, NEDB's memory
221
+ >
222
+ > We stopped translating. neSQL vendors PostgreSQL's **real grammar** — `gram.y`,
223
+ > 19,513 lines and 492 keywords, from PostgreSQL 17.4, licence intact — and extends
224
+ > it with the clauses NEDB needs, rather than rewriting SQL into a language that
225
+ > cannot express it.
226
+ >
227
+ > It is worth knowing *why* this was never free: `SYSTEM_TIME`, `PERIOD` and
228
+ > `PORTION` appear **zero** times in PostgreSQL's grammar. Postgres has no temporal
229
+ > SQL at all. `AS OF SYSTEM TIME` is a CockroachDB extension, which means NEDB's
230
+ > temporal clauses are additions to the vendored grammar rather than deviations
231
+ > from it — the same road CockroachDB, Materialize and RisingWave took.
232
+ >
233
+ > ```bash
234
+ > pip install nesql · cargo add nesql · npm install nesql-engine
235
+ > ```
236
+ >
237
+ > Names reserved, grammar vendored, executor foundations already shipping inside
238
+ > this engine. Each package loads and answers `is_release() == false`, because a
239
+ > package that imports cleanly and then lies is worse than one that isn't published.
240
+ >
241
+ > **NQL is not being deleted.** It gets folded in: two front-ends compiling to one
242
+ > plan, so nothing translates and neither language is a second-class guest.
191
243
 
192
244
  Every refusal names the boundary instead of saying "syntax error", and a
193
245
  grouped query that projects a column SQL would reject gets Postgres's own
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nedb-engine",
3
- "version": "4.3.0",
3
+ "version": "4.3.2",
4
4
  "description": "NEDB \u2014 hash-chained, time-traveling, bi-temporal embedded database with Rust native core. SQL, Redis, MongoDB adapters. Causal Write Provenance. RESP2 wire protocol.",
5
5
  "main": "index.js",
6
6
  "exports": {