@noldova/context.data.sql.postgresql 0.0.6 → 0.0.7

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
@@ -59,6 +59,19 @@ Not supported yet: the `PG*` environment variables, the password file, the
59
59
  operating system's user name as the default user, several hosts and
60
60
  `target_session_attrs`, Unix-domain sockets, and direct SSL negotiation.
61
61
 
62
+ ## Cancel
63
+
64
+ A query the client has not sent yet fails at once with
65
+ `QueryCanceledException`, and no cancel goes to the server. For a query
66
+ already sent, a cancel opens its own connection and sends PostgreSQL's
67
+ cancel request once; a query sent behind another on the same connection
68
+ gets it when the query ahead ends. The server ignores a cancel that arrives
69
+ while its session is between statements, so a cancel sent as a queued query
70
+ starts can miss it and the query runs on. When the query neither ends nor fails within the
71
+ connection string's `cancel_timeout` seconds, 5 by default, the client
72
+ closes the connection and its queries fail with `ConnectionClosedException`;
73
+ `cancel_timeout=0` waits without a limit.
74
+
62
75
  ## Source
63
76
 
64
77
  The client is a port of postgres.js (https://github.com/porsager/postgres)
@@ -7,7 +7,6 @@
7
7
  */
8
8
  // This file uses Node APIs and will change when we replace Node.
9
9
  import { performance } from "node:perf_hooks";
10
- import { nextTick } from "node:process";
11
10
  import { clearTimeout, setTimeout } from "node:timers";
12
11
  import "@noldova/context.core";
13
12
  export class ClientTimers {
@@ -38,7 +37,7 @@ export class ClientTimers {
38
37
  return performance.now();
39
38
  }
40
39
  nextTick(callback) {
41
- nextTick(callback);
40
+ process.nextTick(callback);
42
41
  }
43
42
  }
44
43
  //# sourceMappingURL=client-timers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-timers.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql.postgresql/src/models/client/client-timers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,iEAAiE;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAA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AC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noldova/context.data.sql.postgresql",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "main": "api/index.js",
6
6
  "types": "api/index.d.ts",
@@ -19,10 +19,10 @@
19
19
  "registry": "https://registry.npmjs.org/"
20
20
  },
21
21
  "dependencies": {
22
- "@noldova/context.core": "0.0.6",
23
- "@noldova/context.data": "0.0.6",
24
- "@noldova/context.data.sql": "0.0.6",
25
- "@noldova/context.exceptions": "0.0.6"
22
+ "@noldova/context.core": "0.0.7",
23
+ "@noldova/context.data": "0.0.7",
24
+ "@noldova/context.data.sql": "0.0.7",
25
+ "@noldova/context.exceptions": "0.0.7"
26
26
  },
27
- "gitHead": "0e8be758fd88f6459b33586ab25af3b430d51ba5"
27
+ "gitHead": "e9d41328166262bf33aa8c896abc82092ebdfffc"
28
28
  }