joist-orm 2.4.0-next.51 → 2.4.0-next.53
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/build/drivers/PostgreJsDriver.cjs +216 -0
- package/build/drivers/PostgreJsDriver.cjs.map +1 -0
- package/build/drivers/PostgreJsDriver.d.cts +87 -0
- package/build/drivers/PostgreJsDriver.d.cts.map +1 -0
- package/build/drivers/PostgreJsDriver.d.mts +87 -0
- package/build/drivers/PostgreJsDriver.d.mts.map +1 -0
- package/build/drivers/PostgreJsDriver.js +212 -0
- package/build/drivers/PostgreJsDriver.js.map +1 -0
- package/build/drivers/PostgresDriver.cjs +165 -196
- package/build/drivers/PostgresDriver.cjs.map +1 -1
- package/build/drivers/PostgresDriver.d.cts +68 -43
- package/build/drivers/PostgresDriver.d.cts.map +1 -1
- package/build/drivers/PostgresDriver.d.mts +68 -43
- package/build/drivers/PostgresDriver.d.mts.map +1 -1
- package/build/drivers/PostgresDriver.js +164 -197
- package/build/drivers/PostgresDriver.js.map +1 -1
- package/build/drivers/WireRowData.cjs +26 -130
- package/build/drivers/WireRowData.cjs.map +1 -1
- package/build/drivers/WireRowData.d.cts +25 -31
- package/build/drivers/WireRowData.d.cts.map +1 -1
- package/build/drivers/WireRowData.d.mts +25 -31
- package/build/drivers/WireRowData.d.mts.map +1 -1
- package/build/drivers/WireRowData.js +27 -128
- package/build/drivers/WireRowData.js.map +1 -1
- package/build/drivers/binaryParsers.cjs +4 -9
- package/build/drivers/binaryParsers.cjs.map +1 -1
- package/build/drivers/binaryParsers.d.cts +3 -4
- package/build/drivers/binaryParsers.d.cts.map +1 -1
- package/build/drivers/binaryParsers.d.mts +3 -4
- package/build/drivers/binaryParsers.d.mts.map +1 -1
- package/build/drivers/binaryParsers.js +4 -9
- package/build/drivers/binaryParsers.js.map +1 -1
- package/build/drivers/postgresSql.cjs +145 -0
- package/build/drivers/postgresSql.cjs.map +1 -0
- package/build/drivers/postgresSql.d.cts +19 -0
- package/build/drivers/postgresSql.d.cts.map +1 -0
- package/build/drivers/postgresSql.d.mts +19 -0
- package/build/drivers/postgresSql.d.mts.map +1 -0
- package/build/drivers/postgresSql.js +143 -0
- package/build/drivers/postgresSql.js.map +1 -0
- package/build/pg-export.d.cts +1 -1
- package/build/pg-export.d.mts +1 -1
- package/build/postgrejs-export.cjs +3 -0
- package/build/postgrejs-export.d.cts +2 -0
- package/build/postgrejs-export.d.mts +2 -0
- package/build/postgrejs-export.js +1 -0
- package/package.json +36 -9
|
@@ -1,80 +1,105 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BinaryParse } from "./binaryParsers.cjs";
|
|
2
|
+
import { Driver, DriverQueryResult, EntityManager, IdAssigner, JoinRowTodo, ParsedFindQuery, PreloadPlugin, RowData, RuntimeConfig, Todo } from "joist-core";
|
|
2
3
|
import pg from "pg";
|
|
3
4
|
//#region src/drivers/PostgresDriver.d.ts
|
|
4
5
|
export interface PostgresDriverOpts {
|
|
5
6
|
idAssigner?: IdAssigner;
|
|
6
7
|
/** Sets a default `PreloadPlugin` for any `EntityManager` that uses this driver. */
|
|
7
8
|
preloadPlugin?: PreloadPlugin;
|
|
8
|
-
/**
|
|
9
|
+
/** Observes SQL before submission; node-pg does not expose a query event. */
|
|
9
10
|
onQuery?: (sql: string) => void;
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
-
* lazily on field access, instead of eagerly materializing POJO rows.
|
|
12
|
+
* Keeps entity find results as raw wire bytes and decodes cells on field access. Defaults to false.
|
|
13
13
|
*
|
|
14
|
-
* Applies to
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* measured faster, and `JoinRows` owns/mutates them), lazy columns, and id/count loaders.
|
|
14
|
+
* Applies to em.find, em.load and o2m/o2o/recursive relation loads.
|
|
15
|
+
* Other loaders deliberately stay classic: m2m join-table
|
|
16
|
+
* rows (narrow, fully read and mutated by JoinRows), lazy columns, and id/count loaders.
|
|
18
17
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* uses classic rows when the choice is knowable up-front (patching pg-protocol failed, or the
|
|
25
|
-
* client is unsupported, i.e. pg-native — both warn once). If a connection turns out
|
|
26
|
-
* mid-query to use an unpatched pg-protocol copy (a duplicate `pg` install), the query fails
|
|
27
|
-
* with a descriptive error — a misconfiguration CI builds/smoketests will catch immediately.
|
|
28
|
-
* Note deferred decoding also defers custom-parser errors from `await em.find` to first field
|
|
29
|
-
* access. See JS-ROW-STORE-DESIGN.md.
|
|
18
|
+
* Binary cells use Joist's parser registry; JOIST_LAZY_BINARY=0 requests text results instead.
|
|
19
|
+
* If patching pg-protocol fails or the client is unsupported (i.e. pg-native), we warn and
|
|
20
|
+
* use classic rows. An unpatched duplicate pg-protocol discovered mid-query fails loudly
|
|
21
|
+
* rather than silently degrading. Deferred parsing also defers custom-parser errors from
|
|
22
|
+
* await em.find to field access. See JS-ROW-STORE-DESIGN.md.
|
|
30
23
|
*/
|
|
31
24
|
lazyRows?: boolean;
|
|
32
25
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Implements the `Driver` interface for Postgres.
|
|
35
|
-
*
|
|
36
|
-
* This is the canonical driver implementation and leverages several aspects of
|
|
37
|
-
* Postgres for the best performance, i.e.:
|
|
38
|
-
*
|
|
39
|
-
* - Deferred foreign key constraints are used to allow bulk inserting/updating
|
|
40
|
-
* all entities without any topographic sorting/ordering issues.
|
|
41
|
-
*
|
|
42
|
-
* - Sequences are used to bulk-assign + then bulk-insert all entities, to again
|
|
43
|
-
* avoid issues with ordering issues (cannot bulk insert A w/o knowing the id of B).
|
|
44
|
-
*
|
|
45
|
-
* - We use a pg-specific bulk update syntax.
|
|
46
|
-
*
|
|
47
|
-
* Query pipelining is enabled for clients created after driver construction unless the pool was
|
|
48
|
-
* configured with `pipeline: false`.
|
|
49
|
-
*/
|
|
26
|
+
/** PostgreSQL over node-pg, with optional patched lazy row decoding. */
|
|
50
27
|
export declare class PostgresDriver implements Driver<pg.PoolClient> {
|
|
51
28
|
#private;
|
|
52
29
|
readonly pool: pg.Pool;
|
|
30
|
+
private readonly onQuery;
|
|
53
31
|
readonly lazyRows: boolean;
|
|
54
|
-
/**
|
|
32
|
+
/** Its presence is the lazy-read capability signal checked by EntityManager. */
|
|
55
33
|
readonly executeFindRowData: Driver["executeFindRowData"];
|
|
56
34
|
constructor(pool: pg.Pool, opts?: PostgresDriverOpts);
|
|
35
|
+
/** Uses the transaction's socket when a transaction is active. */
|
|
36
|
+
private query;
|
|
37
|
+
/** Executes an entity find with the EntityManager's default limit. */
|
|
57
38
|
executeFind(em: EntityManager, parsed: ParsedFindQuery, settings: {
|
|
58
39
|
limit?: number;
|
|
59
40
|
offset?: number;
|
|
60
41
|
}): Promise<any[]>;
|
|
61
|
-
/** Returns
|
|
62
|
-
executeQuery(em: EntityManager, sql: string, bindings: readonly
|
|
63
|
-
|
|
42
|
+
/** Returns native command counts and rows, including null counts for DDL. */
|
|
43
|
+
executeQuery(em: EntityManager, sql: string, bindings: readonly unknown[]): Promise<DriverQueryResult>;
|
|
44
|
+
/** Assigns identifiers with the configured strategy before dependent writes. */
|
|
64
45
|
assignNewIds(_: EntityManager, todos: Record<string, Todo>): Promise<void>;
|
|
46
|
+
/** Flushes PostgreSQL operations on the active node-pg transaction. */
|
|
65
47
|
flush(em: EntityManager, entityTodos: Record<string, Todo>, joinRows: Record<string, JoinRowTodo>): Promise<void>;
|
|
66
48
|
get defaultPlugins(): {
|
|
67
49
|
preloadPlugin: any;
|
|
68
50
|
};
|
|
69
|
-
|
|
51
|
+
/** Decodes immutable pg-protocol rows, falling back only for known unsupported clients. */
|
|
52
|
+
private findRowData;
|
|
53
|
+
/**
|
|
54
|
+
* Runs hooks and SQL on one checked-out native pg client.
|
|
55
|
+
*
|
|
56
|
+
* Nested calls reuse the active transaction rather than starting a second one.
|
|
57
|
+
*/
|
|
58
|
+
transaction<T>(em: EntityManager, fn: (txn: pg.PoolClient) => Promise<T>): Promise<T>;
|
|
70
59
|
}
|
|
71
60
|
/**
|
|
72
61
|
* Configures the `pg` driver with the best type parsers.
|
|
73
62
|
*
|
|
74
63
|
* In particular, pg's default `TIMESTAMPTZ` parser is very inefficient, and even just
|
|
75
|
-
* pulling in the latest `pg-types` and installing the fixed parser makes a
|
|
76
|
-
* difference.
|
|
64
|
+
* pulling in the latest `pg-types` and installing the fixed parser makes a noticeable difference.
|
|
77
65
|
*/
|
|
78
66
|
export declare function setupLatestPgTypes(temporal: RuntimeConfig["temporal"]): void;
|
|
67
|
+
/**
|
|
68
|
+
* Executes `sql` on an already-checked-out client, returning a {@link RowData} instead of
|
|
69
|
+
* materialized POJO rows.
|
|
70
|
+
*
|
|
71
|
+
* Uses a `pg` Query subclass that records each DataRow's raw payload bytes into the result
|
|
72
|
+
* (via the lazy DataRow message from `patchPgProtocol`) and never materializes per-cell
|
|
73
|
+
* strings or per-row objects. If the client's connection turns out to use an unpatched
|
|
74
|
+
* pg-protocol copy (i.e. the app's pool was built from a different `pg` install than the one
|
|
75
|
+
* joist-orm patched), the query fails with a descriptive error — a misconfiguration any CI
|
|
76
|
+
* build/smoketest will surface immediately, so we fail loudly rather than silently degrade.
|
|
77
|
+
* The rows already streamed are discarded; the connection itself stays usable.
|
|
78
|
+
*
|
|
79
|
+
* By default the query requests binary result format via the extended protocol.
|
|
80
|
+
* Pass `binary: false` for classic text-format results, or set `JOIST_LAZY_BINARY=0`
|
|
81
|
+
* for A/B benchmarking or as an escape hatch.
|
|
82
|
+
*/
|
|
83
|
+
export declare function executeRowDataQuery(client: pg.PoolClient, sql: string, bindings: readonly any[], opts?: {
|
|
84
|
+
binary?: boolean;
|
|
85
|
+
}): Promise<RowData>;
|
|
86
|
+
/**
|
|
87
|
+
* Resolves each column's decoder from the query's RowDescription.
|
|
88
|
+
*
|
|
89
|
+
* Binary-format fields decode through Joist's own binary registry only (see
|
|
90
|
+
* `setBinaryTypeParser`) — `pg.types`/`TypeOverrides` are never consulted, and a column whose
|
|
91
|
+
* oid has no registered binary parser fails the query here, before any rows arrive, rather
|
|
92
|
+
* than guessing at a lossy decoding. Text-format fields (the `binary: false` escape hatch)
|
|
93
|
+
* decode by utf8-slicing the cell into the active text parser, resolved via `getTypeParser`
|
|
94
|
+
* (i.e. the pool/client `TypeOverrides` chain) or the global registry.
|
|
95
|
+
*/
|
|
96
|
+
export declare function pgColumnDecoders(fields: Array<{
|
|
97
|
+
name: string;
|
|
98
|
+
dataTypeID: number;
|
|
99
|
+
format?: string;
|
|
100
|
+
}>, getTypeParser?: (dataTypeID: number) => (value: any) => any): {
|
|
101
|
+
name: string;
|
|
102
|
+
decode: BinaryParse;
|
|
103
|
+
}[];
|
|
79
104
|
//#endregion
|
|
80
105
|
//# sourceMappingURL=PostgresDriver.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostgresDriver.d.cts","names":[],"sources":["../../src/drivers/PostgresDriver.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PostgresDriver.d.cts","names":["_$__binaryParsers_ts0.BinaryParse"],"sources":["../../src/drivers/PostgresDriver.ts"],"mappings":";;;;iBAgCiB;EACf,aAAa;;EAEb,gBAAgB;;EAEhB,WAAW;;;;;;;;;;;;;;EAcX;;;qBAIW,0BAA0B,OAAO,GAAG;;WAUpC,MAAM,GAAG;mBANH;WACR;;WAEA,oBAAoB;EAE7B,YACW,MAAM,GAAG,MAClB,OAAO;;UAuBD;;EAMF,YACJ,IAAI,eACJ,QAAQ,iBACR;IAAY;IAAgB;MAC3B;;EAMG,aAAa,IAAI,eAAe,aAAa,+BAA+B,QAAQ;;EAMpF,aAAa,GAAG,eAAe,OAAO,eAAe,QAAQ;;EAK7D,MACJ,IAAI,eACJ,aAAa,eAAe,OAC5B,UAAU,eAAe,eACxB;MAMC;IACO;;;UAIG;;;;;;EAiCR,YAAY,GAAG,IAAI,eAAe,KAAK,KAAK,GAAG,eAAe,QAAQ,KAAK,QAAQ;;;;;;;;wBAmC3E,mBAAmB,UAAU;;;;;;;;;;;;;;;;;wBAmH7B,oBACd,QAAQ,GAAG,YACX,aACA,0BACA;EAAS;IACR,QAAQ;;;;;;;;;;;wBAuCK,iBACd,QAAQ;EAAQ;EAAc;EAAoB;IAClD,iBAAiB,wBAAwB;;UADjCA"}
|
|
@@ -1,80 +1,105 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BinaryParse } from "./binaryParsers.mjs";
|
|
2
|
+
import { Driver, DriverQueryResult, EntityManager, IdAssigner, JoinRowTodo, ParsedFindQuery, PreloadPlugin, RowData, RuntimeConfig, Todo } from "joist-core";
|
|
2
3
|
import pg from "pg";
|
|
3
4
|
//#region src/drivers/PostgresDriver.d.ts
|
|
4
5
|
export interface PostgresDriverOpts {
|
|
5
6
|
idAssigner?: IdAssigner;
|
|
6
7
|
/** Sets a default `PreloadPlugin` for any `EntityManager` that uses this driver. */
|
|
7
8
|
preloadPlugin?: PreloadPlugin;
|
|
8
|
-
/**
|
|
9
|
+
/** Observes SQL before submission; node-pg does not expose a query event. */
|
|
9
10
|
onQuery?: (sql: string) => void;
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
-
* lazily on field access, instead of eagerly materializing POJO rows.
|
|
12
|
+
* Keeps entity find results as raw wire bytes and decodes cells on field access. Defaults to false.
|
|
13
13
|
*
|
|
14
|
-
* Applies to
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* measured faster, and `JoinRows` owns/mutates them), lazy columns, and id/count loaders.
|
|
14
|
+
* Applies to em.find, em.load and o2m/o2o/recursive relation loads.
|
|
15
|
+
* Other loaders deliberately stay classic: m2m join-table
|
|
16
|
+
* rows (narrow, fully read and mutated by JoinRows), lazy columns, and id/count loaders.
|
|
18
17
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* uses classic rows when the choice is knowable up-front (patching pg-protocol failed, or the
|
|
25
|
-
* client is unsupported, i.e. pg-native — both warn once). If a connection turns out
|
|
26
|
-
* mid-query to use an unpatched pg-protocol copy (a duplicate `pg` install), the query fails
|
|
27
|
-
* with a descriptive error — a misconfiguration CI builds/smoketests will catch immediately.
|
|
28
|
-
* Note deferred decoding also defers custom-parser errors from `await em.find` to first field
|
|
29
|
-
* access. See JS-ROW-STORE-DESIGN.md.
|
|
18
|
+
* Binary cells use Joist's parser registry; JOIST_LAZY_BINARY=0 requests text results instead.
|
|
19
|
+
* If patching pg-protocol fails or the client is unsupported (i.e. pg-native), we warn and
|
|
20
|
+
* use classic rows. An unpatched duplicate pg-protocol discovered mid-query fails loudly
|
|
21
|
+
* rather than silently degrading. Deferred parsing also defers custom-parser errors from
|
|
22
|
+
* await em.find to field access. See JS-ROW-STORE-DESIGN.md.
|
|
30
23
|
*/
|
|
31
24
|
lazyRows?: boolean;
|
|
32
25
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Implements the `Driver` interface for Postgres.
|
|
35
|
-
*
|
|
36
|
-
* This is the canonical driver implementation and leverages several aspects of
|
|
37
|
-
* Postgres for the best performance, i.e.:
|
|
38
|
-
*
|
|
39
|
-
* - Deferred foreign key constraints are used to allow bulk inserting/updating
|
|
40
|
-
* all entities without any topographic sorting/ordering issues.
|
|
41
|
-
*
|
|
42
|
-
* - Sequences are used to bulk-assign + then bulk-insert all entities, to again
|
|
43
|
-
* avoid issues with ordering issues (cannot bulk insert A w/o knowing the id of B).
|
|
44
|
-
*
|
|
45
|
-
* - We use a pg-specific bulk update syntax.
|
|
46
|
-
*
|
|
47
|
-
* Query pipelining is enabled for clients created after driver construction unless the pool was
|
|
48
|
-
* configured with `pipeline: false`.
|
|
49
|
-
*/
|
|
26
|
+
/** PostgreSQL over node-pg, with optional patched lazy row decoding. */
|
|
50
27
|
export declare class PostgresDriver implements Driver<pg.PoolClient> {
|
|
51
28
|
#private;
|
|
52
29
|
readonly pool: pg.Pool;
|
|
30
|
+
private readonly onQuery;
|
|
53
31
|
readonly lazyRows: boolean;
|
|
54
|
-
/**
|
|
32
|
+
/** Its presence is the lazy-read capability signal checked by EntityManager. */
|
|
55
33
|
readonly executeFindRowData: Driver["executeFindRowData"];
|
|
56
34
|
constructor(pool: pg.Pool, opts?: PostgresDriverOpts);
|
|
35
|
+
/** Uses the transaction's socket when a transaction is active. */
|
|
36
|
+
private query;
|
|
37
|
+
/** Executes an entity find with the EntityManager's default limit. */
|
|
57
38
|
executeFind(em: EntityManager, parsed: ParsedFindQuery, settings: {
|
|
58
39
|
limit?: number;
|
|
59
40
|
offset?: number;
|
|
60
41
|
}): Promise<any[]>;
|
|
61
|
-
/** Returns
|
|
62
|
-
executeQuery(em: EntityManager, sql: string, bindings: readonly
|
|
63
|
-
|
|
42
|
+
/** Returns native command counts and rows, including null counts for DDL. */
|
|
43
|
+
executeQuery(em: EntityManager, sql: string, bindings: readonly unknown[]): Promise<DriverQueryResult>;
|
|
44
|
+
/** Assigns identifiers with the configured strategy before dependent writes. */
|
|
64
45
|
assignNewIds(_: EntityManager, todos: Record<string, Todo>): Promise<void>;
|
|
46
|
+
/** Flushes PostgreSQL operations on the active node-pg transaction. */
|
|
65
47
|
flush(em: EntityManager, entityTodos: Record<string, Todo>, joinRows: Record<string, JoinRowTodo>): Promise<void>;
|
|
66
48
|
get defaultPlugins(): {
|
|
67
49
|
preloadPlugin: any;
|
|
68
50
|
};
|
|
69
|
-
|
|
51
|
+
/** Decodes immutable pg-protocol rows, falling back only for known unsupported clients. */
|
|
52
|
+
private findRowData;
|
|
53
|
+
/**
|
|
54
|
+
* Runs hooks and SQL on one checked-out native pg client.
|
|
55
|
+
*
|
|
56
|
+
* Nested calls reuse the active transaction rather than starting a second one.
|
|
57
|
+
*/
|
|
58
|
+
transaction<T>(em: EntityManager, fn: (txn: pg.PoolClient) => Promise<T>): Promise<T>;
|
|
70
59
|
}
|
|
71
60
|
/**
|
|
72
61
|
* Configures the `pg` driver with the best type parsers.
|
|
73
62
|
*
|
|
74
63
|
* In particular, pg's default `TIMESTAMPTZ` parser is very inefficient, and even just
|
|
75
|
-
* pulling in the latest `pg-types` and installing the fixed parser makes a
|
|
76
|
-
* difference.
|
|
64
|
+
* pulling in the latest `pg-types` and installing the fixed parser makes a noticeable difference.
|
|
77
65
|
*/
|
|
78
66
|
export declare function setupLatestPgTypes(temporal: RuntimeConfig["temporal"]): void;
|
|
67
|
+
/**
|
|
68
|
+
* Executes `sql` on an already-checked-out client, returning a {@link RowData} instead of
|
|
69
|
+
* materialized POJO rows.
|
|
70
|
+
*
|
|
71
|
+
* Uses a `pg` Query subclass that records each DataRow's raw payload bytes into the result
|
|
72
|
+
* (via the lazy DataRow message from `patchPgProtocol`) and never materializes per-cell
|
|
73
|
+
* strings or per-row objects. If the client's connection turns out to use an unpatched
|
|
74
|
+
* pg-protocol copy (i.e. the app's pool was built from a different `pg` install than the one
|
|
75
|
+
* joist-orm patched), the query fails with a descriptive error — a misconfiguration any CI
|
|
76
|
+
* build/smoketest will surface immediately, so we fail loudly rather than silently degrade.
|
|
77
|
+
* The rows already streamed are discarded; the connection itself stays usable.
|
|
78
|
+
*
|
|
79
|
+
* By default the query requests binary result format via the extended protocol.
|
|
80
|
+
* Pass `binary: false` for classic text-format results, or set `JOIST_LAZY_BINARY=0`
|
|
81
|
+
* for A/B benchmarking or as an escape hatch.
|
|
82
|
+
*/
|
|
83
|
+
export declare function executeRowDataQuery(client: pg.PoolClient, sql: string, bindings: readonly any[], opts?: {
|
|
84
|
+
binary?: boolean;
|
|
85
|
+
}): Promise<RowData>;
|
|
86
|
+
/**
|
|
87
|
+
* Resolves each column's decoder from the query's RowDescription.
|
|
88
|
+
*
|
|
89
|
+
* Binary-format fields decode through Joist's own binary registry only (see
|
|
90
|
+
* `setBinaryTypeParser`) — `pg.types`/`TypeOverrides` are never consulted, and a column whose
|
|
91
|
+
* oid has no registered binary parser fails the query here, before any rows arrive, rather
|
|
92
|
+
* than guessing at a lossy decoding. Text-format fields (the `binary: false` escape hatch)
|
|
93
|
+
* decode by utf8-slicing the cell into the active text parser, resolved via `getTypeParser`
|
|
94
|
+
* (i.e. the pool/client `TypeOverrides` chain) or the global registry.
|
|
95
|
+
*/
|
|
96
|
+
export declare function pgColumnDecoders(fields: Array<{
|
|
97
|
+
name: string;
|
|
98
|
+
dataTypeID: number;
|
|
99
|
+
format?: string;
|
|
100
|
+
}>, getTypeParser?: (dataTypeID: number) => (value: any) => any): {
|
|
101
|
+
name: string;
|
|
102
|
+
decode: BinaryParse;
|
|
103
|
+
}[];
|
|
79
104
|
//#endregion
|
|
80
105
|
//# sourceMappingURL=PostgresDriver.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostgresDriver.d.mts","names":[],"sources":["../../src/drivers/PostgresDriver.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PostgresDriver.d.mts","names":["_$__binaryParsers_ts0.BinaryParse"],"sources":["../../src/drivers/PostgresDriver.ts"],"mappings":";;;;iBAgCiB;EACf,aAAa;;EAEb,gBAAgB;;EAEhB,WAAW;;;;;;;;;;;;;;EAcX;;;qBAIW,0BAA0B,OAAO,GAAG;;WAUpC,MAAM,GAAG;mBANH;WACR;;WAEA,oBAAoB;EAE7B,YACW,MAAM,GAAG,MAClB,OAAO;;UAuBD;;EAMF,YACJ,IAAI,eACJ,QAAQ,iBACR;IAAY;IAAgB;MAC3B;;EAMG,aAAa,IAAI,eAAe,aAAa,+BAA+B,QAAQ;;EAMpF,aAAa,GAAG,eAAe,OAAO,eAAe,QAAQ;;EAK7D,MACJ,IAAI,eACJ,aAAa,eAAe,OAC5B,UAAU,eAAe,eACxB;MAMC;IACO;;;UAIG;;;;;;EAiCR,YAAY,GAAG,IAAI,eAAe,KAAK,KAAK,GAAG,eAAe,QAAQ,KAAK,QAAQ;;;;;;;;wBAmC3E,mBAAmB,UAAU;;;;;;;;;;;;;;;;;wBAmH7B,oBACd,QAAQ,GAAG,YACX,aACA,0BACA;EAAS;IACR,QAAQ;;;;;;;;;;;wBAuCK,iBACd,QAAQ;EAAQ;EAAc;EAAoB;IAClD,iBAAiB,wBAAwB;;UADjCA"}
|