@tishlang/pg 3.10.9 → 3.10.11
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/package.json +1 -1
- package/src/index.tish +7 -0
package/package.json
CHANGED
package/src/index.tish
CHANGED
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
// const stmt = prepare(client, 'SELECT id, message FROM fortune')
|
|
8
8
|
// const rows = queryPrepared(client, stmt, [])
|
|
9
9
|
//
|
|
10
|
+
// // prepare is idempotent per (client, sql) — re-preparing identical
|
|
11
|
+
// // SQL returns the same handle. Free one handle with unprepare(stmt);
|
|
12
|
+
// // close(client) deallocates everything prepared on that client.
|
|
13
|
+
// unprepare(stmt)
|
|
14
|
+
//
|
|
10
15
|
// // Many queries pipelined on one client (concurrent on the wire,
|
|
11
16
|
// // sequential on the server side):
|
|
12
17
|
// const results = queryAll(client, [
|
|
@@ -21,6 +26,7 @@ import {
|
|
|
21
26
|
per_worker_client as _perWorkerClient,
|
|
22
27
|
connect as _connect,
|
|
23
28
|
prepare as _prepare,
|
|
29
|
+
unprepare as _unprepare,
|
|
24
30
|
query_prepared as _queryPrepared,
|
|
25
31
|
query_all as _queryAll,
|
|
26
32
|
migrate as _migrate,
|
|
@@ -30,6 +36,7 @@ import {
|
|
|
30
36
|
export const perWorkerClient = _perWorkerClient
|
|
31
37
|
export const connect = _connect
|
|
32
38
|
export const prepare = _prepare
|
|
39
|
+
export const unprepare = _unprepare
|
|
33
40
|
export const queryPrepared = _queryPrepared
|
|
34
41
|
export const queryAll = _queryAll
|
|
35
42
|
export const migrate = _migrate
|