@plurnk/plurnk-execs-sqlite 0.1.5 → 0.1.6
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/docs/sqlite.md +16 -0
- package/package.json +3 -2
package/docs/sqlite.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# sqlite
|
|
2
|
+
|
|
3
|
+
Runs one SQL statement in-process via `node:sqlite` and writes the result to the `results` channel as `application/json` — ready for a jsonpath body-matcher.
|
|
4
|
+
|
|
5
|
+
## Database target
|
|
6
|
+
|
|
7
|
+
`EXEC[sqlite](./app.db):…` runs against the file `./app.db` (created if absent) — a persistent, host-mutating database. With **no target** it runs against an ephemeral `:memory:` database that's gone when the statement finishes (pure, auto-run). A directory is never a valid target and falls back to `:memory:`.
|
|
8
|
+
|
|
9
|
+
## Query vs mutation
|
|
10
|
+
|
|
11
|
+
The result shape is decided by the statement's columns, never by parsing the SQL:
|
|
12
|
+
|
|
13
|
+
- **Row-returning** (SELECT, RETURNING, PRAGMA) → an array of row objects.
|
|
14
|
+
- **Mutation** (INSERT / UPDATE / DELETE / CREATE) → `{ changes, lastInsertRowid }`.
|
|
15
|
+
|
|
16
|
+
Large integers come back stringified (JSON can't hold a bigint). A SQL or open error closes `results` as `errored` with status 500 and a `sqlite_error` telemetry note.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-execs-sqlite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "SQLite runtime executor for plurnk-service's exec scheme — runs the sqlite runtime tag in-process via node:sqlite, results as application/json.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurnk",
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"files": [
|
|
48
48
|
"dist/**/*",
|
|
49
|
-
"README.md"
|
|
49
|
+
"README.md",
|
|
50
|
+
"docs/**/*"
|
|
50
51
|
],
|
|
51
52
|
"scripts": {
|
|
52
53
|
"test:lint": "tsc --noEmit",
|