@smart-data-engines/sde 0.1.0-dev.0

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 (131) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +13 -0
  3. package/README.md +153 -0
  4. package/bin/weather.mjs +32 -0
  5. package/dist/_usage.d.ts +30 -0
  6. package/dist/_usage.js +194 -0
  7. package/dist/_usage.js.map +1 -0
  8. package/dist/bulk.d.ts +9 -0
  9. package/dist/bulk.js +83 -0
  10. package/dist/bulk.js.map +1 -0
  11. package/dist/canonical.d.ts +46 -0
  12. package/dist/canonical.js +150 -0
  13. package/dist/canonical.js.map +1 -0
  14. package/dist/capabilities.d.ts +48 -0
  15. package/dist/capabilities.js +62 -0
  16. package/dist/capabilities.js.map +1 -0
  17. package/dist/cutover.d.ts +36 -0
  18. package/dist/cutover.js +219 -0
  19. package/dist/cutover.js.map +1 -0
  20. package/dist/demo/model.d.ts +28 -0
  21. package/dist/demo/model.js +40 -0
  22. package/dist/demo/model.js.map +1 -0
  23. package/dist/demo/project.d.ts +19 -0
  24. package/dist/demo/project.js +128 -0
  25. package/dist/demo/project.js.map +1 -0
  26. package/dist/demo/weather.d.ts +73 -0
  27. package/dist/demo/weather.js +334 -0
  28. package/dist/demo/weather.js.map +1 -0
  29. package/dist/engines/_clickhouse-connection.d.ts +17 -0
  30. package/dist/engines/_clickhouse-connection.js +182 -0
  31. package/dist/engines/_clickhouse-connection.js.map +1 -0
  32. package/dist/engines/_tls-peer-identity.d.ts +2 -0
  33. package/dist/engines/_tls-peer-identity.js +23 -0
  34. package/dist/engines/_tls-peer-identity.js.map +1 -0
  35. package/dist/engines/_write-fences.d.ts +51 -0
  36. package/dist/engines/_write-fences.js +189 -0
  37. package/dist/engines/_write-fences.js.map +1 -0
  38. package/dist/engines/clickhouse.d.ts +193 -0
  39. package/dist/engines/clickhouse.js +899 -0
  40. package/dist/engines/clickhouse.js.map +1 -0
  41. package/dist/engines/postgres.d.ts +293 -0
  42. package/dist/engines/postgres.js +981 -0
  43. package/dist/engines/postgres.js.map +1 -0
  44. package/dist/errors.d.ts +89 -0
  45. package/dist/errors.js +90 -0
  46. package/dist/errors.js.map +1 -0
  47. package/dist/frozen-verification.d.ts +26 -0
  48. package/dist/frozen-verification.js +67 -0
  49. package/dist/frozen-verification.js.map +1 -0
  50. package/dist/generation.d.ts +34 -0
  51. package/dist/generation.js +81 -0
  52. package/dist/generation.js.map +1 -0
  53. package/dist/groups.d.ts +17 -0
  54. package/dist/groups.js +66 -0
  55. package/dist/groups.js.map +1 -0
  56. package/dist/hashing.d.ts +68 -0
  57. package/dist/hashing.js +146 -0
  58. package/dist/hashing.js.map +1 -0
  59. package/dist/in-place-index.d.ts +43 -0
  60. package/dist/in-place-index.js +272 -0
  61. package/dist/in-place-index.js.map +1 -0
  62. package/dist/index.d.ts +79 -0
  63. package/dist/index.js +64 -0
  64. package/dist/index.js.map +1 -0
  65. package/dist/inspection.d.ts +19 -0
  66. package/dist/inspection.js +31 -0
  67. package/dist/inspection.js.map +1 -0
  68. package/dist/internal.d.ts +42 -0
  69. package/dist/internal.js +56 -0
  70. package/dist/internal.js.map +1 -0
  71. package/dist/layout.d.ts +36 -0
  72. package/dist/layout.js +62 -0
  73. package/dist/layout.js.map +1 -0
  74. package/dist/migration.d.ts +197 -0
  75. package/dist/migration.js +592 -0
  76. package/dist/migration.js.map +1 -0
  77. package/dist/model.d.ts +93 -0
  78. package/dist/model.js +313 -0
  79. package/dist/model.js.map +1 -0
  80. package/dist/physical.d.ts +128 -0
  81. package/dist/physical.js +421 -0
  82. package/dist/physical.js.map +1 -0
  83. package/dist/placement.d.ts +157 -0
  84. package/dist/placement.js +651 -0
  85. package/dist/placement.js.map +1 -0
  86. package/dist/provisioning.d.ts +6 -0
  87. package/dist/provisioning.js +45 -0
  88. package/dist/provisioning.js.map +1 -0
  89. package/dist/query.d.ts +68 -0
  90. package/dist/query.js +340 -0
  91. package/dist/query.js.map +1 -0
  92. package/dist/routing.d.ts +25 -0
  93. package/dist/routing.js +35 -0
  94. package/dist/routing.js.map +1 -0
  95. package/dist/schema.d.ts +110 -0
  96. package/dist/schema.js +337 -0
  97. package/dist/schema.js.map +1 -0
  98. package/dist/session.d.ts +195 -0
  99. package/dist/session.js +870 -0
  100. package/dist/session.js.map +1 -0
  101. package/dist/shapes.d.ts +30 -0
  102. package/dist/shapes.js +112 -0
  103. package/dist/shapes.js.map +1 -0
  104. package/dist/staging.d.ts +29 -0
  105. package/dist/staging.js +214 -0
  106. package/dist/staging.js.map +1 -0
  107. package/dist/telemetry.d.ts +468 -0
  108. package/dist/telemetry.js +872 -0
  109. package/dist/telemetry.js.map +1 -0
  110. package/dist/testing/loader.d.ts +38 -0
  111. package/dist/testing/loader.js +86 -0
  112. package/dist/testing/loader.js.map +1 -0
  113. package/dist/testing/memory.d.ts +131 -0
  114. package/dist/testing/memory.js +311 -0
  115. package/dist/testing/memory.js.map +1 -0
  116. package/dist/timestamp.d.ts +20 -0
  117. package/dist/timestamp.js +89 -0
  118. package/dist/timestamp.js.map +1 -0
  119. package/dist/types.d.ts +79 -0
  120. package/dist/types.js +100 -0
  121. package/dist/types.js.map +1 -0
  122. package/dist/verification.d.ts +41 -0
  123. package/dist/verification.js +169 -0
  124. package/dist/verification.js.map +1 -0
  125. package/dist/watermark.d.ts +103 -0
  126. package/dist/watermark.js +170 -0
  127. package/dist/watermark.js.map +1 -0
  128. package/dist/write-fence.d.ts +58 -0
  129. package/dist/write-fence.js +225 -0
  130. package/dist/write-fence.js.map +1 -0
  131. package/package.json +86 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clickhouse.js","sourceRoot":"","sources":["../../src/engines/clickhouse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,M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O,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAA;IACtD,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAA;IACxD,IAAI,KAAK,YAAY,SAAS,IAAI,KAAK,YAAY,IAAI;QAAE,OAAO,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAA;IAC9F,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAA;IAC9F,MAAM,IAAI,WAAW,CACnB,uBAAuB,OAAO,KAAK,wDAAwD;QACzF,wEAAwE,CAC3E,CAAA;AACH,CAAC;AAED,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC/D,CAAC"}
@@ -0,0 +1,293 @@
1
+ /**
2
+ * PostgreSQL adapter.
3
+ *
4
+ * Three rules run through everything here, and all three come from the requirements rather than
5
+ * from taste.
6
+ *
7
+ * **A failed write is reported, never worked around.** No retry into another engine, no swallowing,
8
+ * no "eventually consistent" story invented on the spot. If the source engine for a group will not
9
+ * take the write, the client's code finds out. The library swallows its *own* internal problems -
10
+ * routing, telemetry - because a bug of ours must not take down someone's application, but a write
11
+ * that did not happen is not our internal problem and reporting success for it would be the worst
12
+ * thing this library could do.
13
+ *
14
+ * **Identifiers are quoted, always.** Not for injection - identifiers come from the placement map,
15
+ * not from user input - but because entity names may contain non-ASCII characters, and an unquoted
16
+ * identifier in PostgreSQL is folded to lower case in a way that is lossy for some of them. The
17
+ * quoting function is bound from `schema.ts` rather than written again, so DDL and DML cannot
18
+ * disagree about how an identifier is escaped.
19
+ *
20
+ * **Values are converted per row, from the field types the server sent.** `pg` offers a global type
21
+ * parser registry, and using it would be the shortest path and the wrong one: this library goes
22
+ * into somebody else's application, so registering a parser would change how *their* other queries
23
+ * come back. The reference implementation has no equivalent temptation, which is why the rule is
24
+ * written down here.
25
+ *
26
+ * The driver is `pg`, and it is an **optional peer dependency**. A client who never places a group
27
+ * in PostgreSQL should not have it in their tree, and a client who has it already should keep the
28
+ * version they chose - the core of this library has no runtime dependencies at all, because every
29
+ * one of them would be a dependency they inherit and a version conflict they may have to resolve.
30
+ */
31
+ import { type ReadColumn, type ReadPlan } from '../query.js';
32
+ import type { PhysicalFinding } from '../physical.js';
33
+ import type { PhysicalLayout } from '../placement.js';
34
+ import type { Row } from '../session.js';
35
+ import { WriteFence } from '../write-fence.js';
36
+ /**
37
+ * Milliseconds. Not a guess about networks: this bounds *opening* a connection, which either
38
+ * completes in milliseconds on a healthy link or is not going to complete.
39
+ *
40
+ * Ten seconds leaves room for a saturated cross-region hop and still fails long before a request
41
+ * timeout a caller sets. It is a **default** rather than a rule - a `connect_timeout` in the DSN
42
+ * wins - and it exists because the alternative, measured against a socket that accepts TCP and says
43
+ * nothing, is a call that never returns. Queries are deliberately not bounded: an analytical query
44
+ * legitimately takes minutes and a library that timed it out would be deciding something about the
45
+ * caller's workload.
46
+ */
47
+ export declare const CONNECT_TIMEOUT_MS = 10000;
48
+ export interface PostgresOptions {
49
+ /**
50
+ * The `pg` module, for a caller who has it under a different name or wants to hand in a double.
51
+ *
52
+ * Loaded with a dynamic import when absent, which is what keeps it an optional dependency: a
53
+ * client who never places a group in PostgreSQL never resolves it.
54
+ */
55
+ readonly driver?: unknown;
56
+ }
57
+ export declare class PostgresEngine {
58
+ private readonly dsn;
59
+ private readonly options;
60
+ readonly dialect = "postgres";
61
+ private client;
62
+ private transactions;
63
+ private savepoint;
64
+ private readonly usage;
65
+ private unusable;
66
+ /**
67
+ * The asynchronous failure the driver reported, if any, kept for the next call to explain.
68
+ *
69
+ * **This exists because an unhandled `'error'` event kills the client's process.** `pg.Client` is
70
+ * an `EventEmitter`, and it emits `'error'` when the server terminates the connection between
71
+ * queries - a restart, a failover, an administrator. Node's rule for an `'error'` event with no
72
+ * listener is to throw it, so a library that did not listen would turn a database restart into
73
+ * `Error: Connection terminated unexpectedly` from inside somebody's event loop, with no call of
74
+ * theirs on the stack and nothing to catch it.
75
+ *
76
+ * Found by the test that measures the *message* after a cut connection: the assertion failed and
77
+ * took eight unrelated tests with it, which is a mild version of what a client would have seen.
78
+ * The reference implementation has no equivalent hazard - psycopg raises at the next call and
79
+ * emits nothing - so this is the one place where "same contract, different runtime" means extra
80
+ * code rather than a translation.
81
+ */
82
+ private lost;
83
+ constructor(dsn: string, options?: PostgresOptions);
84
+ /**
85
+ * Open the connection, with a bound on how long that may take.
86
+ *
87
+ * Measured in the reference implementation before this bound existed: a host that accepts the TCP
88
+ * connection and never answers hung the call **for as long as the test was willing to wait**.
89
+ * That is not an exotic case - it is a firewall that accepts, a load balancer with no healthy
90
+ * backend, a server mid-restart - and without a bound it happens inside the caller's request path
91
+ * with nothing to time out.
92
+ *
93
+ * The default is only applied when the caller has not chosen one. A `connect_timeout` in the DSN
94
+ * is their decision about their own network and this must not override it - see
95
+ * {@link connectBound}, where honouring it costs more work here than it does in the reference.
96
+ */
97
+ connect(): Promise<void>;
98
+ close(): Promise<void>;
99
+ private get cx();
100
+ /**
101
+ * The driver's message, plus the one sentence it cannot know to add.
102
+ *
103
+ * Measured in the reference: cut the connection under a live session and the first failing call
104
+ * reports what the server said, which is right. **Every call after it reports only that the
105
+ * connection is closed** - true, unhelpful, and the point at which a reader needs to be told that
106
+ * this library holds the connection it was handed and does not reopen it. Reconnecting is one line
107
+ * and it is the caller's, because a library that silently reconnected would also silently retry.
108
+ */
109
+ private explain;
110
+ private run;
111
+ private rowsOf;
112
+ /** DDL capability; use a dedicated connection separate from application traffic. */
113
+ writeFence(table: string, options: {
114
+ projectId: string;
115
+ }): WriteFence;
116
+ /**
117
+ * Create what is missing, change nothing that exists.
118
+ *
119
+ * Idempotent on purpose: an application restarting must not reapply DDL, and two instances
120
+ * starting at once must not race. Anything beyond creation - altering a column, dropping an
121
+ * index - is a migration, which is the orchestrator's job and carries a safety classification.
122
+ */
123
+ ensureSchema(layout: PhysicalLayout, options: {
124
+ readonly keys: Readonly<Record<string, readonly string[]>>;
125
+ }): Promise<PhysicalFinding[]>;
126
+ private execute;
127
+ /**
128
+ * Check that what exists is what the map describes, because `IF NOT EXISTS` does not.
129
+ *
130
+ * `CREATE TABLE IF NOT EXISTS` accepts a table of that name whatever shape it is in, so a table
131
+ * left over from something else - an older map, another application, a migration run by hand - is
132
+ * silently kept and the first insert fails with `column "at" does not exist`. That error names a
133
+ * column and not the cause, and it arrives in the client's request path rather than at startup.
134
+ *
135
+ * A **missing** column is refused: writes through this map cannot work. An **extra** column is
136
+ * allowed - a client may have added one outside SDE, the map does not name it, writes are
137
+ * unaffected, and refusing would make this library an obstacle to work it has no opinion about.
138
+ *
139
+ * **Types as well as names, since 7 September 2026.** The earlier version checked names only,
140
+ * on the true observation that `information_schema.data_type` reports `numeric` for a
141
+ * `numeric(8,2)` column - a correct statement about the wrong catalogue.
142
+ * `pg_catalog.format_type(atttypid, atttypmod)` reports the canonical type *with* its modifier,
143
+ * and measured against every type this library renders, eleven of thirteen come back as the
144
+ * exact string we wrote. What that cost while it was names-only, measured: a table whose `at`
145
+ * column is **`text`** where the map says `timestamptz` passed and was called a good schema.
146
+ */
147
+ /** Check existing physical columns without issuing DDL; report the physical design. */
148
+ validateSchema(layout: PhysicalLayout, options?: {
149
+ readonly keys?: Readonly<Record<string, readonly string[]>>;
150
+ }): Promise<PhysicalFinding[]>;
151
+ /**
152
+ * Primary key order and each declared index's method and columns, from `pg_index`.
153
+ *
154
+ * `CREATE INDEX IF NOT EXISTS ... USING brin` keeps an existing B-tree of that name - measured -
155
+ * so the method is read back rather than assumed from the statement that ran. An index with a
156
+ * predicate, an expression or INCLUDE columns is not the index a layout declares, however its
157
+ * name reads. The catalogues are readable by any login, so this needs no grant.
158
+ */
159
+ private physicalFindings;
160
+ private verifySchema;
161
+ /**
162
+ * Whether two PostgreSQL type spellings denote the same type. Asked of the server.
163
+ *
164
+ * Literal first, which is the answer for every type this library renders except the two
165
+ * timestamps. When that fails the server is asked: `to_regtype` resolves an alias to the type it
166
+ * names, so `timestamptz` and `timestamp with time zone` come back equal without this file
167
+ * holding an alias table that could fall behind the renderer.
168
+ *
169
+ * **A modifier makes a literal mismatch a real one.** `to_regtype` discards modifiers, so
170
+ * `numeric(12,2)` and `numeric(8,2)` would both resolve to `numeric` and a precision change
171
+ * would read as agreement - which is the one difference this check exists to catch.
172
+ */
173
+ private sameType;
174
+ insert(table: string, values: Readonly<Row>): Promise<void>;
175
+ /** Ordinary application INSERT. Do not reuse copyIn's conflict suppression. */
176
+ insertMany(table: string, rows: readonly Readonly<Row>[]): Promise<void>;
177
+ get(table: string, key: Readonly<Row>): Promise<Row | null>;
178
+ selectRows(table: string, plan: ReadPlan): Promise<Row[]>;
179
+ countRows(table: string, plan: ReadPlan): Promise<bigint>;
180
+ summarizeRows(table: string, plan: ReadPlan, column: ReadColumn): Promise<Readonly<Row>>;
181
+ /**
182
+ * Each table's bytes and its secondary index bytes, from the catalogue. Numbers only.
183
+ *
184
+ * `pg_total_relation_size` - the table, its TOAST and every index - and the indexes other than
185
+ * the primary key, one statement for every table named. A name the connection does not resolve is
186
+ * absent rather than a zero: a missing table is not an empty one. A login with only SELECT and
187
+ * INSERT on the table reads the same numbers as the administrator (measured on PostgreSQL 15).
188
+ */
189
+ storageSizes(tables: readonly string[]): Promise<Map<string, readonly [number, number]>>;
190
+ count(table: string): Promise<number>;
191
+ /**
192
+ * The highest map version applied against this engine, creating the table if missing.
193
+ *
194
+ * An existing table needs only read privileges. CREATE IF NOT EXISTS still requires schema
195
+ * CREATE even when the table exists; lazy creation is retained only for an absent table.
196
+ */
197
+ mapWatermark(): Promise<number | null>;
198
+ /**
199
+ * Append. Never update, so there is nothing to contend over and nothing to lose.
200
+ *
201
+ * The timestamp comes from the engine's own `now()` rather than from this process: an audit column
202
+ * wants the clock of the thing being audited, and this library reading a clock is a thing its
203
+ * tests would then have to work around.
204
+ */
205
+ recordMapVersion(version: number, options: {
206
+ readonly modelVersion: string;
207
+ }): Promise<void>;
208
+ /**
209
+ * Rows in key order, strictly after one key and up to another inclusive.
210
+ *
211
+ * Row-value comparison - `(a, b) > ($1, $2)` - rather than a hand-rolled disjunction over the
212
+ * key's columns. The disjunction is where composite-key pagination goes wrong, and it goes wrong
213
+ * by skipping rows.
214
+ *
215
+ * The bounds are asymmetric on purpose. `after` is exclusive because it is a resume point: the row
216
+ * it names has been dealt with. `upto` is inclusive because it names the last row of a chunk read
217
+ * from somewhere else, and that row is one this range has to include.
218
+ */
219
+ keyRange(table: string, order: readonly string[], options?: {
220
+ readonly after?: readonly unknown[];
221
+ readonly upto?: readonly unknown[];
222
+ readonly limit?: number;
223
+ }): Promise<Row[]>;
224
+ /**
225
+ * The key of the `position`-th row in key order, one-based, or null if there is no such row.
226
+ *
227
+ * An `OFFSET` scan, which is the expensive kind of query, and it is here because it is paid **once
228
+ * per resume** rather than once per chunk. See `migration.ts` for why the marker is a row count
229
+ * and not a key.
230
+ */
231
+ nthKey(table: string, order: readonly string[], options: {
232
+ readonly position: number;
233
+ }): Promise<unknown[] | null>;
234
+ /**
235
+ * Insert rows, skipping any whose key is already there.
236
+ *
237
+ * `ON CONFLICT DO NOTHING` is what makes a backfill chunk **idempotent**, and idempotence is what
238
+ * makes it resumable: the marker is written after the chunk, so a crash in between costs a recopy
239
+ * and never a lost row. Without it the recopy would be a primary-key violation and the safe
240
+ * failure mode would become the loud one.
241
+ *
242
+ * The bare form, with no conflict target, so it covers the primary key and any unique index the
243
+ * layout asked for. Naming the key here would mean deriving it a second time.
244
+ */
245
+ copyIn(table: string, rows: readonly Row[]): Promise<void>;
246
+ /**
247
+ * How many rows of this entity have been copied into this engine. Zero if none.
248
+ *
249
+ * `max()` over an append-only table, exactly like the map watermark, and for the same reason: no
250
+ * row to update, nothing to contend over, and identical semantics in an engine with no unique
251
+ * constraint. A stale row can never lower the marker.
252
+ */
253
+ backfillMarker(options: {
254
+ readonly materialization: string;
255
+ readonly entity: string;
256
+ }): Promise<number>;
257
+ /** Append the new marker. Never update, so an interrupted run leaves a readable trail. */
258
+ recordBackfillMarker(options: {
259
+ readonly materialization: string;
260
+ readonly entity: string;
261
+ readonly rows: number;
262
+ }): Promise<void>;
263
+ /**
264
+ * One engine, one transaction, that engine's semantics.
265
+ *
266
+ * There is no distributed transaction here and there will not be one. A client needing two
267
+ * entities to commit together declares that, and the planner puts them in the same group and
268
+ * therefore the same engine - so the requirement turns into a placement constraint instead of a
269
+ * two-phase commit. That is the trade this product makes, and it is why this method is a dozen
270
+ * lines rather than a subsystem.
271
+ */
272
+ transaction<T>(body: () => Promise<T>): Promise<T>;
273
+ }
274
+ /**
275
+ * The bound to open a connection with: the caller's, in milliseconds, or this adapter's default.
276
+ *
277
+ * **`pg` does not read `connect_timeout` from a connection string, and finding that out is the
278
+ * whole reason this function exists.** `pg-connection-string` parses the parameter into a
279
+ * `connect_timeout` property, and `pg` then *overwrites* that property from
280
+ * `connectionTimeoutMillis` - so the value a caller wrote into their DSN reaches the JavaScript
281
+ * client and is discarded. Measured, because it is not the kind of thing a signature admits.
282
+ *
283
+ * The first version of this adapter did what the reference does: apply a default unless the DSN
284
+ * already says `connect_timeout`. In psycopg that is right, because the parameter goes through to
285
+ * libpq and libpq honours it. Here it produced the worst of both - the caller's value ignored by
286
+ * the driver and this adapter's default suppressed by the caller's value - so a DSN that asked for
287
+ * a two-second bound got **no bound at all**, which is the case the bound exists for. Found by the
288
+ * test that asserts the caller's value wins, which failed by hanging until its own deadline fired.
289
+ *
290
+ * So the parameter is translated rather than deferred to. The caller's decision is honoured and a
291
+ * bound always exists, which are the two properties that were meant to hold in the first place.
292
+ */
293
+ export declare function connectBound(dsn: string): number;