@noldova/context.data.sql.postgresql 0.0.12 → 0.0.13

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 (127) hide show
  1. package/README.md +38 -2
  2. package/api/index.d.ts +91 -1
  3. package/exceptions/batch-skipped.exception.js +2 -2
  4. package/exceptions/batch-skipped.exception.js.map +1 -1
  5. package/exceptions/batch.exception.js +2 -2
  6. package/exceptions/batch.exception.js.map +1 -1
  7. package/exceptions/callbacks-failed.exception.js +17 -0
  8. package/exceptions/callbacks-failed.exception.js.map +1 -0
  9. package/exceptions/cancel-unanswered.exception.js +2 -2
  10. package/exceptions/cancel-unanswered.exception.js.map +1 -1
  11. package/exceptions/connection-closed.exception.js +2 -2
  12. package/exceptions/connection-closed.exception.js.map +1 -1
  13. package/exceptions/connection-ended.exception.js +2 -2
  14. package/exceptions/connection-ended.exception.js.map +1 -1
  15. package/exceptions/malformed-message.exception.js +2 -2
  16. package/exceptions/malformed-message.exception.js.map +1 -1
  17. package/exceptions/postgresql-client.exception.js +14 -0
  18. package/exceptions/postgresql-client.exception.js.map +1 -0
  19. package/exceptions/postgresql.exception.js +2 -2
  20. package/exceptions/postgresql.exception.js.map +1 -1
  21. package/exceptions/query-canceled.exception.js +2 -2
  22. package/exceptions/query-canceled.exception.js.map +1 -1
  23. package/exceptions/query-timeout.exception.js +2 -2
  24. package/exceptions/query-timeout.exception.js.map +1 -1
  25. package/exceptions/queue-timeout.exception.js +2 -2
  26. package/exceptions/queue-timeout.exception.js.map +1 -1
  27. package/exceptions/stray-cancel.exception.js +2 -2
  28. package/exceptions/stray-cancel.exception.js.map +1 -1
  29. package/exceptions/transaction-rolled-back.exception.js +2 -2
  30. package/exceptions/transaction-rolled-back.exception.js.map +1 -1
  31. package/exceptions/type-not-found.exception.js +2 -2
  32. package/exceptions/type-not-found.exception.js.map +1 -1
  33. package/exceptions/unsafe-transaction.exception.js +2 -2
  34. package/exceptions/unsafe-transaction.exception.js.map +1 -1
  35. package/models/{row-column.js → array-element.js} +5 -5
  36. package/models/array-element.js.map +1 -0
  37. package/models/channel-listener.js +3 -0
  38. package/models/channel-listener.js.map +1 -1
  39. package/models/client/client-listener.js +67 -22
  40. package/models/client/client-listener.js.map +1 -1
  41. package/models/client/client-query.js.map +1 -1
  42. package/models/client/connection-socket.js.map +1 -1
  43. package/models/client/copy-both-stream.js +2 -2
  44. package/models/client/copy-both-stream.js.map +1 -1
  45. package/models/client/copy-in-stream.js +2 -2
  46. package/models/client/copy-in-stream.js.map +1 -1
  47. package/models/client/copy-out-stream.js +2 -2
  48. package/models/client/copy-out-stream.js.map +1 -1
  49. package/models/client/deferred.js +1 -1
  50. package/models/client/deferred.js.map +1 -1
  51. package/models/client/listen-subscription.js +3 -0
  52. package/models/client/listen-subscription.js.map +1 -1
  53. package/models/client/pool-lease.js +11 -15
  54. package/models/client/pool-lease.js.map +1 -1
  55. package/models/client/pool-queue.js +42 -4
  56. package/models/client/pool-queue.js.map +1 -1
  57. package/models/client/postgresql-client.js +2 -2
  58. package/models/client/postgresql-client.js.map +1 -1
  59. package/models/client/postgresql-connection.js +70 -77
  60. package/models/client/postgresql-connection.js.map +1 -1
  61. package/models/client/postgresql-pool.js +133 -39
  62. package/models/client/postgresql-pool.js.map +1 -1
  63. package/models/client/query.js +4 -4
  64. package/models/client/query.js.map +1 -1
  65. package/models/client/reserved-client.js.map +1 -1
  66. package/models/client/transaction-scope.js +2 -2
  67. package/models/client/transaction-scope.js.map +1 -1
  68. package/models/described-result.js +20 -0
  69. package/models/described-result.js.map +1 -0
  70. package/models/host-target.js +16 -0
  71. package/models/host-target.js.map +1 -0
  72. package/models/parser-variant.js +16 -0
  73. package/models/parser-variant.js.map +1 -0
  74. package/models/postgresql-session.js +6 -8
  75. package/models/postgresql-session.js.map +1 -1
  76. package/models/postgresql-socket.js +17 -20
  77. package/models/postgresql-socket.js.map +1 -1
  78. package/models/result.js +1 -1
  79. package/models/result.js.map +1 -1
  80. package/models/started-session.js +1 -1
  81. package/models/started-session.js.map +1 -1
  82. package/models/type-registry.js +19 -26
  83. package/models/type-registry.js.map +1 -1
  84. package/package.json +6 -6
  85. package/resources.js +3 -0
  86. package/resources.js.map +1 -1
  87. package/services/authenticator.js +7 -1
  88. package/services/authenticator.js.map +1 -1
  89. package/services/client/connection-lease.js.map +1 -1
  90. package/services/client/file-query-handler.js.map +1 -1
  91. package/services/client/row.reader.js +13 -20
  92. package/services/client/row.reader.js.map +1 -1
  93. package/services/client/type-loader-events.js.map +1 -1
  94. package/services/client-options.parser.js +12 -11
  95. package/services/client-options.parser.js.map +1 -1
  96. package/services/parameter-rewriter.js +22 -17
  97. package/services/parameter-rewriter.js.map +1 -1
  98. package/services/protocol/backend.js +0 -19
  99. package/services/protocol/backend.js.map +1 -1
  100. package/services/protocol/frame.reader.js +21 -37
  101. package/services/protocol/frame.reader.js.map +1 -1
  102. package/services/protocol/frontend.js +2 -2
  103. package/services/protocol/frontend.js.map +1 -1
  104. package/services/session-starter.js +15 -8
  105. package/services/session-starter.js.map +1 -1
  106. package/services/tls-options.reader.js +6 -6
  107. package/services/tls-options.reader.js.map +1 -1
  108. package/services/types/array-serializer.js +9 -3
  109. package/services/types/array-serializer.js.map +1 -1
  110. package/services/types/array.parser.js +23 -10
  111. package/services/types/array.parser.js.map +1 -1
  112. package/services/types/binary-array.reader.js +69 -0
  113. package/services/types/binary-array.reader.js.map +1 -0
  114. package/services/types/binary-readers.js +1 -60
  115. package/services/types/binary-readers.js.map +1 -1
  116. package/services/types/date.parser.js +7 -11
  117. package/services/types/date.parser.js.map +1 -1
  118. package/services/value-converter.js +3 -1
  119. package/services/value-converter.js.map +1 -1
  120. package/types/column-transform.js +9 -0
  121. package/types/column-transform.js.map +1 -0
  122. package/types/{host-target.js → row-transform.js} +1 -1
  123. package/types/row-transform.js.map +1 -0
  124. package/types/value-transform.js +9 -0
  125. package/types/value-transform.js.map +1 -0
  126. package/models/row-column.js.map +0 -1
  127. package/types/host-target.js.map +0 -1
package/README.md CHANGED
@@ -30,7 +30,8 @@ contract.
30
30
 
31
31
  ## SSL
32
32
 
33
- The connection string's `sslmode` takes these modes:
33
+ The connection string's `sslmode` takes these modes, and is `prefer` when
34
+ neither it nor the `ssl` setting is given:
34
35
 
35
36
  - `disable`: no encryption.
36
37
  - `prefer`: encrypts when the server supports it, without verifying the
@@ -88,6 +89,39 @@ within the connection string's `cancel_timeout` seconds, 5 by default, the
88
89
  client closes the connection and its queries fail with
89
90
  `ConnectionClosedException`; `cancel_timeout=0` waits without a limit.
90
91
 
92
+ ## Callbacks
93
+
94
+ When one of the client's callbacks throws, the error fails the operation it belongs to; the client never swallows it and never leaves it as an unhandled rejection:
95
+
96
+ - `onnotice`, `onparameter` or `onnotify` throwing while a query runs: that query fails with the error once the server ends it, and the connection stays open.
97
+ - The same handler between queries: the connection closes with the error, and the pool opens another for the next query.
98
+ - `onparameter` or `maxLifetime` while a connection opens: the connection closes, and the query or reservation waiting for it fails with the error; when none waits, the pool keeps the error, as below.
99
+ - `backoff` after a failed connect: the queries waiting for a connection fail with the error.
100
+ After a failed type load: the connections whose queries wait for the types close, and those queries fail with `ConnectionClosedException`, whose cause is the error.
101
+ - `onlisten` when the channel first listens: `listenAsync` fails with the error, and the listener is removed.
102
+ - A listener's handler, or its `onlisten` when the channel listens again: that subscription ends, and its `ended` promise rejects with the error; `ended` resolves once the subscription unlistens or the client ends.
103
+ `backoff` while the channel listens again ends all its subscriptions the same way.
104
+ A channel left with no subscriptions stops listening; a failure of that `unlisten` is not reported, since the subscriptions have already ended with their error.
105
+ - `onclose`: the close completes.
106
+ A pool close that caused it fails with the error; otherwise a reserved connection's lease reports it as the reason it closed; otherwise the pool keeps it.
107
+
108
+ The pool keeps errors in the order they happen and never drops one: the next query or reservation, or the pool's end, fails with the one kept error, or with a `CallbacksFailedException`, a `DataException` whose `errors` holds each kept error in order, and the pool then forgets them.
109
+
110
+ ## Types
111
+
112
+ Structured values are named classes, and the settings a caller passes are named interfaces.
113
+ One exception: `TransactionResult<T>`, the result of a transaction, stays a type alias, since it is computed from the callback's own result, awaiting each element when the callback returns an array, and describes no value of its own.
114
+
115
+ ## Errors
116
+
117
+ The client fails on what it can't read rather than guess: a date or time that isn't in ISO format fails with `DataException`, which says to set `DateStyle` to ISO, and a message type it doesn't know closes the connection with `MalformedMessageException`.
118
+ A few fallbacks stay on purpose:
119
+
120
+ - A user name, password or database name in the location that isn't valid percent-encoding is taken as written, as the source does, so a password with a bare `%` still works.
121
+ - A location the client refuses fails with a message that doesn't name it and without the parser's error as its cause, since the location can hold a password and that error can quote it.
122
+ - A server certificate whose hash the client can't read gets no channel binding, the same as one signed with an algorithm that has no defined hash; `channel_binding=require` still fails.
123
+ - A notice that arrives while a connection starts is dropped, since nothing is there yet to report it to.
124
+
91
125
  ## Source
92
126
 
93
127
  The client is a port of postgres.js (https://github.com/porsager/postgres)
@@ -101,7 +135,8 @@ from it:
101
135
  session starter, the authenticator and the socket; `protocol.js` became
102
136
  `services/protocol/`; `query.js` became `Query` and `ClientQuery`;
103
137
  `types.js` became `services/types/` and `TypeRegistry`; `errors.js`
104
- became the exceptions in `exceptions/`, each a `DataException`; and
138
+ became the exceptions in `exceptions/`, each a `PostgreSQLClientException`,
139
+ the package's `DataException` base; and
105
140
  `result.js` became `Result`.
106
141
  - Queries take text and values, `query`, `runUnsafe` and `runFile`, in place
107
142
  of tagged templates, and builder methods such as `useCursor` and
@@ -110,6 +145,7 @@ from it:
110
145
  files, as above, in place of a Node `tls` options object.
111
146
  - SCRAM bounds the server's iteration count and derives the key
112
147
  asynchronously, as Authentication above says.
148
+ - A callback that throws fails its operation, as Callbacks above says.
113
149
  - `build.js`, `subscribe.js`, `large.js`, `cf.js` and `diagnostics.js` are
114
150
  left out, and so are the environment variables and the password file.
115
151
  - The provider's own parts are new: the location parser, which checks a
package/api/index.d.ts CHANGED
@@ -18,6 +18,23 @@ declare module "@noldova/context.data" {
18
18
  * database. A blank location throws `ArgumentException`, and one that is
19
19
  * not such a connection string, or that sets an option the client does not
20
20
  * support, throws `DataException`, whose message never holds the location.
21
+ *
22
+ * @param location The connection string; its `sslmode` is `prefer` when
23
+ * neither it nor `ssl` is given.
24
+ * @returns The options for a `DbContext`; nothing reaches the server until
25
+ * the context's first operation.
26
+ * @throws {ArgumentException} When the location is blank.
27
+ * @throws {DataException} When the location is not a PostgreSQL connection
28
+ * string, or sets an option the client does not support.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * import { DbContextOptionsBuilder } from "@noldova/context.data";
33
+ * import "@noldova/context.data.sql.postgresql";
34
+ *
35
+ * const options = new DbContextOptionsBuilder().usePostgreSQL("postgres://notes@localhost:5432/notes");
36
+ * new DbContextOptionsBuilder().usePostgreSQL("notes.db"); // throws DataException: not a connection string.
37
+ * ```
21
38
  */
22
39
  usePostgreSQL(location: string): DbContextOptions<SqlConnection, SqlMigration>;
23
40
  }
@@ -31,23 +48,65 @@ export declare class PostgreSQLDialect extends SqlDialect {
31
48
  * `BEGIN`: PostgreSQL's row locks and the advisory lock from `formatLock`
32
49
  * serialize the writers, so a transaction needs no write lock when it
33
50
  * begins.
51
+ *
52
+ * @returns `BEGIN`.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * import { PostgreSQLDialect } from "@noldova/context.data.sql.postgresql";
57
+ *
58
+ * new PostgreSQLDialect().formatBeginTransaction(); // "BEGIN"
59
+ * ```
34
60
  */
35
61
  public override formatBeginTransaction(): string;
36
62
 
37
63
  /**
38
64
  * `TEXT` or `BIGINT`.
65
+ *
66
+ * @param type The column's type class.
67
+ * @returns `BIGINT` for `ColumnType.Integer`, otherwise `TEXT`.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * import { ColumnType } from "@noldova/context.data.sql";
72
+ * import { PostgreSQLDialect } from "@noldova/context.data.sql.postgresql";
73
+ *
74
+ * new PostgreSQLDialect().formatColumnType(ColumnType.Integer); // "BIGINT"
75
+ * new PostgreSQLDialect().formatColumnType(ColumnType.Text); // "TEXT"
76
+ * ```
39
77
  */
40
78
  public override formatColumnType(type: ColumnType): string;
41
79
 
42
80
  /**
43
81
  * `BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY`, so the database
44
82
  * generates every key and refuses one given by the insert.
83
+ *
84
+ * @returns The column type of a generated key.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * import { PostgreSQLDialect } from "@noldova/context.data.sql.postgresql";
89
+ *
90
+ * new PostgreSQLDialect().formatIdentityColumnType(); // "BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY"
91
+ * ```
45
92
  */
46
93
  public override formatIdentityColumnType(): string;
47
94
 
48
95
  /**
49
96
  * One statement taking the transaction-scoped advisory lock keyed by the
50
97
  * hash of the resource's name, held until the transaction ends.
98
+ *
99
+ * @param resource The name of what the lock guards; any text, a quote in it
100
+ * doubled.
101
+ * @returns One statement, to run inside the transaction.
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * import { PostgreSQLDialect } from "@noldova/context.data.sql.postgresql";
106
+ *
107
+ * new PostgreSQLDialect().formatLock("notes"); // ["SELECT pg_advisory_xact_lock(hashtext('notes'))"]
108
+ * new PostgreSQLDialect().formatLock("it's"); // ["SELECT pg_advisory_xact_lock(hashtext('it''s'))"]
109
+ * ```
51
110
  */
52
111
  public override formatLock(resource: string): readonly string[];
53
112
  }
@@ -73,6 +132,23 @@ export declare class PostgreSQLConnection extends SqlConnection {
73
132
  * the first operation does. A location that is not a connection string, or
74
133
  * that sets an option the client does not support, throws `DataException`,
75
134
  * whose message never holds the location.
135
+ *
136
+ * @param dataSource The data source; its location is the connection string.
137
+ * @returns A connection that reserves its server session on its first
138
+ * operation; the caller closes it.
139
+ * @throws {DataException} When the location is not a PostgreSQL connection
140
+ * string, or sets an option the client does not support.
141
+ *
142
+ * @example
143
+ * ```ts
144
+ * import { DataSource } from "@noldova/context.data";
145
+ * import { SqlQuery } from "@noldova/context.data.sql";
146
+ * import { PostgreSQLConnection } from "@noldova/context.data.sql.postgresql";
147
+ *
148
+ * await using connection = PostgreSQLConnection.open(new DataSource("notes", "postgres://notes@localhost:5432/notes"));
149
+ * const rows = await connection.queryAsync(new SqlQuery("SELECT title FROM notes WHERE id = ?", [1]));
150
+ * PostgreSQLConnection.open(new DataSource("notes", "notes.db")); // throws DataException.
151
+ * ```
76
152
  */
77
153
  public static open(dataSource: DataSource): PostgreSQLConnection;
78
154
 
@@ -92,7 +168,21 @@ export declare class PostgreSQLConnection extends SqlConnection {
92
168
  */
93
169
  export declare class PostgreSQLProvider extends SqlProvider {
94
170
  /**
95
- * Opens a connection on the data source.
171
+ * Opens a connection on the data source, as `PostgreSQLConnection.open` does.
172
+ *
173
+ * @param dataSource The data source; its location is the connection string.
174
+ * @returns A connection that reserves its server session on its first
175
+ * operation; the caller closes it.
176
+ * @throws {DataException} When the location is not a PostgreSQL connection
177
+ * string, or sets an option the client does not support.
178
+ *
179
+ * @example
180
+ * ```ts
181
+ * import { DataSource } from "@noldova/context.data";
182
+ * import { PostgreSQLProvider } from "@noldova/context.data.sql.postgresql";
183
+ *
184
+ * await using connection = new PostgreSQLProvider().openConnection(new DataSource("notes", "postgres://notes@localhost:5432/notes"));
185
+ * ```
96
186
  */
97
187
  public override openConnection(dataSource: DataSource): PostgreSQLConnection;
98
188
  }
@@ -5,10 +5,10 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { ExceptionOptions } from "@noldova/context.exceptions";
10
9
  import { Resources } from "../resources.js";
11
- export class BatchSkippedException extends DataException {
10
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
11
+ export class BatchSkippedException extends PostgreSQLClientException {
12
12
  index;
13
13
  constructor(index, cause) {
14
14
  super(Resources.formatBatchSkipped(index), new ExceptionOptions(cause));
@@ -1 +1 @@
1
- {"version":3,"file":"batch-skipped.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/batch-skipped.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IACtC,KAAK,CAAS;IAE9B,YAAmB,KAAa,EAAE,KAAmB;QACnD,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAExE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
1
+ {"version":3,"file":"batch-skipped.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/batch-skipped.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,qBAAsB,SAAQ,yBAAyB;IAClD,KAAK,CAAS;IAE9B,YAAmB,KAAa,EAAE,KAAmB;QACnD,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAExE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
@@ -5,10 +5,10 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { ExceptionOptions } from "@noldova/context.exceptions";
10
9
  import { Resources } from "../resources.js";
11
- export class BatchException extends DataException {
10
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
11
+ export class BatchException extends PostgreSQLClientException {
12
12
  index;
13
13
  constructor(index, cause) {
14
14
  super(Resources.formatBatchFailed(index), new ExceptionOptions(cause));
@@ -1 +1 @@
1
- {"version":3,"file":"batch.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/batch.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,cAAe,SAAQ,aAAa;IAC/B,KAAK,CAAS;IAE9B,YAAmB,KAAa,EAAE,KAAY;QAC5C,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAEvE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
1
+ {"version":3,"file":"batch.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/batch.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,cAAe,SAAQ,yBAAyB;IAC3C,KAAK,CAAS;IAE9B,YAAmB,KAAa,EAAE,KAAY;QAC5C,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAEvE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Resources } from "../resources.js";
9
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
10
+ export class CallbacksFailedException extends PostgreSQLClientException {
11
+ errors;
12
+ constructor(errors) {
13
+ super(Resources.callbacksFailed);
14
+ this.errors = errors;
15
+ }
16
+ }
17
+ //# sourceMappingURL=callbacks-failed.exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callbacks-failed.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/callbacks-failed.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,wBAAyB,SAAQ,yBAAyB;IACrD,MAAM,CAAmB;IAEzC,YAAmB,MAAwB;QACzC,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAEjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF"}
@@ -5,9 +5,9 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { Resources } from "../resources.js";
10
- export class CancelUnansweredException extends DataException {
9
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
10
+ export class CancelUnansweredException extends PostgreSQLClientException {
11
11
  seconds;
12
12
  silent;
13
13
  constructor(seconds, silent) {
@@ -1 +1 @@
1
- {"version":3,"file":"cancel-unanswered.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/cancel-unanswered.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,yBAA0B,SAAQ,aAAa;IAC1C,OAAO,CAAS;IAChB,MAAM,CAAU;IAEhC,YAAmB,OAAe,EAAE,MAAe;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;QAElG,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF"}
1
+ {"version":3,"file":"cancel-unanswered.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/cancel-unanswered.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,yBAA0B,SAAQ,yBAAyB;IACtD,OAAO,CAAS;IAChB,MAAM,CAAU;IAEhC,YAAmB,OAAe,EAAE,MAAe;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;QAElG,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF"}
@@ -5,10 +5,10 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { ExceptionOptions } from "@noldova/context.exceptions";
10
9
  import { Resources } from "../resources.js";
11
- export class ConnectionClosedException extends DataException {
10
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
11
+ export class ConnectionClosedException extends PostgreSQLClientException {
12
12
  destroyed;
13
13
  host;
14
14
  port;
@@ -1 +1 @@
1
- {"version":3,"file":"connection-closed.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/connection-closed.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,yBAA0B,SAAQ,aAAa;IAC1C,SAAS,CAAU;IACnB,IAAI,CAAS;IACb,IAAI,CAAS;IAE7B,YAAmB,SAAkB,EAAE,IAAY,EAAE,IAAY,EAAE,KAAmB;QACpF,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAE/I,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
1
+ {"version":3,"file":"connection-closed.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/connection-closed.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,yBAA0B,SAAQ,yBAAyB;IACtD,SAAS,CAAU;IACnB,IAAI,CAAS;IACb,IAAI,CAAS;IAE7B,YAAmB,SAAkB,EAAE,IAAY,EAAE,IAAY,EAAE,KAAmB;QACpF,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAE/I,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
@@ -5,9 +5,9 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { Resources } from "../resources.js";
10
- export class ConnectionEndedException extends DataException {
9
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
10
+ export class ConnectionEndedException extends PostgreSQLClientException {
11
11
  host;
12
12
  port;
13
13
  constructor(host, port) {
@@ -1 +1 @@
1
- {"version":3,"file":"connection-ended.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/connection-ended.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,wBAAyB,SAAQ,aAAa;IACzC,IAAI,CAAS;IACb,IAAI,CAAS;IAE7B,YAAmB,IAAY,EAAE,IAAY;QAC3C,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QAEnD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
1
+ {"version":3,"file":"connection-ended.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/connection-ended.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,wBAAyB,SAAQ,yBAAyB;IACrD,IAAI,CAAS;IACb,IAAI,CAAS;IAE7B,YAAmB,IAAY,EAAE,IAAY;QAC3C,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QAEnD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
@@ -5,9 +5,9 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { Resources } from "../resources.js";
10
- export class MalformedMessageException extends DataException {
9
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
10
+ export class MalformedMessageException extends PostgreSQLClientException {
11
11
  constructor() {
12
12
  super(Resources.malformedMessage);
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"malformed-message.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/malformed-message.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,yBAA0B,SAAQ,aAAa;IAC1D;QACE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACpC,CAAC;CACF"}
1
+ {"version":3,"file":"malformed-message.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/malformed-message.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,yBAA0B,SAAQ,yBAAyB;IACtE;QACE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACpC,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { DataException } from "@noldova/context.data";
9
+ export class PostgreSQLClientException extends DataException {
10
+ constructor(message, options) {
11
+ super(message, options);
12
+ }
13
+ }
14
+ //# sourceMappingURL=postgresql-client.exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgresql-client.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/postgresql-client.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,MAAM,OAAgB,yBAA0B,SAAQ,aAAa;IACnE,YAAsB,OAAe,EAAE,OAA0B;QAC/D,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1B,CAAC;CACF"}
@@ -5,9 +5,9 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { Resources } from "../resources.js";
10
- export class PostgreSQLException extends DataException {
9
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
10
+ export class PostgreSQLException extends PostgreSQLClientException {
11
11
  sqlState;
12
12
  severity;
13
13
  detail;
@@ -1 +1 @@
1
- {"version":3,"file":"postgresql.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/postgresql.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,mBAAoB,SAAQ,aAAa;IACpC,QAAQ,CAAS;IACjB,QAAQ,CAAS;IACjB,MAAM,CAAgB;IACtB,IAAI,CAAgB;IACpB,UAAU,CAAgB;IAC1B,SAAS,CAAgB;IACzB,UAAU,CAAgB;IAC1B,cAAc,CAAgB;IAE9C,YAAmB,MAAmC;QACpD,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,SAAS,CAAC,WAAW,CAAC,CAAC;QAEnE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACtD,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;QACtG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC;QACxD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC;QACpD,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC;QAChE,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC;QAC9D,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC;QAChE,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,mBAAmB,CAAC,IAAI,IAAI,CAAC;IAC1E,CAAC;CACF"}
1
+ {"version":3,"file":"postgresql.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/postgresql.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,mBAAoB,SAAQ,yBAAyB;IAChD,QAAQ,CAAS;IACjB,QAAQ,CAAS;IACjB,MAAM,CAAgB;IACtB,IAAI,CAAgB;IACpB,UAAU,CAAgB;IAC1B,SAAS,CAAgB;IACzB,UAAU,CAAgB;IAC1B,cAAc,CAAgB;IAE9C,YAAmB,MAAmC;QACpD,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,SAAS,CAAC,WAAW,CAAC,CAAC;QAEnE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACtD,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;QACtG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC;QACxD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC;QACpD,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC;QAChE,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC;QAC9D,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC;QAChE,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,mBAAmB,CAAC,IAAI,IAAI,CAAC;IAC1E,CAAC;CACF"}
@@ -5,9 +5,9 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { Resources } from "../resources.js";
10
- export class QueryCanceledException extends DataException {
9
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
10
+ export class QueryCanceledException extends PostgreSQLClientException {
11
11
  constructor() {
12
12
  super(Resources.queryCanceled);
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"query-canceled.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/query-canceled.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,sBAAuB,SAAQ,aAAa;IACvD;QACE,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC;CACF"}
1
+ {"version":3,"file":"query-canceled.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/query-canceled.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,sBAAuB,SAAQ,yBAAyB;IACnE;QACE,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC;CACF"}
@@ -5,10 +5,10 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { ExceptionOptions } from "@noldova/context.exceptions";
10
9
  import { Resources } from "../resources.js";
11
- export class QueryTimeoutException extends DataException {
10
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
11
+ export class QueryTimeoutException extends PostgreSQLClientException {
12
12
  seconds;
13
13
  constructor(seconds, cause) {
14
14
  super(Resources.formatQueryTimeout(seconds), new ExceptionOptions(cause));
@@ -1 +1 @@
1
- {"version":3,"file":"query-timeout.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/query-timeout.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IACtC,OAAO,CAAS;IAEhC,YAAmB,OAAe,EAAE,KAAc;QAChD,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAE1E,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
1
+ {"version":3,"file":"query-timeout.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/query-timeout.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,qBAAsB,SAAQ,yBAAyB;IAClD,OAAO,CAAS;IAEhC,YAAmB,OAAe,EAAE,KAAc;QAChD,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAE1E,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
@@ -5,9 +5,9 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { Resources } from "../resources.js";
10
- export class QueueTimeoutException extends DataException {
9
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
10
+ export class QueueTimeoutException extends PostgreSQLClientException {
11
11
  seconds;
12
12
  constructor(seconds) {
13
13
  super(Resources.formatQueueTimeout(seconds));
@@ -1 +1 @@
1
- {"version":3,"file":"queue-timeout.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/queue-timeout.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IACtC,OAAO,CAAS;IAEhC,YAAmB,OAAe;QAChC,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;QAE7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
1
+ {"version":3,"file":"queue-timeout.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/queue-timeout.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,qBAAsB,SAAQ,yBAAyB;IAClD,OAAO,CAAS;IAEhC,YAAmB,OAAe;QAChC,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;QAE7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
@@ -5,10 +5,10 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { ExceptionOptions } from "@noldova/context.exceptions";
10
9
  import { Resources } from "../resources.js";
11
- export class StrayCancelException extends DataException {
10
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
11
+ export class StrayCancelException extends PostgreSQLClientException {
12
12
  constructor(cause) {
13
13
  super(Resources.strayCancel, new ExceptionOptions(cause));
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"stray-cancel.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/stray-cancel.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,oBAAqB,SAAQ,aAAa;IACrD,YAAmB,KAAY;QAC7B,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,CAAC;CACF"}
1
+ {"version":3,"file":"stray-cancel.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/stray-cancel.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,oBAAqB,SAAQ,yBAAyB;IACjE,YAAmB,KAAY;QAC7B,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,CAAC;CACF"}
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
- export class TransactionRolledBackException extends DataException {
8
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
9
+ export class TransactionRolledBackException extends PostgreSQLClientException {
10
10
  constructor(message) {
11
11
  super(message);
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"transaction-rolled-back.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/transaction-rolled-back.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,OAAO,8BAA+B,SAAQ,aAAa;IAC/D,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF"}
1
+ {"version":3,"file":"transaction-rolled-back.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/transaction-rolled-back.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,8BAA+B,SAAQ,yBAAyB;IAC3E,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF"}
@@ -5,9 +5,9 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
8
  import { Resources } from "../resources.js";
10
- export class TypeNotFoundException extends DataException {
9
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
10
+ export class TypeNotFoundException extends PostgreSQLClientException {
11
11
  names;
12
12
  constructor(names) {
13
13
  super(names.length > 1
@@ -1 +1 @@
1
- {"version":3,"file":"type-not-found.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/type-not-found.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IACtC,KAAK,CAAoB;IAEzC,YAAmB,KAAwB;QACzC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YACpB,CAAC,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;YACpE,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAEvE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
1
+ {"version":3,"file":"type-not-found.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/type-not-found.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,qBAAsB,SAAQ,yBAAyB;IAClD,KAAK,CAAoB;IAEzC,YAAmB,KAAwB;QACzC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YACpB,CAAC,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;YACpE,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAEvE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { DataException } from "@noldova/context.data";
9
- export class UnsafeTransactionException extends DataException {
8
+ import { PostgreSQLClientException } from "./postgresql-client.exception.js";
9
+ export class UnsafeTransactionException extends PostgreSQLClientException {
10
10
  constructor(message) {
11
11
  super(message);
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"unsafe-transaction.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/unsafe-transaction.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,OAAO,0BAA2B,SAAQ,aAAa;IAC3D,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF"}
1
+ {"version":3,"file":"unsafe-transaction.exception.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/exceptions/unsafe-transaction.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,OAAO,0BAA2B,SAAQ,yBAAyB;IACvE,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF"}
@@ -5,12 +5,12 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- export class RowColumn {
9
- name;
8
+ export class ArrayElement {
10
9
  type;
11
- constructor(name, type) {
12
- this.name = name;
10
+ delimiter;
11
+ constructor(type, delimiter) {
13
12
  this.type = type;
13
+ this.delimiter = delimiter;
14
14
  }
15
15
  }
16
- //# sourceMappingURL=row-column.js.map
16
+ //# sourceMappingURL=array-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array-element.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/models/array-element.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,YAAY;IACP,IAAI,CAAS;IACb,SAAS,CAAS;IAElC,YAAmB,IAAY,EAAE,SAAiB;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CACF"}
@@ -5,12 +5,15 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
+ import { Deferred } from "./client/deferred.js";
8
9
  export class ChannelListener {
10
+ ended = new Deferred();
9
11
  callback;
10
12
  onlisten;
11
13
  constructor(callback, onlisten) {
12
14
  this.callback = callback;
13
15
  this.onlisten = onlisten;
16
+ this.ended.promise.catch(() => undefined);
14
17
  }
15
18
  }
16
19
  //# sourceMappingURL=channel-listener.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"channel-listener.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/models/channel-listener.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,eAAe;IACV,QAAQ,CAA4B;IACpC,QAAQ,CAAsB;IAE9C,YAAmB,QAAmC,EAAE,QAA6B;QACnF,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF"}
1
+ {"version":3,"file":"channel-listener.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/models/channel-listener.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,OAAO,eAAe;IACV,KAAK,GAAmB,IAAI,QAAQ,EAAQ,CAAC;IAC7C,QAAQ,CAA4B;IACpC,QAAQ,CAAsB;IAE9C,YAAmB,QAAmC,EAAE,QAA6B;QACnF,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;CACF"}