@vibeorm/schema 5.2.0 → 5.3.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.
@@ -76,6 +76,8 @@ export type DialectCapabilities = {
76
76
  readonly nativeRowLevelSecurity: boolean;
77
77
  /** INSERT/UPDATE/DELETE ... RETURNING. False ⇒ insertId + re-select fallback. */
78
78
  readonly returning: boolean;
79
+ /** Count-only writes can assert their exact direct row count inside the same SQL statement. */
80
+ readonly exactRowCount: boolean;
79
81
  /** Native scalar array columns (String[], Int[], ...). */
80
82
  readonly scalarArrays: boolean;
81
83
  /** Native enum column types (CREATE TYPE / inline ENUM). */
package/dist/errors.d.ts CHANGED
@@ -9,6 +9,8 @@
9
9
  export declare const VIBE_ERROR_CODES: readonly [
10
10
  /** findUniqueOrThrow / findFirstOrThrow / update / delete target missing. */
11
11
  "VIBE_NOT_FOUND",
12
+ /** A count-only write's exact affected-row expectation did not match. */
13
+ "VIBE_ROW_COUNT_MISMATCH",
12
14
  /** Unique constraint violation (driver-mapped). */
13
15
  "VIBE_UNIQUE_VIOLATION",
14
16
  /** Exclusion constraint violation (PostgreSQL SQLSTATE 23P01). */
@@ -185,6 +185,8 @@ export type ExtensionClientContribution = {
185
185
  * type or at runtime.
186
186
  */
187
187
  readonly readOnly?: true | readonly string[];
188
+ /** Opt this surface into explicit lazy operation capture and transaction batching. */
189
+ readonly lazy?: true;
188
190
  readonly runtimeGlue: string;
189
191
  readonly dts: readonly string[];
190
192
  readonly dtsTypes?: readonly string[];
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  // packages/schema/src/errors.ts
3
3
  var VIBE_ERROR_CODES = [
4
4
  "VIBE_NOT_FOUND",
5
+ "VIBE_ROW_COUNT_MISMATCH",
5
6
  "VIBE_UNIQUE_VIOLATION",
6
7
  "VIBE_EXCLUSION_VIOLATION",
7
8
  "VIBE_FK_VIOLATION",
@@ -228,6 +229,10 @@ var RESERVED_CLIENT_NAMES = [
228
229
  "$querySqlResult",
229
230
  "$executeSql",
230
231
  "$queryRaw",
232
+ "$queueRaw",
233
+ "$lazy",
234
+ "$queryRawLazy",
235
+ "$executeRawLazy",
231
236
  "$queryRawUnsafe",
232
237
  "$executeRaw",
233
238
  "$executeRawUnsafe",
@@ -242,6 +247,7 @@ var RESERVED_CLIENT_NAMES = [
242
247
  "$models",
243
248
  "$withContext",
244
249
  "$advisoryLock",
250
+ "$advisoryLocks",
245
251
  "$tryAdvisoryLock"
246
252
  ];
247
253
  var RESERVED_COLUMN_PREFIX = "__vibe_";
@@ -441,6 +447,7 @@ var POSTGRES_CAPABILITIES = Object.freeze({
441
447
  predicateArithmeticTypes: Object.freeze(["Int", "BigInt", "Float", "Decimal"]),
442
448
  nativeRowLevelSecurity: true,
443
449
  returning: true,
450
+ exactRowCount: true,
444
451
  scalarArrays: true,
445
452
  nativeEnums: true,
446
453
  ilike: true,
@@ -481,6 +488,7 @@ var SQLITE_CAPABILITIES = Object.freeze({
481
488
  predicateArithmeticTypes: Object.freeze(["Int", "BigInt", "Float"]),
482
489
  nativeRowLevelSecurity: false,
483
490
  returning: true,
491
+ exactRowCount: false,
484
492
  scalarArrays: false,
485
493
  nativeEnums: false,
486
494
  ilike: false,
@@ -521,6 +529,7 @@ var MYSQL_CAPABILITIES = Object.freeze({
521
529
  predicateArithmeticTypes: Object.freeze(["Int", "BigInt", "Float", "Decimal"]),
522
530
  nativeRowLevelSecurity: false,
523
531
  returning: false,
532
+ exactRowCount: false,
524
533
  scalarArrays: false,
525
534
  nativeEnums: true,
526
535
  ilike: false,
@@ -2846,7 +2855,11 @@ var RESERVED_ENUM_NAMES = [
2846
2855
  "TransactionOptions",
2847
2856
  "CallbackTransactionOptions",
2848
2857
  "RawStatement",
2858
+ "LazyRawExecuteOptions",
2859
+ "LazyRawQueryOptions",
2860
+ "QueueRawOptions",
2849
2861
  "AdvisoryLockOptions",
2862
+ "AdvisoryLocksOptions",
2850
2863
  "StatementDiagnosticsOptions",
2851
2864
  "SchemaIR",
2852
2865
  "VibeExtension",
@@ -4549,4 +4562,4 @@ export {
4549
4562
  validatorRefIssue
4550
4563
  };
4551
4564
 
4552
- //# debugId=6A81F5FFEA4B498F64756E2164756E21
4565
+ //# debugId=B8429E15DEC34CA164756E2164756E21