@noldova/context.data.sql.postgresql 0.0.0-stage → 0.0.6
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/LICENSE +21 -0
- package/README.md +89 -2
- package/THIRD-PARTY-NOTICES.txt +33 -0
- package/api/index.d.ts +94 -0
- package/api/index.js +12 -0
- package/api/index.js.map +1 -0
- package/enums/backend-message.js +35 -0
- package/enums/backend-message.js.map +1 -0
- package/enums/channel-binding.js +14 -0
- package/enums/channel-binding.js.map +1 -0
- package/enums/cursor-action.js +13 -0
- package/enums/cursor-action.js.map +1 -0
- package/enums/exchange-kind.js +17 -0
- package/enums/exchange-kind.js.map +1 -0
- package/enums/frontend-message.js +24 -0
- package/enums/frontend-message.js.map +1 -0
- package/enums/lease-kind.js +13 -0
- package/enums/lease-kind.js.map +1 -0
- package/enums/message-target.js +13 -0
- package/enums/message-target.js.map +1 -0
- package/enums/prepared-state.js +14 -0
- package/enums/prepared-state.js.map +1 -0
- package/enums/row-mode.js +14 -0
- package/enums/row-mode.js.map +1 -0
- package/enums/ssl-mode.js +16 -0
- package/enums/ssl-mode.js.map +1 -0
- package/enums/token-kind.js +15 -0
- package/enums/token-kind.js.map +1 -0
- package/enums/transaction-status.js +14 -0
- package/enums/transaction-status.js.map +1 -0
- package/enums/write-outcome.js +14 -0
- package/enums/write-outcome.js.map +1 -0
- package/exceptions/batch-skipped.exception.js +19 -0
- package/exceptions/batch-skipped.exception.js.map +1 -0
- package/exceptions/batch.exception.js +19 -0
- package/exceptions/batch.exception.js.map +1 -0
- package/exceptions/cancel-unanswered.exception.js +20 -0
- package/exceptions/cancel-unanswered.exception.js.map +1 -0
- package/exceptions/connection-closed.exception.js +23 -0
- package/exceptions/connection-closed.exception.js.map +1 -0
- package/exceptions/connection-ended.exception.js +20 -0
- package/exceptions/connection-ended.exception.js.map +1 -0
- package/exceptions/postgresql.exception.js +32 -0
- package/exceptions/postgresql.exception.js.map +1 -0
- package/exceptions/query-canceled.exception.js +16 -0
- package/exceptions/query-canceled.exception.js.map +1 -0
- package/exceptions/query-timeout.exception.js +19 -0
- package/exceptions/query-timeout.exception.js.map +1 -0
- package/exceptions/queue-timeout.exception.js +18 -0
- package/exceptions/queue-timeout.exception.js.map +1 -0
- package/exceptions/transaction-rolled-back.exception.js +15 -0
- package/exceptions/transaction-rolled-back.exception.js.map +1 -0
- package/exceptions/type-not-found.exception.js +20 -0
- package/exceptions/type-not-found.exception.js.map +1 -0
- package/exceptions/unsafe-transaction.exception.js +15 -0
- package/exceptions/unsafe-transaction.exception.js.map +1 -0
- package/extensions/db-context-options-builder.extensions.js +17 -0
- package/extensions/db-context-options-builder.extensions.js.map +1 -0
- package/models/backend-key.js +16 -0
- package/models/backend-key.js.map +1 -0
- package/models/binary-columns.js +16 -0
- package/models/binary-columns.js.map +1 -0
- package/models/built-query.js +18 -0
- package/models/built-query.js.map +1 -0
- package/models/channel-listener.js +16 -0
- package/models/channel-listener.js.map +1 -0
- package/models/client/client-listener.js +158 -0
- package/models/client/client-listener.js.map +1 -0
- package/models/client/client-query.js +54 -0
- package/models/client/client-query.js.map +1 -0
- package/models/client/client-timers.js +44 -0
- package/models/client/client-timers.js.map +1 -0
- package/models/client/connection-socket.js +13 -0
- package/models/client/connection-socket.js.map +1 -0
- package/models/client/copy-both-stream.js +33 -0
- package/models/client/copy-both-stream.js.map +1 -0
- package/models/client/copy-in-stream.js +30 -0
- package/models/client/copy-in-stream.js.map +1 -0
- package/models/client/copy-out-stream.js +28 -0
- package/models/client/copy-out-stream.js.map +1 -0
- package/models/client/deferred.js +25 -0
- package/models/client/deferred.js.map +1 -0
- package/models/client/exchange.js +100 -0
- package/models/client/exchange.js.map +1 -0
- package/models/client/listen-subscription.js +26 -0
- package/models/client/listen-subscription.js.map +1 -0
- package/models/client/pool-job.js +24 -0
- package/models/client/pool-job.js.map +1 -0
- package/models/client/pool-lease.js +88 -0
- package/models/client/pool-lease.js.map +1 -0
- package/models/client/pool-queue.js +56 -0
- package/models/client/pool-queue.js.map +1 -0
- package/models/client/postgresql-client.js +83 -0
- package/models/client/postgresql-client.js.map +1 -0
- package/models/client/postgresql-connection.js +1557 -0
- package/models/client/postgresql-connection.js.map +1 -0
- package/models/client/postgresql-pool.js +896 -0
- package/models/client/postgresql-pool.js.map +1 -0
- package/models/client/query.js +216 -0
- package/models/client/query.js.map +1 -0
- package/models/client/reserved-client.js +29 -0
- package/models/client/reserved-client.js.map +1 -0
- package/models/client/statement-cache.js +111 -0
- package/models/client/statement-cache.js.map +1 -0
- package/models/client/transaction-scope.js +136 -0
- package/models/client/transaction-scope.js.map +1 -0
- package/models/client-configuration.js +16 -0
- package/models/client-configuration.js.map +1 -0
- package/models/client-options.js +69 -0
- package/models/client-options.js.map +1 -0
- package/models/column.js +30 -0
- package/models/column.js.map +1 -0
- package/models/command-result.js +16 -0
- package/models/command-result.js.map +1 -0
- package/models/connection-options.js +47 -0
- package/models/connection-options.js.map +1 -0
- package/models/date-parts.js +28 -0
- package/models/date-parts.js.map +1 -0
- package/models/der-element.js +18 -0
- package/models/der-element.js.map +1 -0
- package/models/listen-channel.js +17 -0
- package/models/listen-channel.js.map +1 -0
- package/models/notification.js +18 -0
- package/models/notification.js.map +1 -0
- package/models/parsed-url.js +22 -0
- package/models/parsed-url.js.map +1 -0
- package/models/pool-stats.js +22 -0
- package/models/pool-stats.js.map +1 -0
- package/models/postgresql-connection.js +21 -0
- package/models/postgresql-connection.js.map +1 -0
- package/models/postgresql-session.js +59 -0
- package/models/postgresql-session.js.map +1 -0
- package/models/postgresql-socket.js +129 -0
- package/models/postgresql-socket.js.map +1 -0
- package/models/prepared-statement.js +25 -0
- package/models/prepared-statement.js.map +1 -0
- package/models/query-batch.js +25 -0
- package/models/query-batch.js.map +1 -0
- package/models/query-cost.js +15 -0
- package/models/query-cost.js.map +1 -0
- package/models/query-options.js +16 -0
- package/models/query-options.js.map +1 -0
- package/models/query-statement.js +23 -0
- package/models/query-statement.js.map +1 -0
- package/models/query-wire.js +16 -0
- package/models/query-wire.js.map +1 -0
- package/models/result.js +32 -0
- package/models/result.js.map +1 -0
- package/models/row-column.js +16 -0
- package/models/row-column.js.map +1 -0
- package/models/started-session.js +31 -0
- package/models/started-session.js.map +1 -0
- package/models/statement-description.js +20 -0
- package/models/statement-description.js.map +1 -0
- package/models/statement-shape.js +16 -0
- package/models/statement-shape.js.map +1 -0
- package/models/system-certificates.js +17 -0
- package/models/system-certificates.js.map +1 -0
- package/models/transaction-state.js +18 -0
- package/models/transaction-state.js.map +1 -0
- package/models/transform-options.js +28 -0
- package/models/transform-options.js.map +1 -0
- package/models/type-definition.js +23 -0
- package/models/type-definition.js.map +1 -0
- package/models/type-registry.js +287 -0
- package/models/type-registry.js.map +1 -0
- package/models/typed-parameter.js +16 -0
- package/models/typed-parameter.js.map +1 -0
- package/package.json +26 -4
- package/resources.js +278 -0
- package/resources.js.map +1 -0
- package/services/authenticator.js +145 -0
- package/services/authenticator.js.map +1 -0
- package/services/certificate-hash.js +81 -0
- package/services/certificate-hash.js.map +1 -0
- package/services/client/connection-events.js +10 -0
- package/services/client/connection-events.js.map +1 -0
- package/services/client/connection-lease.js +10 -0
- package/services/client/connection-lease.js.map +1 -0
- package/services/client/copy-host.js +10 -0
- package/services/client/copy-host.js.map +1 -0
- package/services/client/cursor-iterator.js +46 -0
- package/services/client/cursor-iterator.js.map +1 -0
- package/services/client/file-query-handler.js +32 -0
- package/services/client/file-query-handler.js.map +1 -0
- package/services/client/query-handler.js +10 -0
- package/services/client/query-handler.js.map +1 -0
- package/services/client/row.reader.js +87 -0
- package/services/client/row.reader.js.map +1 -0
- package/services/client/sql-runner.js +64 -0
- package/services/client/sql-runner.js.map +1 -0
- package/services/client/type-loader-events.js +61 -0
- package/services/client/type-loader-events.js.map +1 -0
- package/services/client-options.parser.js +187 -0
- package/services/client-options.parser.js.map +1 -0
- package/services/location.parser.js +25 -0
- package/services/location.parser.js.map +1 -0
- package/services/parameter-rewriter.js +158 -0
- package/services/parameter-rewriter.js.map +1 -0
- package/services/postgresql-dialect.js +24 -0
- package/services/postgresql-dialect.js.map +1 -0
- package/services/postgresql-provider.js +8 -0
- package/services/postgresql-provider.js.map +1 -0
- package/services/protocol/backend.js +135 -0
- package/services/protocol/backend.js.map +1 -0
- package/services/protocol/frame.reader.js +167 -0
- package/services/protocol/frame.reader.js.map +1 -0
- package/services/protocol/frontend.js +177 -0
- package/services/protocol/frontend.js.map +1 -0
- package/services/protocol/protocol-writer.js +118 -0
- package/services/protocol/protocol-writer.js.map +1 -0
- package/services/session-starter.js +166 -0
- package/services/session-starter.js.map +1 -0
- package/services/tls-options.reader.js +60 -0
- package/services/tls-options.reader.js.map +1 -0
- package/services/types/array-serializer.js +35 -0
- package/services/types/array-serializer.js.map +1 -0
- package/services/types/array.parser.js +64 -0
- package/services/types/array.parser.js.map +1 -0
- package/services/types/binary-readers.js +135 -0
- package/services/types/binary-readers.js.map +1 -0
- package/services/types/date.parser.js +86 -0
- package/services/types/date.parser.js.map +1 -0
- package/services/value-converter.js +37 -0
- package/services/value-converter.js.map +1 -0
- package/types/binary-decoder.js +9 -0
- package/types/binary-decoder.js.map +1 -0
- package/types/client-settings.js +9 -0
- package/types/client-settings.js.map +1 -0
- package/types/host-target.js +9 -0
- package/types/host-target.js.map +1 -0
- package/types/option-values.js +9 -0
- package/types/option-values.js.map +1 -0
- package/types/query-outcome.js +9 -0
- package/types/query-outcome.js.map +1 -0
- package/types/query-settings.js +9 -0
- package/types/query-settings.js.map +1 -0
- package/types/transaction-result.js +9 -0
- package/types/transaction-result.js.map +1 -0
- package/types/transform-settings.js +9 -0
- package/types/transform-settings.js.map +1 -0
- package/types/value-parser.js +9 -0
- package/types/value-parser.js.map +1 -0
- package/types/value-serializer.js +9 -0
- package/types/value-serializer.js.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Noldova
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,90 @@
|
|
|
1
|
-
#
|
|
1
|
+
# noldova.context.data.sql.postgresql
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The PostgreSQL provider of `noldova.context.data.sql`: its dialect, which
|
|
4
|
+
spells PostgreSQL's transactions, column types, generated keys, and advisory
|
|
5
|
+
locks, its connection, its provider, `usePostgreSQL`, and the internal
|
|
6
|
+
PostgreSQL client its connection reaches the server through.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @noldova/context.data.sql.postgresql
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Use
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { DbContextOptionsBuilder } from "@noldova/context.data";
|
|
18
|
+
import "@noldova/context.data.sql.postgresql";
|
|
19
|
+
|
|
20
|
+
await using context = new NotesContext(new DbContextOptionsBuilder().usePostgreSQL("postgres://notes@localhost:5432/notes"));
|
|
21
|
+
await context.database.migrateAsync();
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The location is the server's connection string, and the data source is
|
|
25
|
+
named after its database. Parameters the client doesn't read itself, such as
|
|
26
|
+
`search_path`, go to the server when the session starts.
|
|
27
|
+
|
|
28
|
+
The declaration file `api/index.d.ts` documents every member with its
|
|
29
|
+
contract.
|
|
30
|
+
|
|
31
|
+
## SSL
|
|
32
|
+
|
|
33
|
+
The connection string's `sslmode` takes these modes:
|
|
34
|
+
|
|
35
|
+
- `disable`: no encryption.
|
|
36
|
+
- `prefer`: encrypts when the server supports it, without verifying the
|
|
37
|
+
server.
|
|
38
|
+
- `require`: encrypts, and fails when the server can't; it doesn't verify the
|
|
39
|
+
server's certificate.
|
|
40
|
+
- `verify-ca`: encrypts and verifies that the trusted roots signed the
|
|
41
|
+
server's certificate, but not the host name it names.
|
|
42
|
+
- `verify-full`: encrypts and verifies the certificate's chain and that it
|
|
43
|
+
names the host.
|
|
44
|
+
|
|
45
|
+
The certificate options name files, in PEM:
|
|
46
|
+
|
|
47
|
+
- `sslrootcert`: the root certificates to trust for the server, instead of
|
|
48
|
+
the system's; `sslrootcert=system` keeps the system's roots and selects
|
|
49
|
+
`verify-full`.
|
|
50
|
+
- `sslcert` and `sslkey`: the client certificate and its private key, given
|
|
51
|
+
together.
|
|
52
|
+
- `sslpassword`: the passphrase of an encrypted `sslkey`.
|
|
53
|
+
|
|
54
|
+
The files are read at each connection, including the one that cancels a
|
|
55
|
+
query. An error names the option and the file, never the key, its contents
|
|
56
|
+
or the passphrase.
|
|
57
|
+
|
|
58
|
+
Not supported yet: the `PG*` environment variables, the password file, the
|
|
59
|
+
operating system's user name as the default user, several hosts and
|
|
60
|
+
`target_session_attrs`, Unix-domain sockets, and direct SSL negotiation.
|
|
61
|
+
|
|
62
|
+
## Source
|
|
63
|
+
|
|
64
|
+
The client is a port of postgres.js (https://github.com/porsager/postgres)
|
|
65
|
+
at its `v4.1.0` tag, commit `d84da749342240a4c1fb44e4f9a6b22d2350fb7b`,
|
|
66
|
+
under the Unlicense; `THIRD-PARTY-NOTICES.txt` keeps its text. What changed
|
|
67
|
+
from it:
|
|
68
|
+
|
|
69
|
+
- `index.js` became `PostgreSQLClient`, with `ClientOptionsParser` for its
|
|
70
|
+
options; `pool.js` became `PostgreSQLPool` and its leases;
|
|
71
|
+
`connection.js`, `startup.js` and `socket.js` became the connection, the
|
|
72
|
+
session starter, the authenticator and the socket; `protocol.js` became
|
|
73
|
+
`services/protocol/`; `query.js` became `Query` and `ClientQuery`;
|
|
74
|
+
`types.js` became `services/types/` and `TypeRegistry`; `errors.js`
|
|
75
|
+
became the exceptions in `exceptions/`, each a `DataException`; and
|
|
76
|
+
`result.js` became `Result`.
|
|
77
|
+
- Queries take text and values, `query`, `runUnsafe` and `runFile`, in place
|
|
78
|
+
of tagged templates, and builder methods such as `useCursor` and
|
|
79
|
+
`useValueRows` in place of the query's own options.
|
|
80
|
+
- The TLS options are the connection string's `sslmode` and certificate
|
|
81
|
+
files, as above, in place of a Node `tls` options object.
|
|
82
|
+
- `build.js`, `subscribe.js`, `large.js`, `cf.js` and `diagnostics.js` are
|
|
83
|
+
left out, and so are the environment variables and the password file.
|
|
84
|
+
- The provider's own parts are new: the location parser, which checks a
|
|
85
|
+
location with the client's own parser, the `?` rewriter and the value
|
|
86
|
+
converter.
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
MIT; see `LICENSE`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
THIRD-PARTY NOTICES
|
|
2
|
+
|
|
3
|
+
This package's PostgreSQL client is ported from postgres.js v4.1.0
|
|
4
|
+
(https://github.com/porsager/postgres, commit
|
|
5
|
+
d84da749342240a4c1fb44e4f9a6b22d2350fb7b), which is released under the
|
|
6
|
+
Unlicense, whose text follows.
|
|
7
|
+
|
|
8
|
+
--------------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
This is free and unencumbered software released into the public domain.
|
|
11
|
+
|
|
12
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
13
|
+
distribute this software, either in source code form or as a compiled
|
|
14
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
15
|
+
means.
|
|
16
|
+
|
|
17
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
18
|
+
of this software dedicate any and all copyright interest in the
|
|
19
|
+
software to the public domain. We make this dedication for the benefit
|
|
20
|
+
of the public at large and to the detriment of our heirs and
|
|
21
|
+
successors. We intend this dedication to be an overt act of
|
|
22
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
23
|
+
software under copyright law.
|
|
24
|
+
|
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
26
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
27
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
28
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
29
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
30
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
31
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
32
|
+
|
|
33
|
+
For more information, please refer to <https://unlicense.org/>
|
package/api/index.d.ts
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
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
|
+
|
|
9
|
+
import type { DataSource, DbContextOptions } from "@noldova/context.data";
|
|
10
|
+
import { ColumnType, SqlConnection, SqlDialect, type SqlMigration, SqlProvider } from "@noldova/context.data.sql";
|
|
11
|
+
|
|
12
|
+
declare module "@noldova/context.data" {
|
|
13
|
+
interface DbContextOptionsBuilder {
|
|
14
|
+
/**
|
|
15
|
+
* Returns options that open the PostgreSQL database at the location, a
|
|
16
|
+
* connection string of the form `postgres://user:password@host:port/database`,
|
|
17
|
+
* through `PostgreSQLProvider`; the data source is named after the
|
|
18
|
+
* database. A blank location throws `ArgumentException`, and one that is
|
|
19
|
+
* not such a connection string, or that sets an option the client does not
|
|
20
|
+
* support, throws `DataException`, whose message never holds the location.
|
|
21
|
+
*/
|
|
22
|
+
usePostgreSQL(location: string): DbContextOptions<SqlConnection, SqlMigration>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* How PostgreSQL spells transactions, column types, generated keys, and locks.
|
|
28
|
+
*/
|
|
29
|
+
export declare class PostgreSQLDialect extends SqlDialect {
|
|
30
|
+
/**
|
|
31
|
+
* `BEGIN`: PostgreSQL's row locks and the advisory lock from `formatLock`
|
|
32
|
+
* serialize the writers, so a transaction needs no write lock when it
|
|
33
|
+
* begins.
|
|
34
|
+
*/
|
|
35
|
+
public override formatBeginTransaction(): string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* `TEXT` or `BIGINT`.
|
|
39
|
+
*/
|
|
40
|
+
public override formatColumnType(type: ColumnType): string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* `BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY`, so the database
|
|
44
|
+
* generates every key and refuses one given by the insert.
|
|
45
|
+
*/
|
|
46
|
+
public override formatIdentityColumnType(): string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* One statement taking the transaction-scoped advisory lock keyed by the
|
|
50
|
+
* hash of the resource's name, held until the transaction ends.
|
|
51
|
+
*/
|
|
52
|
+
public override formatLock(resource: string): readonly string[];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* A connection to a PostgreSQL database, holding one server session of its
|
|
57
|
+
* own from its first operation until it is closed, so a transaction's
|
|
58
|
+
* statements run in one session. The data source's location is the
|
|
59
|
+
* connection string. Statements mark their parameters with `?`, as for every
|
|
60
|
+
* SQL provider; numbers, text, and `NULL` go to the server as text. A row
|
|
61
|
+
* reads `BIGINT` and the smaller integer and floating-point types as numbers,
|
|
62
|
+
* a `BIGINT` outside the safe integers rejecting with `DataException`, and
|
|
63
|
+
* every other type as its text. An insert returns the value the session's
|
|
64
|
+
* sequences last gave, so it needs a table whose key is generated.
|
|
65
|
+
*/
|
|
66
|
+
export declare class PostgreSQLConnection extends SqlConnection {
|
|
67
|
+
/**
|
|
68
|
+
* Opens a connection on the data source without reaching the server, which
|
|
69
|
+
* the first operation does. A location that is not a connection string, or
|
|
70
|
+
* that sets an option the client does not support, throws `DataException`,
|
|
71
|
+
* whose message never holds the location.
|
|
72
|
+
*/
|
|
73
|
+
public static open(dataSource: DataSource): PostgreSQLConnection;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The PostgreSQL dialect.
|
|
77
|
+
*/
|
|
78
|
+
public override get dialect(): SqlDialect;
|
|
79
|
+
|
|
80
|
+
private constructor(dataSource: DataSource, session: unknown);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The PostgreSQL provider: opens `PostgreSQLConnection` on a data source's
|
|
85
|
+
* connection string and inherits the `SqlMigrator`, whose advisory lock lets
|
|
86
|
+
* several processes migrate one database at once. Reached through
|
|
87
|
+
* `DbContextOptionsBuilder.usePostgreSQL`.
|
|
88
|
+
*/
|
|
89
|
+
export declare class PostgreSQLProvider extends SqlProvider {
|
|
90
|
+
/**
|
|
91
|
+
* Opens a connection on the data source.
|
|
92
|
+
*/
|
|
93
|
+
public override openConnection(dataSource: DataSource): PostgreSQLConnection;
|
|
94
|
+
}
|
package/api/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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 "../extensions/db-context-options-builder.extensions.js";
|
|
9
|
+
export { PostgreSQLConnection } from "../models/postgresql-connection.js";
|
|
10
|
+
export { PostgreSQLDialect } from "../services/postgresql-dialect.js";
|
|
11
|
+
export { PostgreSQLProvider } from "../services/postgresql-provider.js";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
package/api/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,wDAAwD,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
export var BackendMessage;
|
|
9
|
+
(function (BackendMessage) {
|
|
10
|
+
BackendMessage[BackendMessage["Authentication"] = 82] = "Authentication";
|
|
11
|
+
BackendMessage[BackendMessage["BackendKeyData"] = 75] = "BackendKeyData";
|
|
12
|
+
BackendMessage[BackendMessage["BindComplete"] = 50] = "BindComplete";
|
|
13
|
+
BackendMessage[BackendMessage["CloseComplete"] = 51] = "CloseComplete";
|
|
14
|
+
BackendMessage[BackendMessage["CommandComplete"] = 67] = "CommandComplete";
|
|
15
|
+
BackendMessage[BackendMessage["CopyBothResponse"] = 87] = "CopyBothResponse";
|
|
16
|
+
BackendMessage[BackendMessage["CopyData"] = 100] = "CopyData";
|
|
17
|
+
BackendMessage[BackendMessage["CopyDone"] = 99] = "CopyDone";
|
|
18
|
+
BackendMessage[BackendMessage["CopyInResponse"] = 71] = "CopyInResponse";
|
|
19
|
+
BackendMessage[BackendMessage["CopyOutResponse"] = 72] = "CopyOutResponse";
|
|
20
|
+
BackendMessage[BackendMessage["DataRow"] = 68] = "DataRow";
|
|
21
|
+
BackendMessage[BackendMessage["EmptyQueryResponse"] = 73] = "EmptyQueryResponse";
|
|
22
|
+
BackendMessage[BackendMessage["ErrorResponse"] = 69] = "ErrorResponse";
|
|
23
|
+
BackendMessage[BackendMessage["FunctionCallResponse"] = 86] = "FunctionCallResponse";
|
|
24
|
+
BackendMessage[BackendMessage["NegotiateProtocolVersion"] = 118] = "NegotiateProtocolVersion";
|
|
25
|
+
BackendMessage[BackendMessage["NoData"] = 110] = "NoData";
|
|
26
|
+
BackendMessage[BackendMessage["NoticeResponse"] = 78] = "NoticeResponse";
|
|
27
|
+
BackendMessage[BackendMessage["NotificationResponse"] = 65] = "NotificationResponse";
|
|
28
|
+
BackendMessage[BackendMessage["ParameterDescription"] = 116] = "ParameterDescription";
|
|
29
|
+
BackendMessage[BackendMessage["ParameterStatus"] = 83] = "ParameterStatus";
|
|
30
|
+
BackendMessage[BackendMessage["ParseComplete"] = 49] = "ParseComplete";
|
|
31
|
+
BackendMessage[BackendMessage["PortalSuspended"] = 115] = "PortalSuspended";
|
|
32
|
+
BackendMessage[BackendMessage["ReadyForQuery"] = 90] = "ReadyForQuery";
|
|
33
|
+
BackendMessage[BackendMessage["RowDescription"] = 84] = "RowDescription";
|
|
34
|
+
})(BackendMessage || (BackendMessage = {}));
|
|
35
|
+
//# sourceMappingURL=backend-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend-message.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/backend-message.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,cAyBX;AAzBD,WAAY,cAAc;IACxB,wEAAmB,CAAA;IACnB,wEAAmB,CAAA;IACnB,oEAAiB,CAAA;IACjB,sEAAkB,CAAA;IAClB,0EAAoB,CAAA;IACpB,4EAAqB,CAAA;IACrB,6DAAc,CAAA;IACd,4DAAa,CAAA;IACb,wEAAmB,CAAA;IACnB,0EAAoB,CAAA;IACpB,0DAAY,CAAA;IACZ,gFAAuB,CAAA;IACvB,sEAAkB,CAAA;IAClB,oFAAyB,CAAA;IACzB,6FAA8B,CAAA;IAC9B,yDAAY,CAAA;IACZ,wEAAmB,CAAA;IACnB,oFAAyB,CAAA;IACzB,qFAA0B,CAAA;IAC1B,0EAAoB,CAAA;IACpB,sEAAkB,CAAA;IAClB,2EAAqB,CAAA;IACrB,sEAAkB,CAAA;IAClB,wEAAmB,CAAA;AACrB,CAAC,EAzBW,cAAc,KAAd,cAAc,QAyBzB"}
|
|
@@ -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
|
+
export var ChannelBinding;
|
|
9
|
+
(function (ChannelBinding) {
|
|
10
|
+
ChannelBinding["Disable"] = "disable";
|
|
11
|
+
ChannelBinding["Prefer"] = "prefer";
|
|
12
|
+
ChannelBinding["Require"] = "require";
|
|
13
|
+
})(ChannelBinding || (ChannelBinding = {}));
|
|
14
|
+
//# sourceMappingURL=channel-binding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-binding.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/channel-binding.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;AACrB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
export var CursorAction;
|
|
9
|
+
(function (CursorAction) {
|
|
10
|
+
CursorAction["Next"] = "next";
|
|
11
|
+
CursorAction["Close"] = "close";
|
|
12
|
+
})(CursorAction || (CursorAction = {}));
|
|
13
|
+
//# sourceMappingURL=cursor-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-action.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/cursor-action.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,+BAAe,CAAA;AACjB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB"}
|
|
@@ -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
|
+
export var ExchangeKind;
|
|
9
|
+
(function (ExchangeKind) {
|
|
10
|
+
ExchangeKind["Query"] = "query";
|
|
11
|
+
ExchangeKind["Describe"] = "describe";
|
|
12
|
+
ExchangeKind["Simple"] = "simple";
|
|
13
|
+
ExchangeKind["Local"] = "local";
|
|
14
|
+
ExchangeKind["Internal"] = "internal";
|
|
15
|
+
ExchangeKind["Step"] = "step";
|
|
16
|
+
})(ExchangeKind || (ExchangeKind = {}));
|
|
17
|
+
//# sourceMappingURL=exchange-kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exchange-kind.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/exchange-kind.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;IACjB,+BAAe,CAAA;IACf,qCAAqB,CAAA;IACrB,6BAAa,CAAA;AACf,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
export var FrontendMessage;
|
|
9
|
+
(function (FrontendMessage) {
|
|
10
|
+
FrontendMessage[FrontendMessage["Bind"] = 66] = "Bind";
|
|
11
|
+
FrontendMessage[FrontendMessage["Close"] = 67] = "Close";
|
|
12
|
+
FrontendMessage[FrontendMessage["CopyData"] = 100] = "CopyData";
|
|
13
|
+
FrontendMessage[FrontendMessage["CopyDone"] = 99] = "CopyDone";
|
|
14
|
+
FrontendMessage[FrontendMessage["CopyFail"] = 102] = "CopyFail";
|
|
15
|
+
FrontendMessage[FrontendMessage["Describe"] = 68] = "Describe";
|
|
16
|
+
FrontendMessage[FrontendMessage["Execute"] = 69] = "Execute";
|
|
17
|
+
FrontendMessage[FrontendMessage["Flush"] = 72] = "Flush";
|
|
18
|
+
FrontendMessage[FrontendMessage["Parse"] = 80] = "Parse";
|
|
19
|
+
FrontendMessage[FrontendMessage["Password"] = 112] = "Password";
|
|
20
|
+
FrontendMessage[FrontendMessage["Query"] = 81] = "Query";
|
|
21
|
+
FrontendMessage[FrontendMessage["Sync"] = 83] = "Sync";
|
|
22
|
+
FrontendMessage[FrontendMessage["Terminate"] = 88] = "Terminate";
|
|
23
|
+
})(FrontendMessage || (FrontendMessage = {}));
|
|
24
|
+
//# sourceMappingURL=frontend-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontend-message.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/frontend-message.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,eAcX;AAdD,WAAY,eAAe;IACzB,sDAAS,CAAA;IACT,wDAAU,CAAA;IACV,+DAAc,CAAA;IACd,8DAAa,CAAA;IACb,+DAAc,CAAA;IACd,8DAAa,CAAA;IACb,4DAAY,CAAA;IACZ,wDAAU,CAAA;IACV,wDAAU,CAAA;IACV,+DAAc,CAAA;IACd,wDAAU,CAAA;IACV,sDAAS,CAAA;IACT,gEAAc,CAAA;AAChB,CAAC,EAdW,eAAe,KAAf,eAAe,QAc1B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
export var LeaseKind;
|
|
9
|
+
(function (LeaseKind) {
|
|
10
|
+
LeaseKind["Reserve"] = "reserve";
|
|
11
|
+
LeaseKind["Transaction"] = "transaction";
|
|
12
|
+
})(LeaseKind || (LeaseKind = {}));
|
|
13
|
+
//# sourceMappingURL=lease-kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lease-kind.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/lease-kind.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,wCAA2B,CAAA;AAC7B,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
export var MessageTarget;
|
|
9
|
+
(function (MessageTarget) {
|
|
10
|
+
MessageTarget[MessageTarget["Portal"] = 80] = "Portal";
|
|
11
|
+
MessageTarget[MessageTarget["Statement"] = 83] = "Statement";
|
|
12
|
+
})(MessageTarget || (MessageTarget = {}));
|
|
13
|
+
//# sourceMappingURL=message-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-target.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/message-target.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,sDAAW,CAAA;IACX,4DAAc,CAAA;AAChB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"}
|
|
@@ -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
|
+
export var PreparedState;
|
|
9
|
+
(function (PreparedState) {
|
|
10
|
+
PreparedState["Parsing"] = "parsing";
|
|
11
|
+
PreparedState["Ready"] = "ready";
|
|
12
|
+
PreparedState["Stale"] = "stale";
|
|
13
|
+
})(PreparedState || (PreparedState = {}));
|
|
14
|
+
//# sourceMappingURL=prepared-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepared-state.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/prepared-state.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;IACf,gCAAe,CAAA;AACjB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB"}
|
|
@@ -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
|
+
export var RowMode;
|
|
9
|
+
(function (RowMode) {
|
|
10
|
+
RowMode["Object"] = "object";
|
|
11
|
+
RowMode["Raw"] = "raw";
|
|
12
|
+
RowMode["Values"] = "values";
|
|
13
|
+
})(RowMode || (RowMode = {}));
|
|
14
|
+
//# sourceMappingURL=row-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-mode.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/row-mode.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,4BAAiB,CAAA;IACjB,sBAAW,CAAA;IACX,4BAAiB,CAAA;AACnB,CAAC,EAJW,OAAO,KAAP,OAAO,QAIlB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export var SslMode;
|
|
9
|
+
(function (SslMode) {
|
|
10
|
+
SslMode["Disable"] = "disable";
|
|
11
|
+
SslMode["Prefer"] = "prefer";
|
|
12
|
+
SslMode["Require"] = "require";
|
|
13
|
+
SslMode["VerifyCa"] = "verify-ca";
|
|
14
|
+
SslMode["VerifyFull"] = "verify-full";
|
|
15
|
+
})(SslMode || (SslMode = {}));
|
|
16
|
+
//# sourceMappingURL=ssl-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssl-mode.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/ssl-mode.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,OAMX;AAND,WAAY,OAAO;IACjB,8BAAmB,CAAA;IACnB,4BAAiB,CAAA;IACjB,8BAAmB,CAAA;IACnB,iCAAsB,CAAA;IACtB,qCAA0B,CAAA;AAC5B,CAAC,EANW,OAAO,KAAP,OAAO,QAMlB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
export var TokenKind;
|
|
9
|
+
(function (TokenKind) {
|
|
10
|
+
TokenKind["None"] = "None";
|
|
11
|
+
TokenKind["Operand"] = "Operand";
|
|
12
|
+
TokenKind["Keyword"] = "Keyword";
|
|
13
|
+
TokenKind["Other"] = "Other";
|
|
14
|
+
})(TokenKind || (TokenKind = {}));
|
|
15
|
+
//# sourceMappingURL=token-kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-kind.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/token-kind.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,0BAAa,CAAA;IACb,gCAAmB,CAAA;IACnB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;AACjB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB"}
|
|
@@ -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
|
+
export var TransactionStatus;
|
|
9
|
+
(function (TransactionStatus) {
|
|
10
|
+
TransactionStatus["Idle"] = "I";
|
|
11
|
+
TransactionStatus["Transaction"] = "T";
|
|
12
|
+
TransactionStatus["Failed"] = "E";
|
|
13
|
+
})(TransactionStatus || (TransactionStatus = {}));
|
|
14
|
+
//# sourceMappingURL=transaction-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-status.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/transaction-status.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,+BAAU,CAAA;IACV,sCAAiB,CAAA;IACjB,iCAAY,CAAA;AACd,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B"}
|
|
@@ -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
|
+
export var WriteOutcome;
|
|
9
|
+
(function (WriteOutcome) {
|
|
10
|
+
WriteOutcome["Written"] = "written";
|
|
11
|
+
WriteOutcome["Held"] = "held";
|
|
12
|
+
WriteOutcome["Skipped"] = "skipped";
|
|
13
|
+
})(WriteOutcome || (WriteOutcome = {}));
|
|
14
|
+
//# sourceMappingURL=write-outcome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-outcome.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql.postgresql/src/enums/write-outcome.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,6BAAa,CAAA;IACb,mCAAmB,CAAA;AACrB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
import { ExceptionOptions } from "@noldova/context.exceptions";
|
|
10
|
+
import { Resources } from "../resources.js";
|
|
11
|
+
export class BatchSkippedException extends DataException {
|
|
12
|
+
name = "BatchSkippedException";
|
|
13
|
+
index;
|
|
14
|
+
constructor(index, cause) {
|
|
15
|
+
super(Resources.formatBatchSkipped(index), new ExceptionOptions(cause));
|
|
16
|
+
this.index = index;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=batch-skipped.exception.js.map
|
|
@@ -0,0 +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;IAC7B,IAAI,GAAW,uBAAuB,CAAC;IAChD,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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
import { ExceptionOptions } from "@noldova/context.exceptions";
|
|
10
|
+
import { Resources } from "../resources.js";
|
|
11
|
+
export class BatchException extends DataException {
|
|
12
|
+
name = "BatchException";
|
|
13
|
+
index;
|
|
14
|
+
constructor(index, cause) {
|
|
15
|
+
super(Resources.formatBatchFailed(index), new ExceptionOptions(cause));
|
|
16
|
+
this.index = index;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=batch.exception.js.map
|
|
@@ -0,0 +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;IACtB,IAAI,GAAW,gBAAgB,CAAC;IACzC,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,20 @@
|
|
|
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
|
+
import { Resources } from "../resources.js";
|
|
10
|
+
export class CancelUnansweredException extends DataException {
|
|
11
|
+
name = "CancelUnansweredException";
|
|
12
|
+
seconds;
|
|
13
|
+
silent;
|
|
14
|
+
constructor(seconds, silent) {
|
|
15
|
+
super(silent ? Resources.formatCancelSilent(seconds) : Resources.formatCancelUnanswered(seconds));
|
|
16
|
+
this.seconds = seconds;
|
|
17
|
+
this.silent = silent;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=cancel-unanswered.exception.js.map
|
|
@@ -0,0 +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;IACjC,IAAI,GAAW,2BAA2B,CAAC;IACpD,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"}
|