@plurnk/plurnk-execs-sqlite 1.20.0 → 1.21.0

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
@@ -14,13 +14,13 @@ A `@plurnk/plurnk-execs-*` sibling built on the [plurnk-execs](https://github.co
14
14
 
15
15
  The execution's target slot is the database file; with no target it defaults to an ephemeral in-memory db:
16
16
 
17
- ````sqlite
17
+ ```sqlite
18
18
  SELECT 1 AS value;
19
- ````
19
+ ```
20
20
 
21
- ````sqlite (./app.db)
21
+ ```sqlite (./app.db)
22
22
  SELECT name FROM sqlite_master WHERE type = 'table';
23
- ````
23
+ ```
24
24
 
25
25
  With no target, a fresh `:memory:` database exists for that operation only.
26
26
  State does not persist across EXECs. Pass a file path for persistence.
@@ -29,9 +29,9 @@ State does not persist across EXECs. Pass a file path for persistence.
29
29
 
30
30
  With no target, `:memory:` is a scratch calculator over ad-hoc tables — build one inline with `VALUES` and aggregate, no schema or file needed:
31
31
 
32
- ````sqlite
32
+ ```sqlite
33
33
  WITH t(item,qty,price) AS (VALUES ('a',3,2),('b',1,5)) SELECT sum(qty*price) AS total, sum(qty*price)*1.0/sum(qty) AS avg_price FROM t;
34
- ````
34
+ ```
35
35
 
36
36
  **Use floats to avoid integer truncation.** SQLite integer division truncates — `11/4` → `2`. Multiply by `1.0` (or `CAST(x AS REAL)`) to force real division: `11*1.0/4` → `2.75`. Any division over integer columns needs this, or the result is silently floored.
37
37
 
package/docs/sqlite.md CHANGED
@@ -11,9 +11,9 @@ than SQL. Use their SQL equivalents, such as querying `sqlite_master`.
11
11
  ## Database target
12
12
 
13
13
  `sqlite (./app.db)` with a SQL body runs against the file `./app.db` (created if absent),
14
- a persistent host-mutating database that requires proposal review. With no
14
+ a persistent host-mutating database: a host effect, admitted under the loop's policy. With no
15
15
  target, it runs against a fresh `:memory:` database that is gone when the
16
- operation finishes and bypasses proposal review. A directory is not a database.
16
+ operation finishes and is not a host effect. A directory is not a database.
17
17
  Use `[{"cwd": "./data"}]` on the heading to set the base for a relative database path;
18
18
  it does not change whether the operation uses a file or memory.
19
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-execs-sqlite",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
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",
@@ -76,6 +76,6 @@
76
76
  "prepublishOnly": "npm audit --audit-level=moderate && npm test"
77
77
  },
78
78
  "peerDependencies": {
79
- "@plurnk/plurnk-execs": "^1.20.0"
79
+ "@plurnk/plurnk-execs": "^1.21.0"
80
80
  }
81
81
  }