@otwdesign/db-node 1.4.2 → 1.5.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.
Files changed (2) hide show
  1. package/README.md +17 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -15,5 +15,20 @@ await fastify.register(fastifyPlugin(dbAdmin)) // Fastify
15
15
  koa.use(koaMiddleware(dbAdmin)) // Koa
16
16
  ```
17
17
 
18
- `dbAdmin` comes from `createDbAdmin()` in `@otwdesign/db-core`. The whole guide:
19
- [github.com/OTWSRL/otw-db](https://github.com/OTWSRL/otw-db#readme).
18
+ `dbAdmin` comes from `createDbAdmin()` in `@otwdesign/db-core`.
19
+
20
+ ## Importing SQL
21
+
22
+ Import SQL, in the toolbar of a MySQL or MariaDB connection with `write` access, needs `mysql2`
23
+ installed and one server process: an import's connection is in that process's memory, so with
24
+ Node's cluster, or PM2 with more than one worker, a request that reaches another worker finds no
25
+ such import.
26
+
27
+ Nothing else is to set up. A batch of statements arrives as a raw body
28
+ (`application/octet-stream`, 4 MB at most), which `express.json()` and `koa-bodyparser` leave
29
+ unread, and its answer is streamed a line per statement, with
30
+ `Cache-Control: no-store, no-transform` so that a compressing middleware hands the lines on as
31
+ they come and nothing keeps them. Behind nginx or another proxy, see the
32
+ [guide](https://github.com/OTWSRL/otw-db#importing-sql).
33
+
34
+ The whole guide: [github.com/OTWSRL/otw-db](https://github.com/OTWSRL/otw-db#readme).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otwdesign/db-node",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
4
4
  "description": "OTW DB for Node servers: node:http, Express, Connect, Fastify and Koa; Hono, Bun and Deno take db-core's Fetch handler as it is.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "OTW SRL",
@@ -45,7 +45,7 @@
45
45
  "NOTICE"
46
46
  ],
47
47
  "dependencies": {
48
- "@otwdesign/db-core": "1.4.2"
48
+ "@otwdesign/db-core": "1.5.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/express": "^5.0.6",