@warlock.js/cascade 5.31.0 → 5.33.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 (230) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/cjs/index.cjs +104 -85
  3. package/cjs/index.cjs.map +1 -1
  4. package/esm/context/database-data-source-context.d.mts +2 -3
  5. package/esm/context/database-data-source-context.d.mts.map +1 -1
  6. package/esm/context/database-transaction-context.d.mts +2 -3
  7. package/esm/context/database-transaction-context.d.mts.map +1 -1
  8. package/esm/contracts/database-driver.contract.d.mts +56 -36
  9. package/esm/contracts/database-driver.contract.d.mts.map +1 -1
  10. package/esm/contracts/database-id-generator.contract.d.mts +7 -5
  11. package/esm/contracts/database-id-generator.contract.d.mts.map +1 -1
  12. package/esm/contracts/database-remover.contract.d.mts +3 -5
  13. package/esm/contracts/database-remover.contract.d.mts.map +1 -1
  14. package/esm/contracts/database-restorer.contract.d.mts +6 -6
  15. package/esm/contracts/database-restorer.contract.d.mts.map +1 -1
  16. package/esm/contracts/database-writer.contract.d.mts +4 -6
  17. package/esm/contracts/database-writer.contract.d.mts.map +1 -1
  18. package/esm/contracts/driver-blueprint.contract.d.mts +2 -3
  19. package/esm/contracts/driver-blueprint.contract.d.mts.map +1 -1
  20. package/esm/contracts/index.d.mts +2 -1
  21. package/esm/contracts/migration-driver.contract.d.mts +101 -53
  22. package/esm/contracts/migration-driver.contract.d.mts.map +1 -1
  23. package/esm/contracts/query-builder.contract.d.mts +51 -33
  24. package/esm/contracts/query-builder.contract.d.mts.map +1 -1
  25. package/esm/contracts/sync-adapter.contract.d.mts +25 -14
  26. package/esm/contracts/sync-adapter.contract.d.mts.map +1 -1
  27. package/esm/data-source/data-source-registry.d.mts +4 -5
  28. package/esm/data-source/data-source-registry.d.mts.map +1 -1
  29. package/esm/data-source/data-source.d.mts +8 -5
  30. package/esm/data-source/data-source.d.mts.map +1 -1
  31. package/esm/database-dirty-tracker.d.mts +2 -2
  32. package/esm/database-dirty-tracker.d.mts.map +1 -1
  33. package/esm/database-dirty-tracker.mjs +3 -2
  34. package/esm/database-dirty-tracker.mjs.map +1 -1
  35. package/esm/drivers/mongodb/mongodb-driver.d.mts +3 -4
  36. package/esm/drivers/mongodb/mongodb-driver.d.mts.map +1 -1
  37. package/esm/drivers/mongodb/mongodb-id-generator.d.mts +2 -3
  38. package/esm/drivers/mongodb/mongodb-id-generator.d.mts.map +1 -1
  39. package/esm/drivers/mongodb/mongodb-migration-driver.d.mts +1 -3
  40. package/esm/drivers/mongodb/mongodb-migration-driver.d.mts.map +1 -1
  41. package/esm/drivers/mongodb/mongodb-query-builder.d.mts +2 -3
  42. package/esm/drivers/mongodb/mongodb-query-builder.d.mts.map +1 -1
  43. package/esm/drivers/mongodb/mongodb-query-builder.mjs +8 -5
  44. package/esm/drivers/mongodb/mongodb-query-builder.mjs.map +1 -1
  45. package/esm/drivers/mongodb/mongodb-query-operations.d.mts +1 -3
  46. package/esm/drivers/mongodb/mongodb-query-operations.d.mts.map +1 -1
  47. package/esm/drivers/mongodb/mongodb-query-parser.d.mts +7 -6
  48. package/esm/drivers/mongodb/mongodb-query-parser.d.mts.map +1 -1
  49. package/esm/drivers/mongodb/mongodb-query-parser.mjs +2 -6
  50. package/esm/drivers/mongodb/mongodb-query-parser.mjs.map +1 -1
  51. package/esm/drivers/mongodb/mongodb-sync-adapter.d.mts +1 -3
  52. package/esm/drivers/mongodb/mongodb-sync-adapter.d.mts.map +1 -1
  53. package/esm/drivers/mongodb/types.d.mts +11 -9
  54. package/esm/drivers/mongodb/types.d.mts.map +1 -1
  55. package/esm/drivers/postgres/index.d.mts +2 -1
  56. package/esm/drivers/postgres/index.mjs +1 -1
  57. package/esm/drivers/postgres/naming.mjs +1 -1
  58. package/esm/drivers/postgres/postgres-blueprint.d.mts +1 -3
  59. package/esm/drivers/postgres/postgres-blueprint.d.mts.map +1 -1
  60. package/esm/drivers/postgres/postgres-dialect.d.mts +4 -6
  61. package/esm/drivers/postgres/postgres-dialect.d.mts.map +1 -1
  62. package/esm/drivers/postgres/postgres-driver.d.mts +4 -5
  63. package/esm/drivers/postgres/postgres-driver.d.mts.map +1 -1
  64. package/esm/drivers/postgres/postgres-migration-driver.d.mts +1 -3
  65. package/esm/drivers/postgres/postgres-migration-driver.d.mts.map +1 -1
  66. package/esm/drivers/postgres/postgres-migration-driver.mjs +13 -10
  67. package/esm/drivers/postgres/postgres-migration-driver.mjs.map +1 -1
  68. package/esm/drivers/postgres/postgres-query-builder.d.mts +4 -4
  69. package/esm/drivers/postgres/postgres-query-builder.d.mts.map +1 -1
  70. package/esm/drivers/postgres/postgres-query-builder.mjs +14 -10
  71. package/esm/drivers/postgres/postgres-query-builder.mjs.map +1 -1
  72. package/esm/drivers/postgres/postgres-query-parser.d.mts +16 -11
  73. package/esm/drivers/postgres/postgres-query-parser.d.mts.map +1 -1
  74. package/esm/drivers/postgres/postgres-query-parser.mjs +1 -1
  75. package/esm/drivers/postgres/postgres-query-parser.mjs.map +1 -1
  76. package/esm/drivers/postgres/postgres-sql-serializer.mjs +13 -10
  77. package/esm/drivers/postgres/postgres-sql-serializer.mjs.map +1 -1
  78. package/esm/drivers/postgres/postgres-ttl-purge.mjs +1 -1
  79. package/esm/drivers/postgres/postgres-type-converters.mjs +2 -2
  80. package/esm/drivers/postgres/postgres-type-converters.mjs.map +1 -1
  81. package/esm/drivers/postgres/postgres-update-validator.mjs +1 -1
  82. package/esm/drivers/postgres/postgres-update-validator.mjs.map +1 -1
  83. package/esm/drivers/postgres/types.d.mts +87 -45
  84. package/esm/drivers/postgres/types.d.mts.map +1 -1
  85. package/esm/drivers/sql/sql-dialect.contract.d.mts +1 -3
  86. package/esm/drivers/sql/sql-dialect.contract.d.mts.map +1 -1
  87. package/esm/drivers/sql/sql-types.d.mts +113 -59
  88. package/esm/drivers/sql/sql-types.d.mts.map +1 -1
  89. package/esm/errors/missing-data-source.error.d.mts +1 -2
  90. package/esm/errors/missing-data-source.error.d.mts.map +1 -1
  91. package/esm/errors/transaction-rollback.error.d.mts +1 -2
  92. package/esm/errors/transaction-rollback.error.d.mts.map +1 -1
  93. package/esm/errors/undefined-where-value.error.d.mts +1 -2
  94. package/esm/errors/undefined-where-value.error.d.mts.map +1 -1
  95. package/esm/errors/unsafe-filter.error.d.mts +1 -2
  96. package/esm/errors/unsafe-filter.error.d.mts.map +1 -1
  97. package/esm/errors/unsafe-raw-expression.error.d.mts +1 -2
  98. package/esm/errors/unsafe-raw-expression.error.d.mts.map +1 -1
  99. package/esm/errors/unsupported-lean-operation.error.d.mts +1 -2
  100. package/esm/errors/unsupported-lean-operation.error.d.mts.map +1 -1
  101. package/esm/errors/unsupported-lock-for-update.error.d.mts +1 -2
  102. package/esm/errors/unsupported-lock-for-update.error.d.mts.map +1 -1
  103. package/esm/errors/unsupported-query-operation.error.d.mts +1 -2
  104. package/esm/errors/unsupported-query-operation.error.d.mts.map +1 -1
  105. package/esm/errors/unsupported-update-operation.error.d.mts +1 -2
  106. package/esm/errors/unsupported-update-operation.error.d.mts.map +1 -1
  107. package/esm/events/model-events.d.mts +8 -6
  108. package/esm/events/model-events.d.mts.map +1 -1
  109. package/esm/expressions/aggregate-expressions.d.mts +7 -7
  110. package/esm/expressions/aggregate-expressions.d.mts.map +1 -1
  111. package/esm/expressions/column-expressions.d.mts +11 -11
  112. package/esm/expressions/column-expressions.d.mts.map +1 -1
  113. package/esm/index.d.mts +7 -2
  114. package/esm/index.mjs +1 -1
  115. package/esm/migration/column-builder.d.mts +2 -3
  116. package/esm/migration/column-builder.d.mts.map +1 -1
  117. package/esm/migration/column-helpers.d.mts +49 -50
  118. package/esm/migration/column-helpers.d.mts.map +1 -1
  119. package/esm/migration/column-helpers.mjs +1 -1
  120. package/esm/migration/foreign-key-builder.d.mts +2 -3
  121. package/esm/migration/foreign-key-builder.d.mts.map +1 -1
  122. package/esm/migration/index.d.mts +3 -2
  123. package/esm/migration/index.mjs +2 -2
  124. package/esm/migration/migration-runner.d.mts +7 -6
  125. package/esm/migration/migration-runner.d.mts.map +1 -1
  126. package/esm/migration/migration-runner.mjs +15 -11
  127. package/esm/migration/migration-runner.mjs.map +1 -1
  128. package/esm/migration/migration.d.mts +50 -32
  129. package/esm/migration/migration.d.mts.map +1 -1
  130. package/esm/migration/migration.mjs +1 -3
  131. package/esm/migration/migration.mjs.map +1 -1
  132. package/esm/migration/sql-serializer.d.mts +1 -3
  133. package/esm/migration/sql-serializer.d.mts.map +1 -1
  134. package/esm/migration/types.d.mts +7 -7
  135. package/esm/migration/types.d.mts.map +1 -1
  136. package/esm/model/methods/accessor-methods.mjs +1 -1
  137. package/esm/model/methods/accessor-methods.mjs.map +1 -1
  138. package/esm/model/methods/meta-methods.mjs +4 -2
  139. package/esm/model/methods/meta-methods.mjs.map +1 -1
  140. package/esm/model/methods/query-methods.mjs +1 -1
  141. package/esm/model/methods/write-methods.d.mts +3 -2
  142. package/esm/model/methods/write-methods.d.mts.map +1 -1
  143. package/esm/model/methods/write-methods.mjs +5 -2
  144. package/esm/model/methods/write-methods.mjs.map +1 -1
  145. package/esm/model/model.d.mts +9 -9
  146. package/esm/model/model.d.mts.map +1 -1
  147. package/esm/model/model.types.d.mts +7 -7
  148. package/esm/model/model.types.d.mts.map +1 -1
  149. package/esm/model/register-model.d.mts +13 -15
  150. package/esm/model/register-model.d.mts.map +1 -1
  151. package/esm/model/relation-decorators.d.mts +6 -8
  152. package/esm/model/relation-decorators.d.mts.map +1 -1
  153. package/esm/operations/database.d.mts +13 -8
  154. package/esm/operations/database.d.mts.map +1 -1
  155. package/esm/operations/index.d.mts +2 -1
  156. package/esm/operations/index.mjs +1 -1
  157. package/esm/operations/migrations.d.mts +18 -14
  158. package/esm/operations/migrations.d.mts.map +1 -1
  159. package/esm/query-builder/query-builder.d.mts +2 -4
  160. package/esm/query-builder/query-builder.d.mts.map +1 -1
  161. package/esm/query-builder/query-builder.mjs +12 -11
  162. package/esm/query-builder/query-builder.mjs.map +1 -1
  163. package/esm/relations/index.d.mts +2 -1
  164. package/esm/relations/index.mjs +1 -1
  165. package/esm/relations/key-conventions.mjs +2 -1
  166. package/esm/relations/key-conventions.mjs.map +1 -1
  167. package/esm/relations/pivot-operations.d.mts +3 -5
  168. package/esm/relations/pivot-operations.d.mts.map +1 -1
  169. package/esm/relations/relation-hydrator.d.mts +3 -5
  170. package/esm/relations/relation-hydrator.d.mts.map +1 -1
  171. package/esm/relations/relation-loader.d.mts +2 -4
  172. package/esm/relations/relation-loader.d.mts.map +1 -1
  173. package/esm/relations/relation-loader.mjs +4 -5
  174. package/esm/relations/relation-loader.mjs.map +1 -1
  175. package/esm/relations/types.d.mts +14 -15
  176. package/esm/relations/types.d.mts.map +1 -1
  177. package/esm/remover/database-remover.d.mts +1 -3
  178. package/esm/remover/database-remover.d.mts.map +1 -1
  179. package/esm/restorer/database-restorer.d.mts +1 -3
  180. package/esm/restorer/database-restorer.d.mts.map +1 -1
  181. package/esm/restorer/database-restorer.mjs +2 -1
  182. package/esm/restorer/database-restorer.mjs.map +1 -1
  183. package/esm/sql-database-dirty-tracker.d.mts +1 -3
  184. package/esm/sql-database-dirty-tracker.d.mts.map +1 -1
  185. package/esm/sync/model-events.mjs +1 -1
  186. package/esm/sync/model-sync-operation.d.mts +2 -4
  187. package/esm/sync/model-sync-operation.d.mts.map +1 -1
  188. package/esm/sync/model-sync.d.mts +3 -4
  189. package/esm/sync/model-sync.d.mts.map +1 -1
  190. package/esm/sync/sync-context.d.mts +2 -4
  191. package/esm/sync/sync-context.d.mts.map +1 -1
  192. package/esm/sync/sync-fanout.mjs +1 -1
  193. package/esm/sync/sync-manager.d.mts +2 -4
  194. package/esm/sync/sync-manager.d.mts.map +1 -1
  195. package/esm/sync/types.d.mts +121 -64
  196. package/esm/sync/types.d.mts.map +1 -1
  197. package/esm/transactions/after-commit.d.mts +2 -2
  198. package/esm/transactions/after-commit.d.mts.map +1 -1
  199. package/esm/types.d.mts +7 -8
  200. package/esm/types.d.mts.map +1 -1
  201. package/esm/utils/connect-to-database.d.mts +7 -8
  202. package/esm/utils/connect-to-database.d.mts.map +1 -1
  203. package/esm/utils/database-writer.utils.d.mts +3 -4
  204. package/esm/utils/database-writer.utils.d.mts.map +1 -1
  205. package/esm/utils/define-model.d.mts +3 -5
  206. package/esm/utils/define-model.d.mts.map +1 -1
  207. package/esm/utils/escape-regex.d.mts +3 -4
  208. package/esm/utils/escape-regex.d.mts.map +1 -1
  209. package/esm/utils/once-connected.d.mts +2 -4
  210. package/esm/utils/once-connected.d.mts.map +1 -1
  211. package/esm/utils/sanitize-filter.d.mts +3 -4
  212. package/esm/utils/sanitize-filter.d.mts.map +1 -1
  213. package/esm/validation/database-seal-plugins.d.mts +2 -1
  214. package/esm/validation/database-writer-validation-error.d.mts +1 -3
  215. package/esm/validation/database-writer-validation-error.d.mts.map +1 -1
  216. package/esm/validation/index.d.mts +3 -1
  217. package/esm/validation/index.mjs +1 -1
  218. package/esm/validation/plugins/database-rules-plugin.d.mts +2 -3
  219. package/esm/validation/plugins/database-rules-plugin.d.mts.map +1 -1
  220. package/esm/validation/plugins/embed-validator-plugin.d.mts +4 -3
  221. package/esm/validation/plugins/embed-validator-plugin.d.mts.map +1 -1
  222. package/esm/validation/types.d.mts +14 -10
  223. package/esm/validation/types.d.mts.map +1 -1
  224. package/esm/validation/validators/embed-validator.d.mts +2 -3
  225. package/esm/validation/validators/embed-validator.d.mts.map +1 -1
  226. package/esm/writer/database-writer.d.mts +1 -3
  227. package/esm/writer/database-writer.d.mts.map +1 -1
  228. package/esm/writer/database-writer.mjs +1 -1
  229. package/esm/writer/database-writer.mjs.map +1 -1
  230. package/package.json +5 -5
@@ -1,6 +1,5 @@
1
1
  import { DataSource } from "../data-source/data-source.mjs";
2
2
  import { Context } from "@warlock.js/context";
3
-
4
3
  //#region ../../packages/cascade/src/context/database-data-source-context.d.ts
5
4
  type DataSourceContextValue = string | DataSource;
6
5
  type DataSourceContextStore = {
@@ -26,7 +25,7 @@ declare class DatabaseDataSourceContext extends Context<DataSourceContextStore>
26
25
  */
27
26
  buildStore(): DataSourceContextStore;
28
27
  }
29
- declare const databaseDataSourceContext: DatabaseDataSourceContext;
28
+ export declare const databaseDataSourceContext: DatabaseDataSourceContext;
30
29
  //#endregion
31
- export { databaseDataSourceContext };
30
+ export {};
32
31
  //# sourceMappingURL=database-data-source-context.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"database-data-source-context.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/context/database-data-source-context.ts"],"mappings":";;;;KAGK,sBAAA,YAAkC,UAAU;AAAA,KAE5C,sBAAA;EACH,UAAA,GAAa,sBAAsB;AAAA;;;AAHY;AAAA;;;cAY3C,yBAAA,SAAkC,OAAA,CAAQ,sBAAA;EATX;AAAA;;EAa5B,aAAA,IAAiB,sBAAA;EAJsB;;;EAWvC,aAAA,CAAc,UAAA,EAAY,sBAAA;EAXK;;;EAkB/B,UAAA,IAAc,sBAAA;AAAA;AAAA,cAKV,yBAAA,EAAyB,yBAAkC"}
1
+ {"version":3,"file":"database-data-source-context.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/context/database-data-source-context.ts"],"mappings":";;;KAGK,kCAAkC;KAElC;EACH,aAAa;;;;;;;;cAST,kCAAkC,QAAQ;;;;EAIvC,iBAAiB;;;;EAOjB,cAAc,YAAY;;;;EAO1B,cAAc;;qBAKV,2BAAyB"}
@@ -1,5 +1,4 @@
1
1
  import { Context } from "@warlock.js/context";
2
-
3
2
  //#region ../../packages/cascade/src/context/database-transaction-context.d.ts
4
3
  interface TransactionContextStore {
5
4
  session?: unknown;
@@ -42,7 +41,7 @@ declare class DatabaseTransactionContext extends Context<TransactionContextStore
42
41
  */
43
42
  buildStore(): TransactionContextStore;
44
43
  }
45
- declare const databaseTransactionContext: DatabaseTransactionContext;
44
+ export declare const databaseTransactionContext: DatabaseTransactionContext;
46
45
  //#endregion
47
- export { databaseTransactionContext };
46
+ export {};
48
47
  //# sourceMappingURL=database-transaction-context.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"database-transaction-context.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/context/database-transaction-context.ts"],"mappings":";;;UAEU,uBAAA;EACR,OAAA;EACA,WAAA,GAAc,KAAK,cAAc,OAAA;AAAA;;;;;;;cAS7B,0BAAA,SAAmC,OAAA,CAAQ,uBAAA;EATP;AAAA;;EAajC,UAAA,wBAAkC,QAAA;EAJM;;;EAWxC,oBAAA;EA0BmB;;;EAnBnB,UAAA,CAAW,OAAA;EAlB4B;;;EAyBvC,cAAA,CAAe,EAAA,eAAiB,OAAA;EArBrB;;;;EAiCX,eAAA,IAAmB,KAAA,cAAmB,OAAA;EAZtC;;;EAuBA,IAAA;EAXmB;;;EAkBnB,UAAA,IAAc,uBAAA;AAAA;AAAA,cAKV,0BAAA,EAA0B,0BAAmC"}
1
+ {"version":3,"file":"database-transaction-context.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/context/database-transaction-context.ts"],"mappings":";;UAEU;EACR;EACA,cAAc,mBAAmB;;;;;;;;cAS7B,mCAAmC,QAAQ;;;;EAIxC,WAAW,uBAAuB;;;;EAOlC;;;;EAOA,WAAW;;;;EAOX,eAAe,iBAAiB;;;;;EAYhC,mBAAmB,mBAAmB;;;;EAWtC;;;;EAOA,cAAc;;qBAKV,4BAA0B"}
@@ -6,19 +6,18 @@ import { DatabaseDriver } from "../utils/connect-to-database.mjs";
6
6
  import { SQLSerializer } from "../migration/sql-serializer.mjs";
7
7
  import { QueryBuilderContract } from "./query-builder.contract.mjs";
8
8
  import { SyncAdapterContract } from "./sync-adapter.contract.mjs";
9
-
10
9
  //#region ../../packages/cascade/src/contracts/database-driver.contract.d.ts
11
10
  /** Supported driver lifecycle events. */
12
- type DriverEvent = "connected" | "disconnected" | string;
11
+ export type DriverEvent = "connected" | "disconnected" | string;
13
12
  /** Listener signature for driver lifecycle events. */
14
- type DriverEventListener = (...args: unknown[]) => void;
13
+ export type DriverEventListener = (...args: unknown[]) => void;
15
14
  /**
16
15
  * Details of a database command after it has settled.
17
16
  *
18
17
  * `connection` is the driver name when emitted by a driver directly, and the
19
18
  * registered data-source name when forwarded by `dataSourceRegistry`.
20
19
  */
21
- type QueryEvent = {
20
+ export type QueryEvent = {
22
21
  connection: string;
23
22
  driver: "postgres" | "mongodb";
24
23
  sql?: string;
@@ -32,7 +31,7 @@ type QueryEvent = {
32
31
  error?: unknown;
33
32
  };
34
33
  /** Representation of an opened transaction (manual pattern). */
35
- interface DriverTransactionContract<TContext = unknown> {
34
+ export interface DriverTransactionContract<TContext = unknown> {
36
35
  /** Driver-specific transaction context (session, connection, ...). */
37
36
  context: TContext;
38
37
  /** Commit the transaction. */
@@ -46,7 +45,7 @@ interface DriverTransactionContract<TContext = unknown> {
46
45
  * Provides explicit rollback capability - calling rollback() will
47
46
  * throw a TransactionRollbackError to exit the transaction scope.
48
47
  */
49
- interface TransactionContext {
48
+ export interface TransactionContext {
50
49
  /**
51
50
  * Explicitly rollback the transaction.
52
51
  *
@@ -68,12 +67,13 @@ interface TransactionContext {
68
67
  rollback(reason?: string): never;
69
68
  }
70
69
  /** Result returned after insert operations. */
71
- type InsertResult<TDocument = unknown> = {
70
+ export type InsertResult<TDocument = unknown> = {
72
71
  document: TDocument;
73
72
  };
74
73
  /** Result returned after update operations. */
75
- type UpdateResult = {
76
- modifiedCount: number; /** Documents/rows inserted by an `upsert` (0 or absent when nothing was inserted). */
74
+ export type UpdateResult = {
75
+ modifiedCount: number;
76
+ /** Documents/rows inserted by an `upsert` (0 or absent when nothing was inserted). */
77
77
  upsertedCount?: number;
78
78
  };
79
79
  /**
@@ -86,10 +86,14 @@ type UpdateResult = {
86
86
  *
87
87
  * @typeParam T - The row shape (defaults to a generic record).
88
88
  */
89
- type RawQueryResult<T = Record<string, unknown>> = {
90
- /** Rows returned by the query, typed as `T`. */readonly rows: T[]; /** Rows affected by INSERT/UPDATE/DELETE, or `null` when not reported. */
91
- readonly rowCount: number | null; /** Command executed (SELECT, INSERT, …) — driver-dependent. */
92
- readonly command?: string; /** Result column metadata — driver-dependent. */
89
+ export type RawQueryResult<T = Record<string, unknown>> = {
90
+ /** Rows returned by the query, typed as `T`. */
91
+ readonly rows: T[];
92
+ /** Rows affected by INSERT/UPDATE/DELETE, or `null` when not reported. */
93
+ readonly rowCount: number | null;
94
+ /** Command executed (SELECT, INSERT, …) — driver-dependent. */
95
+ readonly command?: string;
96
+ /** Result column metadata — driver-dependent. */
93
97
  readonly fields?: ReadonlyArray<{
94
98
  readonly name: string;
95
99
  readonly dataTypeID: number;
@@ -121,14 +125,22 @@ type RawQueryResult<T = Record<string, unknown>> = {
121
125
  * }
122
126
  * ```
123
127
  */
124
- type UpdateOperations = {
125
- /** Set field values */$set?: Record<string, unknown>; /** Remove/unset fields (MongoDB: delete field, SQL: SET NULL) */
126
- $unset?: Record<string, 1 | true>; /** Increment numeric fields */
127
- $inc?: Record<string, number>; /** Decrement numeric fields */
128
- $dec?: Record<string, number>; /** Push to arrays (NoSQL only; SQL drivers throw `UnsupportedUpdateOperationError`) */
129
- $push?: Record<string, unknown>; /** Pull from arrays (NoSQL only; SQL drivers throw `UnsupportedUpdateOperationError`) */
130
- $pull?: Record<string, unknown>; /** Add to arrays only when absent (NoSQL only; SQL drivers throw `UnsupportedUpdateOperationError`) */
131
- $addToSet?: Record<string, unknown>; /** Set fields only when an `upsert` inserts; a no-op when an existing document is updated */
128
+ export type UpdateOperations = {
129
+ /** Set field values */
130
+ $set?: Record<string, unknown>;
131
+ /** Remove/unset fields (MongoDB: delete field, SQL: SET NULL) */
132
+ $unset?: Record<string, 1 | true>;
133
+ /** Increment numeric fields */
134
+ $inc?: Record<string, number>;
135
+ /** Decrement numeric fields */
136
+ $dec?: Record<string, number>;
137
+ /** Push to arrays (NoSQL only; SQL drivers throw `UnsupportedUpdateOperationError`) */
138
+ $push?: Record<string, unknown>;
139
+ /** Pull from arrays (NoSQL only; SQL drivers throw `UnsupportedUpdateOperationError`) */
140
+ $pull?: Record<string, unknown>;
141
+ /** Add to arrays only when absent (NoSQL only; SQL drivers throw `UnsupportedUpdateOperationError`) */
142
+ $addToSet?: Record<string, unknown>;
143
+ /** Set fields only when an `upsert` inserts; a no-op when an existing document is updated */
132
144
  $setOnInsert?: Record<string, unknown>;
133
145
  };
134
146
  /**
@@ -137,14 +149,16 @@ type UpdateOperations = {
137
149
  *
138
150
  * MongoDB only — SQL drivers throw `UnsupportedUpdateOperationError`.
139
151
  */
140
- type UpdatePipeline = Record<string, unknown>[];
152
+ export type UpdatePipeline = Record<string, unknown>[];
141
153
  /** An update accepted by the atomic APIs: an operator object or a pipeline. */
142
- type AtomicUpdate = UpdateOperations | UpdatePipeline;
154
+ export type AtomicUpdate = UpdateOperations | UpdatePipeline;
143
155
  /**
144
156
  * Options for `atomic()` / `findAndUpdate()`.
145
157
  */
146
- type AtomicUpdateOptions = {
147
- /** Insert a document when nothing matches the filter. Defaults to `false`. */upsert?: boolean; /** Filters selecting array elements for `$[identifier]` paths (MongoDB only). */
158
+ export type AtomicUpdateOptions = {
159
+ /** Insert a document when nothing matches the filter. Defaults to `false`. */
160
+ upsert?: boolean;
161
+ /** Filters selecting array elements for `$[identifier]` paths (MongoDB only). */
148
162
  arrayFilters?: Record<string, unknown>[];
149
163
  /**
150
164
  * Skip the model layer's operator-injection check on `filter`, allowing
@@ -157,18 +171,19 @@ type AtomicUpdateOptions = {
157
171
  /**
158
172
  * Options for `findOneAndUpdate()`.
159
173
  */
160
- type FindOneAndUpdateOptions = AtomicUpdateOptions & {
161
- /** Return the document as it was before or after the update. Defaults to `"after"`. */returnDocument?: "before" | "after";
174
+ export type FindOneAndUpdateOptions = AtomicUpdateOptions & {
175
+ /** Return the document as it was before or after the update. Defaults to `"after"`. */
176
+ returnDocument?: "before" | "after";
162
177
  };
163
178
  /**
164
179
  * Options a driver receives for atomic updates: the public options plus
165
180
  * driver-specific extras (e.g. a transaction session).
166
181
  */
167
- type DriverAtomicUpdateOptions = FindOneAndUpdateOptions & Record<string, unknown>;
182
+ export type DriverAtomicUpdateOptions = FindOneAndUpdateOptions & Record<string, unknown>;
168
183
  /**
169
184
  * Unified driver contract used by the model layer.
170
185
  */
171
- interface DriverContract {
186
+ export interface DriverContract {
172
187
  /**
173
188
  * The name of the driver.
174
189
  *
@@ -514,19 +529,24 @@ interface DriverContract {
514
529
  /**
515
530
  * Options for creating a database.
516
531
  */
517
- type CreateDatabaseOptions = {
518
- /** Database encoding (PostgreSQL: UTF8, LATIN1, etc.) */encoding?: string; /** Template database (PostgreSQL) */
519
- template?: string; /** Locale/collation settings */
520
- locale?: string; /** Owner of the new database */
532
+ export type CreateDatabaseOptions = {
533
+ /** Database encoding (PostgreSQL: UTF8, LATIN1, etc.) */
534
+ encoding?: string;
535
+ /** Template database (PostgreSQL) */
536
+ template?: string;
537
+ /** Locale/collation settings */
538
+ locale?: string;
539
+ /** Owner of the new database */
521
540
  owner?: string;
522
541
  };
523
542
  /**
524
543
  * Options for dropping a database.
525
544
  */
526
- type DropDatabaseOptions = {
527
- /** Force drop even if there are active connections */force?: boolean; /** Skip error if database doesn't exist */
545
+ export type DropDatabaseOptions = {
546
+ /** Force drop even if there are active connections */
547
+ force?: boolean;
548
+ /** Skip error if database doesn't exist */
528
549
  ifExists?: boolean;
529
550
  };
530
551
  //#endregion
531
- export { AtomicUpdate, AtomicUpdateOptions, CreateDatabaseOptions, DriverAtomicUpdateOptions, DriverContract, DriverEvent, DriverEventListener, DriverTransactionContract, DropDatabaseOptions, FindOneAndUpdateOptions, InsertResult, QueryEvent, RawQueryResult, TransactionContext, UpdateOperations, UpdatePipeline, UpdateResult };
532
552
  //# sourceMappingURL=database-driver.contract.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"database-driver.contract.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/contracts/database-driver.contract.ts"],"mappings":";;;;;;;;;;;KASY,WAAA;;KAGA,mBAAA,OAA0B,IAAI;;;;AAHnB;AAGvB;;KAQY,UAAA;EACV,UAAA;EACA,MAA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AA,IAAe,mBAAA;EAboB;EAgBnC,eAAA,IAAmB,uBAAA;EAhBjB;;;;;;;EAyBF,wBAAA;EAlBE;;;;EAwBF,gBAAA,IAf0C,aAAA;EANvC;;;;;;;;;;;;EAmCH,KAAA,KAAU,MAAA,mBAAyB,GAAA,UAAa,MAAA,eAAqB,OAAA,CAAQ,cAAA,CAAe,CAAA;EAA5C;;;;;;;;;;;;;;;;;;EAwBhD,cAAA,CAAe,IAAA,UAAc,OAAA,GAAU,qBAAA,GAAwB,OAAA;EA0D/D;;;;;;;;;AA6BwB;AAM1B;;;;;EA5EE,YAAA,CAAa,IAAA,UAAc,OAAA,GAAU,mBAAA,GAAsB,OAAA;EAkF3D;;;AAEK;AAMP;;;;AAIU;;;;;;EA9ER,cAAA,CAAe,IAAA,WAAe,OAAA;;;;;;EAO9B,aAAA,IAAiB,OAAA;;;;;;;;;;;;;EAkBjB,SAAA,CAAU,IAAA,WAAe,OAAA;;;;;;;;;;;;;EAczB,iBAAA,CAAkB,IAAA,WAAe,OAAA;;;;;;;;;;;;;;EAejC,aAAA,IAAiB,OAAA;AAAA;;;;KAMP,qBAAA;2DAEV,QAAA;EAEA,QAAA;EAEA,MAAA;EAEA,KAAA;AAAA;;;;KAMU,mBAAA;wDAEV,KAAA;EAEA,QAAQ;AAAA"}
1
+ {"version":3,"file":"database-driver.contract.d.mts","names":["_$___migration_sql_serializer0.SQLSerializer"],"sources":["../../../../../../../../packages/cascade/src/contracts/database-driver.contract.ts"],"mappings":";;;;;;;;;;YASY;;YAGA,0BAA0B;;;;;;;YAQ1B;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;iBAIe,0BAA0B;;EAEzC,SAAS;;EAET,UAAU;;EAEV,YAAY;;;;;;;;iBASG;;;;;;;;;;;;;;;;;;;EAmBf,SAAS;;;YAIC,aAAa;EACvB,UAAU;;;YAIA;EACV;;EAEA;;;;;;;;;;;;YAaU,eAAe,IAAI;;WAEpB,MAAM;;WAEN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,WACE,eACA,SAAS,yBACT,UAAU,0BACT;;;;;;;;;;;;;;;;;;;;EAqBH,cAAc,eAAe,UAAU,0BAA0B;;EAGjE,aAAa,aAAa,gBAAgB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;EA0B/D,iBAAiB,UAAU,0BAA0B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6C7D,YAAY,GACV,KAAK,KAAK,uBAAuB,QAAQ,IACzC,UAAU,0BACT,QAAQ;;EAGX,OACE,eACA,QAAQ,yBACR,YAAY,cACZ,UAAU,4BACT,QAAQ;;EAGX,eAAe;;EAGf,mBAAmB;;;;;;;;EASnB;;;;;EAMA,oBAfmBA;;;;;;;;;;;;;EA6BnB,MAAM,IAAI,yBAAyB,aAAa,qBAAqB,QAAQ,eAAe;;;;;;;;;;;;;;;;;;;EAwB5F,eAAe,cAAc,UAAU,wBAAwB;;;;;;;;;;;;;;;;EAiB/D,aAAa,cAAc,UAAU,sBAAsB;;;;;;;;;;;;;;;EAgB3D,eAAe,eAAe;;;;;;EAO9B,iBAAiB;;;;;;;;;;;;;EAkBjB,UAAU,eAAe;;;;;;;;;;;;;EAczB,kBAAkB,eAAe;;;;;;;;;;;;;;EAejC,iBAAiB;;;;;YAMP;;EAEV;;EAEA;;EAEA;;EAEA;;;;;YAMU;;EAEV;;EAEA"}
@@ -2,9 +2,12 @@
2
2
  /**
3
3
  * Options for generating the next ID.
4
4
  */
5
- type GenerateIdOptions = {
6
- /** The table/collection name */table: string; /** Initial ID value for the first record (default: 1) */
7
- initialId?: number; /** Amount to increment by for each new record (default: 1) */
5
+ export type GenerateIdOptions = {
6
+ /** The table/collection name */
7
+ table: string;
8
+ /** Initial ID value for the first record (default: 1) */
9
+ initialId?: number;
10
+ /** Amount to increment by for each new record (default: 1) */
8
11
  incrementIdBy?: number;
9
12
  };
10
13
  /**
@@ -38,7 +41,7 @@ type GenerateIdOptions = {
38
41
  * await idGenerator.setLastId("users", 5000);
39
42
  * ```
40
43
  */
41
- interface IdGeneratorContract {
44
+ export interface IdGeneratorContract {
42
45
  /**
43
46
  * Generate the next ID for a table.
44
47
  *
@@ -143,5 +146,4 @@ interface IdGeneratorContract {
143
146
  setLastId(table: string, id: number): Promise<void>;
144
147
  }
145
148
  //#endregion
146
- export { GenerateIdOptions, IdGeneratorContract };
147
149
  //# sourceMappingURL=database-id-generator.contract.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"database-id-generator.contract.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/contracts/database-id-generator.contract.ts"],"mappings":";;AAGA;;KAAY,iBAAA;EAAiB,gCAE3B,KAAA,UAEA;EAAA,SAAA,WAEa;EAAb,aAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyI6C;;;;UAvG9B,mBAAA;;;;;;;;;;;;;;;;;;;;;;;;EAwBf,cAAA,CAAe,OAAA,EAAS,iBAAA,GAAoB,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC5C,eAAA,EAAiB,OAAA,EAAS,iBAAA;IAAsB,KAAA;EAAA,IAAkB,OAAA;;;;;;;;;;;;;;;EAgBlE,SAAA,CAAU,KAAA,WAAgB,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;EA0B1B,SAAA,CAAU,KAAA,UAAe,EAAA,WAAa,OAAA;AAAA"}
1
+ {"version":3,"file":"database-id-generator.contract.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/contracts/database-id-generator.contract.ts"],"mappings":";;;;YAGY;;EAEV;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkCe;;;;;;;;;;;;;;;;;;;;;;;;EAwBf,eAAe,SAAS,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC5C,iBAAiB,SAAS;IAAsB;MAAkB;;;;;;;;;;;;;;;EAgBlE,UAAU,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;EA0B1B,UAAU,eAAe,aAAa"}
@@ -1,5 +1,4 @@
1
1
  import { DeleteStrategy } from "../types.mjs";
2
-
3
2
  //#region ../../packages/cascade/src/contracts/database-remover.contract.d.ts
4
3
  /**
5
4
  * Remover service contract for deleting models from the database.
@@ -22,7 +21,7 @@ import { DeleteStrategy } from "../types.mjs";
22
21
  * console.log(result.deletedCount); // 1
23
22
  * ```
24
23
  */
25
- interface RemoverContract {
24
+ export interface RemoverContract {
26
25
  /**
27
26
  * Destroy (delete) the model instance from the database.
28
27
  *
@@ -55,7 +54,7 @@ interface RemoverContract {
55
54
  /**
56
55
  * Options for controlling the destroy operation.
57
56
  */
58
- type RemoverOptions = {
57
+ export type RemoverOptions = {
59
58
  /**
60
59
  * Override the delete strategy for this operation.
61
60
  * Takes precedence over model static property and data source default.
@@ -81,7 +80,7 @@ type RemoverOptions = {
81
80
  /**
82
81
  * Result returned after a successful destroy operation.
83
82
  */
84
- type RemoverResult = {
83
+ export type RemoverResult = {
85
84
  /**
86
85
  * Whether the destroy operation succeeded.
87
86
  */
@@ -104,5 +103,4 @@ type RemoverResult = {
104
103
  trashRecord?: Record<string, unknown>;
105
104
  };
106
105
  //#endregion
107
- export { RemoverContract, RemoverOptions, RemoverResult };
108
106
  //# sourceMappingURL=database-remover.contract.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"database-remover.contract.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/contracts/database-remover.contract.ts"],"mappings":";;;;;AAuBA;;;;;;;;;;;;;;AA4B0D;AAM1D;;;;UAlCiB,eAAA;EAyCJ;;;;AAgBH;AAMV;;;;;;;;;;;AAuBsB;;;;;;;;;;;EA1DpB,OAAA,CAAQ,OAAA,GAAU,cAAA,GAAiB,OAAA,CAAQ,aAAA;AAAA;;;;KAMjC,cAAA;;;;;;;EAOV,QAAA,GAAW,cAAc;;;;;;;EAQzB,UAAA;;;;;;;EAQA,QAAA;AAAA;;;;KAMU,aAAA;;;;EAIV,OAAA;;;;;;;EAQA,YAAA;;;;EAKA,QAAA,EAAU,cAAA;;;;;EAMV,WAAA,GAAc,MAAM;AAAA"}
1
+ {"version":3,"file":"database-remover.contract.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/contracts/database-remover.contract.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;iBAuBiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4Bf,QAAQ,UAAU,iBAAiB,QAAQ;;;;;YAMjC;;;;;;;EAOV,WAAW;;;;;;;EAQX;;;;;;;EAQA;;;;;YAMU;;;;EAIV;;;;;;;EAQA;;;;EAKA,UAAU;;;;;EAMV,cAAc"}
@@ -1,5 +1,4 @@
1
1
  import { Model } from "../model/model.mjs";
2
-
3
2
  //#region ../../packages/cascade/src/contracts/database-restorer.contract.d.ts
4
3
  /**
5
4
  * Restorer service contract for restoring deleted models from the database.
@@ -21,7 +20,7 @@ import { Model } from "../model/model.mjs";
21
20
  * console.log(result.restoredCount); // 1
22
21
  * ```
23
22
  */
24
- interface RestorerContract {
23
+ export interface RestorerContract {
25
24
  /**
26
25
  * Restore a single deleted record by its ID.
27
26
  *
@@ -75,7 +74,7 @@ interface RestorerContract {
75
74
  /**
76
75
  * Options for controlling the restore operation.
77
76
  */
78
- type RestorerOptions = {
77
+ export type RestorerOptions = {
79
78
  /**
80
79
  * Override the delete strategy for this operation.
81
80
  * Takes precedence over model static property and data source default.
@@ -105,7 +104,7 @@ type RestorerOptions = {
105
104
  /**
106
105
  * Result returned after a successful restore operation.
107
106
  */
108
- type RestorerResult = {
107
+ export type RestorerResult = {
109
108
  /**
110
109
  * Whether the restore operation succeeded.
111
110
  */
@@ -136,10 +135,11 @@ type RestorerResult = {
136
135
  * Only populated if onIdConflict is "assignNew" and conflicts occurred.
137
136
  */
138
137
  conflicts?: Array<{
139
- /** The original ID that conflicted */id: string | number; /** Reason for the conflict */
138
+ /** The original ID that conflicted */
139
+ id: string | number;
140
+ /** Reason for the conflict */
140
141
  reason: string;
141
142
  }>;
142
143
  };
143
144
  //#endregion
144
- export { RestorerContract, RestorerOptions, RestorerResult };
145
145
  //# sourceMappingURL=database-restorer.contract.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"database-restorer.contract.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/contracts/database-restorer.contract.ts"],"mappings":";;;;;AAsBA;;;;;;;;;;;;;;;;;;UAAiB,gBAAA;EAkDJ;;;;AAAkD;AAM/D;;;;;;;;AA2BY;AAMZ;;;;;;;;;;;;;;;EA3DE,OAAA,CAAQ,EAAA,mBAAqB,OAAA,GAAU,eAAA,GAAkB,OAAA,CAAQ,cAAA;EA8FrD;;;;AAIJ;;;;;;;;;;;;;;EA9ER,UAAA,CAAW,OAAA,GAAU,eAAA,GAAkB,OAAA,CAAQ,cAAA;AAAA;;;;KAMrC,eAAA;;;;;;;;;EASV,QAAA;;;;;;;;;EAUA,YAAA;;;;;;;EAQA,UAAA;AAAA;;;;KAMU,cAAA;;;;EAIV,OAAA;;;;;;EAOA,aAAA;;;;;;EAOA,QAAA;;;;;EAMA,cAAA,GAAiB,KAAA;;;;EAKjB,eAAA,GAAkB,KAAA;;;;;EAMlB,SAAA,GAAY,KAAA;0CAEV,EAAA;IAEA,MAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"database-restorer.contract.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/contracts/database-restorer.contract.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;iBAsBiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8Bf,QAAQ,qBAAqB,UAAU,kBAAkB,QAAQ;;;;;;;;;;;;;;;;;;;EAoBjE,WAAW,UAAU,kBAAkB,QAAQ;;;;;YAMrC;;;;;;;;;EASV;;;;;;;;;EAUA;;;;;;;EAQA;;;;;YAMU;;;;EAIV;;;;;;EAOA;;;;;;EAOA;;;;;EAMA,iBAAiB;;;;EAKjB,kBAAkB;;;;;EAMlB,YAAY;;IAEV;;IAEA"}
@@ -1,5 +1,4 @@
1
1
  import { UpdateOperations } from "./database-driver.contract.mjs";
2
-
3
2
  //#region ../../packages/cascade/src/contracts/database-writer.contract.d.ts
4
3
  /**
5
4
  * Writer service contract for persisting models to the database.
@@ -22,7 +21,7 @@ import { UpdateOperations } from "./database-driver.contract.mjs";
22
21
  * console.log(result.document); // { _id: ..., id: 1, name: "Alice" }
23
22
  * ```
24
23
  */
25
- interface WriterContract {
24
+ export interface WriterContract {
26
25
  /**
27
26
  * Save the model instance to the database.
28
27
  *
@@ -58,7 +57,7 @@ interface WriterContract {
58
57
  /**
59
58
  * Options for controlling the save operation.
60
59
  */
61
- type WriterOptions = {
60
+ export type WriterOptions = {
62
61
  /**
63
62
  * Skip validation and casting.
64
63
  * Useful when data is already validated or for performance-critical operations.
@@ -90,7 +89,7 @@ type WriterOptions = {
90
89
  /**
91
90
  * Result returned after a successful save operation.
92
91
  */
93
- type WriterResult = {
92
+ export type WriterResult = {
94
93
  /**
95
94
  * Whether the save operation succeeded.
96
95
  */
@@ -117,7 +116,6 @@ type WriterResult = {
117
116
  *
118
117
  * @internal
119
118
  */
120
- type BuildUpdateOperationsResult = UpdateOperations;
119
+ export type BuildUpdateOperationsResult = UpdateOperations;
121
120
  //#endregion
122
- export { BuildUpdateOperationsResult, WriterContract, WriterOptions, WriterResult };
123
121
  //# sourceMappingURL=database-writer.contract.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"database-writer.contract.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/contracts/database-writer.contract.ts"],"mappings":";;;;;AAuBA;;;;;;;;;;;;;;AA+BqD;AAMrD;;;;UArCiB,cAAA;EAoDf;;;;AAeO;AAMT;;;;;;;;;;AAuBe;AAQf;;;;AAA0D;;;;;;;;;;EAzExD,IAAA,CAAK,OAAA,GAAU,aAAA,GAAgB,OAAA,CAAQ,YAAA;AAAA;;;;KAM7B,aAAA;;;;;;;EAOV,cAAA;;;;;;;EAQA,UAAA;;;;;;;EAQA,QAAA;;;;;;EAOA,OAAA;AAAA;;;;KAMU,YAAA;;;;EAIV,OAAA;;;;;EAMA,QAAA,EAAU,MAAM;;;;;;EAOhB,KAAA;;;;;EAMA,aAAA;AAAA;;;;;;KAQU,2BAAA,GAA8B,gBAAgB"}
1
+ {"version":3,"file":"database-writer.contract.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/contracts/database-writer.contract.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;iBAuBiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+Bf,KAAK,UAAU,gBAAgB,QAAQ;;;;;YAM7B;;;;;;;EAOV;;;;;;;EAQA;;;;;;;EAQA;;;;;;EAOA;;;;;YAMU;;;;EAIV;;;;;EAMA,UAAU;;;;;;EAOV;;;;;EAMA;;;;;;;YAQU,8BAA8B"}
@@ -1,5 +1,5 @@
1
1
  //#region ../../packages/cascade/src/contracts/driver-blueprint.contract.d.ts
2
- interface DriverBlueprintContract {
2
+ export interface DriverBlueprintContract {
3
3
  /**
4
4
  * Get tables list
5
5
  */
@@ -21,7 +21,7 @@ interface DriverBlueprintContract {
21
21
  */
22
22
  tableExists(table: string): Promise<boolean>;
23
23
  }
24
- type TableIndexInformation = {
24
+ export type TableIndexInformation = {
25
25
  /**
26
26
  * Index name
27
27
  */
@@ -48,5 +48,4 @@ type TableIndexInformation = {
48
48
  options: Record<string, any>;
49
49
  };
50
50
  //#endregion
51
- export { DriverBlueprintContract, TableIndexInformation };
52
51
  //# sourceMappingURL=driver-blueprint.contract.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"driver-blueprint.contract.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/contracts/driver-blueprint.contract.ts"],"mappings":";UAAiB,uBAAA;EAAA;;;EAIf,UAAA,IAAc,OAAA;EAIsB;;;EAApC,WAAA,CAAY,KAAA,WAAgB,OAAA,CAAQ,qBAAA;EAeR;;;EAV5B,UAAA,IAAc,OAAA;EATA;;;EAcd,WAAA,CAAY,KAAA,WAAgB,OAAA;EAVQ;;;EAepC,WAAA,CAAY,KAAA,WAAgB,OAAA;AAAA;AAAA,KAGlB,qBAAA;EAHV;;;EAOA,IAAA;EAPmC;AAGrC;;EASE,OAAA;EAoBe;;;EAff,IAAA;EAKA;;;EAAA,MAAA;EAUe;AAAA;;EALf,OAAA;;;;EAKA,OAAA,EAAS,MAAM;AAAA"}
1
+ {"version":3,"file":"driver-blueprint.contract.d.mts","names":[],"sources":["../../../../../../../../packages/cascade/src/contracts/driver-blueprint.contract.ts"],"mappings":";iBAAiB;;;;EAIf,cAAc;;;;EAId,YAAY,gBAAgB,QAAQ;;;;EAKpC,cAAc;;;;EAKd,YAAY,gBAAgB;;;;EAK5B,YAAY,gBAAgB;;YAGlB;;;;EAIV;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA,SAAS"}
@@ -6,4 +6,5 @@ import { AtomicUpdate, AtomicUpdateOptions, CreateDatabaseOptions, DriverAtomicU
6
6
  import { GenerateIdOptions, IdGeneratorContract } from "./database-id-generator.contract.mjs";
7
7
  import { RemoverContract, RemoverOptions, RemoverResult } from "./database-remover.contract.mjs";
8
8
  import { RestorerContract, RestorerOptions, RestorerResult } from "./database-restorer.contract.mjs";
9
- import { BuildUpdateOperationsResult, WriterContract, WriterOptions, WriterResult } from "./database-writer.contract.mjs";
9
+ import { BuildUpdateOperationsResult, WriterContract, WriterOptions, WriterResult } from "./database-writer.contract.mjs";
10
+ export { AtomicUpdate, AtomicUpdateOptions, BuildUpdateOperationsResult, ChunkCallback, ColumnDefinition, ColumnType, CreateDatabaseOptions, CursorPaginationOptions, CursorPaginationResult, DriverAtomicUpdateOptions, DriverBlueprintContract, DriverContract, DriverEvent, DriverEventListener, DriverQuery, DriverTransactionContract, DropDatabaseOptions, FindOneAndUpdateOptions, ForeignKeyDefinition, FullTextIndexOptions, GenerateIdOptions, GeoIndexOptions, GroupByInput, HavingInput, IdGeneratorContract, IndexDefinition, InsertResult, JoinOptions, LeanDocument, LockForUpdateOptions, MigrationDriverContract, MigrationDriverFactory, OrderDirection, PaginationOptions, PaginationResult, QueryBuilderContract, QueryEvent, RawExpression, RawQueryResult, RemoverContract, RemoverOptions, RemoverResult, RestorerContract, RestorerOptions, RestorerResult, SyncAdapterContract, SyncInstruction, TableIndexInformation, TransactionContext, UnwindOptions, UpdateOperations, UpdatePipeline, UpdateResult, VectorIndexOptions, WhereCallback, WhereObject, WhereOperator, WriterContract, WriterOptions, WriterResult };