turbine-orm 0.50.0 → 0.51.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 (186) hide show
  1. package/README.md +66 -66
  2. package/dist/adapters/cockroachdb.d.ts +5 -5
  3. package/dist/adapters/cockroachdb.js +10 -10
  4. package/dist/adapters/index.d.ts +5 -5
  5. package/dist/adapters/index.js +7 -7
  6. package/dist/adapters/yugabytedb.d.ts +7 -7
  7. package/dist/adapters/yugabytedb.js +10 -10
  8. package/dist/cjs/adapters/cockroachdb.d.ts +5 -5
  9. package/dist/cjs/adapters/cockroachdb.js +10 -10
  10. package/dist/cjs/adapters/index.d.ts +5 -5
  11. package/dist/cjs/adapters/index.js +7 -7
  12. package/dist/cjs/adapters/yugabytedb.d.ts +7 -7
  13. package/dist/cjs/adapters/yugabytedb.js +10 -10
  14. package/dist/cjs/cli/config.d.ts +13 -2
  15. package/dist/cjs/cli/config.js +3 -2
  16. package/dist/cjs/cli/destructive.d.ts +1 -1
  17. package/dist/cjs/cli/destructive.js +1 -1
  18. package/dist/cjs/cli/index.d.ts +10 -10
  19. package/dist/cjs/cli/index.js +49 -45
  20. package/dist/cjs/cli/loader.d.ts +7 -7
  21. package/dist/cjs/cli/loader.js +9 -9
  22. package/dist/cjs/cli/mcp.js +4 -4
  23. package/dist/cjs/cli/migrate.d.ts +5 -5
  24. package/dist/cjs/cli/migrate.js +11 -11
  25. package/dist/cjs/cli/studio-ui.generated.js +1 -1
  26. package/dist/cjs/cli/ui.d.ts +2 -2
  27. package/dist/cjs/cli/ui.js +2 -2
  28. package/dist/cjs/client.d.ts +49 -38
  29. package/dist/cjs/client.js +57 -56
  30. package/dist/cjs/dialect.d.ts +62 -18
  31. package/dist/cjs/dialect.js +40 -2
  32. package/dist/cjs/errors.d.ts +5 -5
  33. package/dist/cjs/errors.js +11 -11
  34. package/dist/cjs/generate.d.ts +6 -6
  35. package/dist/cjs/generate.js +31 -29
  36. package/dist/cjs/index-advisor.d.ts +5 -5
  37. package/dist/cjs/index-advisor.js +0 -0
  38. package/dist/cjs/index.d.ts +1 -1
  39. package/dist/cjs/index.js +7 -7
  40. package/dist/cjs/introspect.d.ts +35 -9
  41. package/dist/cjs/introspect.js +83 -32
  42. package/dist/cjs/mssql.d.ts +11 -11
  43. package/dist/cjs/mssql.js +64 -29
  44. package/dist/cjs/mysql.d.ts +8 -8
  45. package/dist/cjs/mysql.js +61 -23
  46. package/dist/cjs/nested-write.d.ts +21 -2
  47. package/dist/cjs/nested-write.js +51 -14
  48. package/dist/cjs/optional-peer-import.cjs +7 -7
  49. package/dist/cjs/optional-peer-import.d.cts +7 -7
  50. package/dist/cjs/pipeline-submittable.d.ts +2 -2
  51. package/dist/cjs/pipeline-submittable.js +6 -6
  52. package/dist/cjs/pipeline.d.ts +1 -1
  53. package/dist/cjs/pipeline.js +4 -4
  54. package/dist/cjs/powdb-introspect.d.ts +1 -1
  55. package/dist/cjs/powdb-introspect.js +1 -1
  56. package/dist/cjs/powdb.d.ts +28 -28
  57. package/dist/cjs/powdb.js +66 -66
  58. package/dist/cjs/powql.d.ts +27 -27
  59. package/dist/cjs/powql.js +73 -52
  60. package/dist/cjs/query/aggregates.d.ts +1 -1
  61. package/dist/cjs/query/aggregates.js +5 -5
  62. package/dist/cjs/query/batched-loader.d.ts +11 -11
  63. package/dist/cjs/query/batched-loader.js +24 -24
  64. package/dist/cjs/query/builder.d.ts +39 -21
  65. package/dist/cjs/query/builder.js +99 -57
  66. package/dist/cjs/query/compound-unique.d.ts +1 -1
  67. package/dist/cjs/query/compound-unique.js +0 -0
  68. package/dist/cjs/query/deferred.d.ts +12 -6
  69. package/dist/cjs/query/deferred.js +1 -1
  70. package/dist/cjs/query/filters.d.ts +31 -11
  71. package/dist/cjs/query/filters.js +67 -14
  72. package/dist/cjs/query/index.d.ts +1 -1
  73. package/dist/cjs/query/index.js +1 -1
  74. package/dist/cjs/query/relations.d.ts +9 -9
  75. package/dist/cjs/query/relations.js +164 -57
  76. package/dist/cjs/query/types.d.ts +86 -35
  77. package/dist/cjs/query/types.js +1 -1
  78. package/dist/cjs/query/utils.d.ts +27 -10
  79. package/dist/cjs/query/utils.js +86 -14
  80. package/dist/cjs/query/where.d.ts +47 -28
  81. package/dist/cjs/query/where.js +130 -31
  82. package/dist/cjs/query/writes.d.ts +24 -5
  83. package/dist/cjs/query/writes.js +102 -13
  84. package/dist/cjs/realtime.d.ts +7 -7
  85. package/dist/cjs/realtime.js +9 -9
  86. package/dist/cjs/schema-builder.d.ts +18 -7
  87. package/dist/cjs/schema-builder.js +17 -10
  88. package/dist/cjs/schema-metadata.d.ts +3 -3
  89. package/dist/cjs/schema-metadata.js +9 -9
  90. package/dist/cjs/schema-sql.d.ts +9 -9
  91. package/dist/cjs/schema-sql.js +20 -20
  92. package/dist/cjs/schema.d.ts +19 -9
  93. package/dist/cjs/schema.js +6 -6
  94. package/dist/cjs/serverless.d.ts +15 -15
  95. package/dist/cjs/serverless.js +16 -16
  96. package/dist/cjs/sqlite.d.ts +8 -8
  97. package/dist/cjs/sqlite.js +53 -22
  98. package/dist/cjs/typed-sql.d.ts +4 -4
  99. package/dist/cjs/typed-sql.js +5 -5
  100. package/dist/cli/config.d.ts +13 -2
  101. package/dist/cli/config.js +3 -2
  102. package/dist/cli/destructive.d.ts +1 -1
  103. package/dist/cli/destructive.js +1 -1
  104. package/dist/cli/index.d.ts +10 -10
  105. package/dist/cli/index.js +49 -45
  106. package/dist/cli/loader.d.ts +7 -7
  107. package/dist/cli/loader.js +9 -9
  108. package/dist/cli/mcp.js +4 -4
  109. package/dist/cli/migrate.d.ts +5 -5
  110. package/dist/cli/migrate.js +11 -11
  111. package/dist/cli/studio-ui.generated.js +1 -1
  112. package/dist/cli/ui.d.ts +2 -2
  113. package/dist/cli/ui.js +2 -2
  114. package/dist/client.d.ts +49 -38
  115. package/dist/client.js +57 -56
  116. package/dist/dialect.d.ts +62 -18
  117. package/dist/dialect.js +40 -2
  118. package/dist/errors.d.ts +5 -5
  119. package/dist/errors.js +11 -11
  120. package/dist/generate.d.ts +6 -6
  121. package/dist/generate.js +31 -29
  122. package/dist/index-advisor.d.ts +5 -5
  123. package/dist/index-advisor.js +0 -0
  124. package/dist/index.d.ts +1 -1
  125. package/dist/index.js +7 -7
  126. package/dist/introspect.d.ts +35 -9
  127. package/dist/introspect.js +82 -32
  128. package/dist/mssql.d.ts +11 -11
  129. package/dist/mssql.js +64 -29
  130. package/dist/mysql.d.ts +8 -8
  131. package/dist/mysql.js +61 -23
  132. package/dist/nested-write.d.ts +21 -2
  133. package/dist/nested-write.js +51 -14
  134. package/dist/optional-peer-import.cjs +7 -7
  135. package/dist/optional-peer-import.d.cts +7 -7
  136. package/dist/pipeline-submittable.d.ts +2 -2
  137. package/dist/pipeline-submittable.js +6 -6
  138. package/dist/pipeline.d.ts +1 -1
  139. package/dist/pipeline.js +4 -4
  140. package/dist/powdb-introspect.d.ts +1 -1
  141. package/dist/powdb-introspect.js +1 -1
  142. package/dist/powdb.d.ts +28 -28
  143. package/dist/powdb.js +66 -66
  144. package/dist/powql.d.ts +27 -27
  145. package/dist/powql.js +73 -52
  146. package/dist/query/aggregates.d.ts +1 -1
  147. package/dist/query/aggregates.js +5 -5
  148. package/dist/query/batched-loader.d.ts +11 -11
  149. package/dist/query/batched-loader.js +24 -24
  150. package/dist/query/builder.d.ts +39 -21
  151. package/dist/query/builder.js +100 -58
  152. package/dist/query/compound-unique.d.ts +1 -1
  153. package/dist/query/compound-unique.js +0 -0
  154. package/dist/query/deferred.d.ts +12 -6
  155. package/dist/query/deferred.js +1 -1
  156. package/dist/query/filters.d.ts +31 -11
  157. package/dist/query/filters.js +66 -13
  158. package/dist/query/index.d.ts +1 -1
  159. package/dist/query/index.js +1 -1
  160. package/dist/query/relations.d.ts +9 -9
  161. package/dist/query/relations.js +165 -58
  162. package/dist/query/types.d.ts +86 -35
  163. package/dist/query/types.js +1 -1
  164. package/dist/query/utils.d.ts +27 -10
  165. package/dist/query/utils.js +84 -14
  166. package/dist/query/where.d.ts +47 -28
  167. package/dist/query/where.js +129 -32
  168. package/dist/query/writes.d.ts +24 -5
  169. package/dist/query/writes.js +101 -13
  170. package/dist/realtime.d.ts +7 -7
  171. package/dist/realtime.js +9 -9
  172. package/dist/schema-builder.d.ts +18 -7
  173. package/dist/schema-builder.js +17 -10
  174. package/dist/schema-metadata.d.ts +3 -3
  175. package/dist/schema-metadata.js +9 -9
  176. package/dist/schema-sql.d.ts +9 -9
  177. package/dist/schema-sql.js +20 -20
  178. package/dist/schema.d.ts +19 -9
  179. package/dist/schema.js +6 -6
  180. package/dist/serverless.d.ts +15 -15
  181. package/dist/serverless.js +16 -16
  182. package/dist/sqlite.d.ts +8 -8
  183. package/dist/sqlite.js +53 -22
  184. package/dist/typed-sql.d.ts +4 -4
  185. package/dist/typed-sql.js +5 -5
  186. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
1
  /**
2
- * turbine-orm CLI UI utilities
2
+ * turbine-orm CLI, UI utilities
3
3
  *
4
4
  * ANSI colors, spinners, box-drawing, and formatting helpers.
5
- * Zero dependencies raw escape codes only.
5
+ * Zero dependencies, raw escape codes only.
6
6
  */
7
7
  export declare const bold: (s: string) => string;
8
8
  export declare const dim: (s: string) => string;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  /**
3
- * turbine-orm CLI UI utilities
3
+ * turbine-orm CLI, UI utilities
4
4
  *
5
5
  * ANSI colors, spinners, box-drawing, and formatting helpers.
6
- * Zero dependencies raw escape codes only.
6
+ * Zero dependencies, raw escape codes only.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.Spinner = exports.symbols = exports.bgCyan = exports.bgYellow = exports.bgRed = exports.bgGreen = exports.redBright = exports.yellowBright = exports.cyanBright = exports.greenBright = exports.gray = exports.white = exports.cyan = exports.magenta = exports.blue = exports.yellow = exports.green = exports.red = exports.underline = exports.italic = exports.dim = exports.bold = void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * turbine-orm TurbineClient
2
+ * turbine-orm, TurbineClient
3
3
  *
4
4
  * The main entry point for the Turbine TypeScript SDK.
5
5
  * Manages connection pooling and provides typed table accessors.
@@ -84,7 +84,7 @@ export interface PgCompatPoolClient {
84
84
  }
85
85
  /**
86
86
  * Minimal pg-compatible pool. Pass any driver that satisfies this interface
87
- * via `TurbineConfig.pool` lets Turbine run on Neon HTTP, Vercel Postgres,
87
+ * via `TurbineConfig.pool`, lets Turbine run on Neon HTTP, Vercel Postgres,
88
88
  * Cloudflare Hyperdrive, or any other serverless Postgres driver.
89
89
  *
90
90
  * @example
@@ -100,16 +100,16 @@ export interface PgCompatPool {
100
100
  query<R = Record<string, unknown>>(text: string, values?: unknown[]): Promise<PgCompatQueryResult<R>>;
101
101
  connect(): Promise<PgCompatPoolClient>;
102
102
  end(): Promise<void>;
103
- /** Optional pools that expose stats (pg.Pool does; Neon HTTP does not) */
103
+ /** Optional, pools that expose stats (pg.Pool does; Neon HTTP does not) */
104
104
  readonly totalCount?: number;
105
105
  readonly idleCount?: number;
106
106
  readonly waitingCount?: number;
107
- /** Optional pg.Pool supports 'error' event; HTTP drivers typically do not */
107
+ /** Optional, pg.Pool supports 'error' event; HTTP drivers typically do not */
108
108
  on?(event: 'error', listener: (err: Error) => void): this;
109
109
  }
110
110
  /**
111
111
  * Driver-neutral seam. Bundles a pg-compatible connection pool with the SQL
112
- * {@link Dialect} that owns every piece of SQL text varying across engines
112
+ * {@link Dialect} that owns every piece of SQL text varying across engines -
113
113
  * parameter placeholders, transaction-control keywords (BEGIN/COMMIT/ROLLBACK/
114
114
  * SAVEPOINT/isolation/set_config), streaming, and capability flags.
115
115
  *
@@ -175,7 +175,7 @@ export interface TurbineConfig {
175
175
  */
176
176
  warnOnUnlimited?: boolean | Record<string, boolean>;
177
177
  /**
178
- * Interpret Postgres `timestamp` (without time zone) values as UTC both
178
+ * Interpret Postgres `timestamp` (without time zone) values as UTC, both
179
179
  * at the driver level (OID 1114 type parser, registered only when Turbine
180
180
  * owns the pool) and when coercing nested-relation JSON dates. This is the
181
181
  * Prisma/Rails/Django convention and makes results independent of the
@@ -183,6 +183,17 @@ export interface TurbineConfig {
183
183
  * local-time interpretation.
184
184
  */
185
185
  utcTimestamps?: boolean;
186
+ /**
187
+ * Refuse a nested `connect` / `connectOrCreate` that would re-parent a
188
+ * to-many child already owned by a different parent. Off by default,
189
+ * because it changes the outcome of writes that currently succeed.
190
+ *
191
+ * Worth turning on for any multi-tenant application: without it, a handler
192
+ * that forwards a client-supplied id into a nested connect lets a caller
193
+ * take another tenant's row. See
194
+ * {@link import('./nested-write.js').NestedWriteContext.scopedConnect}.
195
+ */
196
+ scopedConnect?: boolean;
186
197
  /**
187
198
  * Default strategy for resolving `with`-clause relations, applied to every
188
199
  * `findMany`/`findUnique`/`findFirst` unless overridden per query.
@@ -259,9 +270,9 @@ export interface TurbineConfig {
259
270
  /**
260
271
  * How nested-relation subqueries encode each row's JSON.
261
272
  *
262
- * - `'object'` (default) `json_agg(json_build_object('key', v, …))`. Every
273
+ * - `'object'` (default), `json_agg(json_build_object('key', v, …))`. Every
263
274
  * key name is repeated in every nested object of every row.
264
- * - `'positional'` `json_agg(json_build_array(v, …))`. Turbine knows the
275
+ * - `'positional'`, `json_agg(json_build_array(v, …))`. Turbine knows the
265
276
  * column order at build time, so it emits a key-less array and maps
266
277
  * positions back to keys client-side. Same information, a fraction of the
267
278
  * bytes on wide/deeply-nested `with` trees. Parsed output is byte-identical
@@ -323,16 +334,16 @@ export interface TurbineConfig {
323
334
  * `$transaction` bodies, `pipeline`, `raw`/`sql`, `$listen`/`$notify`, and
324
335
  * observability flushes always use the primary.
325
336
  *
326
- * - `string` entries are connection strings Turbine constructs an owned
337
+ * - `string` entries are connection strings, Turbine constructs an owned
327
338
  * `pg.Pool` for each (same pool-tuning knobs as the primary, and the same
328
339
  * one-time, constructor-gated type-parser registration). `disconnect()`
329
340
  * closes them.
330
341
  * - `PgCompatPool` entries are external pools (Neon, Vercel, a shared
331
- * `pg.Pool`) Turbine registers no type parsers on them and never ends
342
+ * `pg.Pool`), Turbine registers no type parsers on them and never ends
332
343
  * them; the caller owns their lifecycle.
333
344
  *
334
345
  * Use `client.$primary()` to get a view of the client that pins every
335
- * operation (reads included) to the primary e.g. to read your own write
346
+ * operation (reads included) to the primary, e.g. to read your own write
336
347
  * without replication lag. Omitting `replicas` (or passing `[]`) leaves the
337
348
  * default single-pool path completely unchanged.
338
349
  */
@@ -340,8 +351,8 @@ export interface TurbineConfig {
340
351
  /**
341
352
  * Automatic WHERE filters applied to every query, keyed by table accessor
342
353
  * (`db[name]`). Each value is AND-merged into the compiled WHERE of every
343
- * read and mutation on that table and into every relation subquery that
344
- * targets it implementing soft-delete and multi-tenancy without repeating
354
+ * read and mutation on that table, and into every relation subquery that
355
+ * targets it, implementing soft-delete and multi-tenancy without repeating
345
356
  * the predicate at each call site.
346
357
  *
347
358
  * - A `WhereClause` value is a static filter (e.g. `{ deletedAt: null }`).
@@ -378,7 +389,7 @@ export type MiddlewareNext = (params: MiddlewareParams) => Promise<unknown>;
378
389
  /** A middleware function that intercepts queries */
379
390
  export type Middleware = (params: MiddlewareParams, next: MiddlewareNext) => Promise<unknown>;
380
391
  export interface TransactionOptions {
381
- /** Timeout in ms transaction will be rolled back if exceeded */
392
+ /** Timeout in ms, transaction will be rolled back if exceeded */
382
393
  timeout?: number;
383
394
  /** Isolation level for the transaction */
384
395
  isolationLevel?: 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Serializable';
@@ -388,7 +399,7 @@ export interface TransactionOptions {
388
399
  * `current_setting('app.current_tenant')`, and you set that value here so
389
400
  * every query inside the transaction sees it.
390
401
  *
391
- * Each entry is applied via `SELECT set_config($1, $2, true)` `is_local=true`
402
+ * Each entry is applied via `SELECT set_config($1, $2, true)`, `is_local=true`
392
403
  * scopes the value to this transaction, so it auto-resets on COMMIT/ROLLBACK
393
404
  * and never leaks onto the pooled connection. Both the name and value are
394
405
  * bound parameters (never interpolated); the GUC name is additionally
@@ -429,7 +440,7 @@ export declare class TransactionClient {
429
440
  private readonly sourcePool?;
430
441
  private readonly tableCache;
431
442
  private savepointCounter;
432
- /** Active SQL dialect owns savepoint keywords and raw-SQL placeholders. */
443
+ /** Active SQL dialect, owns savepoint keywords and raw-SQL placeholders. */
433
444
  private readonly dialect;
434
445
  constructor(client: pg.PoolClient, schema: SchemaMetadata, middlewares: Middleware[], queryOptions?: QueryInterfaceOptions | undefined,
435
446
  /**
@@ -471,14 +482,14 @@ export declare class TransactionClient {
471
482
  private createTxPool;
472
483
  }
473
484
  export declare class TurbineClient {
474
- /** The underlying pg.Pool exposed for escape hatches */
485
+ /** The underlying pg.Pool, exposed for escape hatches */
475
486
  readonly pool: pg.Pool;
476
487
  /** The schema metadata this client was built from */
477
488
  readonly schema: SchemaMetadata;
478
489
  private static int8ParserRegistered;
479
490
  private static utcTimestampParserRegistered;
480
491
  private readonly logging;
481
- /** Active SQL dialect owns transaction keywords, set_config, raw-SQL placeholders, capability flags. */
492
+ /** Active SQL dialect, owns transaction keywords, set_config, raw-SQL placeholders, capability flags. */
482
493
  private readonly dialect;
483
494
  private readonly tableCache;
484
495
  private readonly middlewares;
@@ -487,7 +498,7 @@ export declare class TurbineClient {
487
498
  private readonly errorMessagesSafe;
488
499
  /** True when Turbine created the pool and is responsible for tearing it down */
489
500
  private readonly ownsPool;
490
- /** Active LISTEN subscriptions torn down on disconnect() so it never hangs */
501
+ /** Active LISTEN subscriptions, torn down on disconnect() so it never hangs */
491
502
  private readonly activeSubscriptions;
492
503
  /**
493
504
  * Read-replica pools in round-robin order. Empty when no replicas are
@@ -514,7 +525,7 @@ export declare class TurbineClient {
514
525
  *
515
526
  * Middleware can inspect and log query parameters, measure timing, and
516
527
  * transform the result returned by `next()`. Note: query SQL is generated
517
- * BEFORE middleware runs `params.args` is a read-only snapshot, and
528
+ * BEFORE middleware runs, `params.args` is a read-only snapshot, and
518
529
  * mutating it does NOT change the executed SQL. Cross-cutting filters
519
530
  * (e.g. soft deletes) belong in the query itself: pass an explicit
520
531
  * `where: { deletedAt: null }` or wrap the table accessor in a small helper.
@@ -529,7 +540,7 @@ export declare class TurbineClient {
529
540
  * return result;
530
541
  * });
531
542
  *
532
- * // Result transformation middleware redact a field on the way out
543
+ * // Result transformation middleware, redact a field on the way out
533
544
  * db.$use(async (params, next) => {
534
545
  * const result = await next(params);
535
546
  * if (params.model === 'users' && Array.isArray(result)) {
@@ -546,12 +557,12 @@ export declare class TurbineClient {
546
557
  $observe(config: ObserveConfig): Promise<ObserveHandle>;
547
558
  /**
548
559
  * Get a QueryInterface for a table.
549
- * Results are cached calling `table('users')` twice returns the same instance.
560
+ * Results are cached, calling `table('users')` twice returns the same instance.
550
561
  *
551
562
  * When read replicas are configured, this returns a thin routing proxy: the
552
563
  * read-only operations in {@link READ_OPERATIONS} are dispatched to a
553
- * round-robin replica-bound QueryInterface (so an entire read base rows and
554
- * any batched sub-queries runs against a single consistent replica), while
564
+ * round-robin replica-bound QueryInterface (so an entire read, base rows and
565
+ * any batched sub-queries, runs against a single consistent replica), while
555
566
  * writes and every other member fall through to the primary-bound instance.
556
567
  * With no replicas the original single-pool instance is returned directly.
557
568
  */
@@ -572,7 +583,7 @@ export declare class TurbineClient {
572
583
  */
573
584
  private createRoutingAccessor;
574
585
  /**
575
- * Return a view of this client that pins EVERY operation reads included
586
+ * Return a view of this client that pins EVERY operation, reads included -
576
587
  * to the primary pool, bypassing replica routing. Use it to read your own
577
588
  * write without replication lag, or for any read that must see the latest
578
589
  * committed data.
@@ -580,7 +591,7 @@ export declare class TurbineClient {
580
591
  * The view shares the primary pool, schema, dialect, query options, and
581
592
  * middleware; it owns nothing, so its `disconnect()` is a no-op. When no
582
593
  * replicas are configured this simply returns the client itself (already
583
- * primary-only). The view is cached repeated calls return the same instance.
594
+ * primary-only). The view is cached, repeated calls return the same instance.
584
595
  *
585
596
  * @example
586
597
  * ```ts
@@ -594,8 +605,8 @@ export declare class TurbineClient {
594
605
  * Execute multiple queries in a single database round-trip.
595
606
  *
596
607
  * Two call styles:
597
- * - `db.pipeline(q1, q2, q3)` rest params (backward-compatible)
598
- * - `db.pipeline([q1, q2, q3], { transactional: false })` array + options
608
+ * - `db.pipeline(q1, q2, q3)`, rest params (backward-compatible)
609
+ * - `db.pipeline([q1, q2, q3], { transactional: false })`, array + options
599
610
  *
600
611
  * On pg.Pool-backed connections with TCP, this uses the real Postgres
601
612
  * extended-query pipeline protocol (one TCP flush, one round-trip).
@@ -622,7 +633,7 @@ export declare class TurbineClient {
622
633
  */
623
634
  raw<T extends Record<string, unknown> = Record<string, unknown>>(strings: TemplateStringsArray, ...values: unknown[]): Promise<T[]>;
624
635
  /**
625
- * Execute a **typed** raw SQL query Turbine's answer to Prisma's TypedSQL.
636
+ * Execute a **typed** raw SQL query, Turbine's answer to Prisma's TypedSQL.
626
637
  *
627
638
  * Like {@link raw}, every interpolated `${value}` becomes a `$N` parameter
628
639
  * (never string-concatenated), so it is injection-safe by construction. The
@@ -630,7 +641,7 @@ export declare class TurbineClient {
630
641
  * returned {@link TypedSqlQuery} can be `await`ed directly for `T[]`, or
631
642
  * refined with `.one()` (→ `T | null`) or `.scalar<V>()` (→ `V | null`).
632
643
  *
633
- * Rows are returned as-is no snake→camel mapping (matching `raw()`). Alias
644
+ * Rows are returned as-is, no snake→camel mapping (matching `raw()`). Alias
634
645
  * columns in SQL if you want camelCase keys.
635
646
  *
636
647
  * @example
@@ -685,7 +696,7 @@ export declare class TurbineClient {
685
696
  */
686
697
  $transaction<R>(fn: (tx: TransactionClient) => Promise<R>, options?: TransactionOptions): Promise<R>;
687
698
  /**
688
- * Batch form run a tuple of {@link DeferredQuery} objects (produced by the
699
+ * Batch form, run a tuple of {@link DeferredQuery} objects (produced by the
689
700
  * `build*()` methods, e.g. `db.users.buildFindMany(...)`) atomically inside a
690
701
  * single `BEGIN…COMMIT` on one connection. Returns a positionally-typed tuple
691
702
  * of each query's transformed result; any failure rolls the whole batch back.
@@ -693,8 +704,8 @@ export declare class TurbineClient {
693
704
  * Unlike {@link pipeline}, this never uses the extended-query pipeline
694
705
  * protocol. Statements run on the single transaction connection: strictly
695
706
  * sequentially by default (safe on every driver, including HTTP/serverless
696
- * pools), or when the checked-out connection advertises
697
- * {@link PgCompatPoolClient.supportsPipelining} dispatched in one write
707
+ * pools), or, when the checked-out connection advertises
708
+ * {@link PgCompatPoolClient.supportsPipelining}, dispatched in one write
698
709
  * burst with replies collected in order, saving a network round trip per
699
710
  * statement. Either way the failure contract is identical: the first
700
711
  * (lowest-index) failure aborts the batch and rolls everything back.
@@ -722,7 +733,7 @@ export declare class TurbineClient {
722
733
  * {@link PgCompatPoolClient.supportsPipelining} (its `query()` accepts
723
734
  * concurrent calls and completes them in FIFO submission order), all
724
735
  * statements are dispatched in one write burst and the replies are
725
- * collected in order ~1 round trip plus server time. Only taken when
736
+ * collected in order, ~1 round trip plus server time. Only taken when
726
737
  * the dialect's writes surface rows directly (`resultStrategy` !==
727
738
  * 'reselect'): a reselect plan is itself a sequential write+read pair.
728
739
  *
@@ -762,12 +773,12 @@ export declare class TurbineClient {
762
773
  *
763
774
  * The channel name CANNOT be a bound parameter (`LISTEN $1` is a syntax
764
775
  * error), so it is validated against a strict identifier regex AND quoted via
765
- * `quoteIdent` before interpolation it is the only identifier this method
776
+ * `quoteIdent` before interpolation, it is the only identifier this method
766
777
  * places into SQL text.
767
778
  *
768
779
  * **Serverless caveat:** LISTEN needs a persistent connection that can push
769
780
  * async notifications. Stateless HTTP drivers (Neon HTTP, Vercel Postgres)
770
- * cannot do this `$listen` throws a `ConnectionError` rather than hang.
781
+ * cannot do this, `$listen` throws a `ConnectionError` rather than hang.
771
782
  * `$notify` works on every driver.
772
783
  *
773
784
  * @example
@@ -784,7 +795,7 @@ export declare class TurbineClient {
784
795
  /**
785
796
  * Send a Postgres NOTIFY on `channel` with an optional payload string.
786
797
  *
787
- * Issued as `SELECT pg_notify($1, $2)` both the channel and payload are
798
+ * Issued as `SELECT pg_notify($1, $2)`, both the channel and payload are
788
799
  * BOUND parameters (no quoting/injection concern). The channel is still
789
800
  * validated against the identifier regex for parity with `$listen` and to
790
801
  * catch typos loudly. Works on every driver, including serverless HTTP pools.
@@ -820,7 +831,7 @@ export declare class TurbineClient {
820
831
  * Gracefully shut down the connection pool.
821
832
  *
822
833
  * If Turbine was given an external pool via `TurbineConfig.pool`, this
823
- * method is a no-op the caller is responsible for the pool's lifecycle.
834
+ * method is a no-op, the caller is responsible for the pool's lifecycle.
824
835
  */
825
836
  disconnect(): Promise<void>;
826
837
  /** Alias for disconnect() */