@warlock.js/cascade 4.0.92 → 4.0.93

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 (269) hide show
  1. package/cjs/contracts/database-driver.contract.d.ts +118 -0
  2. package/cjs/contracts/database-driver.contract.d.ts.map +1 -1
  3. package/cjs/contracts/migration-driver.contract.d.ts +14 -0
  4. package/cjs/contracts/migration-driver.contract.d.ts.map +1 -1
  5. package/cjs/contracts/query-builder.contract.d.ts +410 -1
  6. package/cjs/contracts/query-builder.contract.d.ts.map +1 -1
  7. package/cjs/data-source/data-source-registry.d.ts +4 -0
  8. package/cjs/data-source/data-source-registry.d.ts.map +1 -1
  9. package/cjs/data-source/data-source-registry.js +7 -0
  10. package/cjs/data-source/data-source-registry.js.map +1 -1
  11. package/cjs/drivers/mongodb/mongodb-blueprint.d.ts.map +1 -0
  12. package/cjs/drivers/mongodb/mongodb-blueprint.js.map +1 -0
  13. package/{esm/drivers/mongo → cjs/drivers/mongodb}/mongodb-driver.d.ts +49 -0
  14. package/cjs/drivers/mongodb/mongodb-driver.d.ts.map +1 -0
  15. package/cjs/drivers/{mongo → mongodb}/mongodb-driver.js +125 -8
  16. package/cjs/drivers/mongodb/mongodb-driver.js.map +1 -0
  17. package/cjs/drivers/{mongo/mongo-id-generator.d.ts → mongodb/mongodb-id-generator.d.ts} +1 -1
  18. package/cjs/drivers/mongodb/mongodb-id-generator.d.ts.map +1 -0
  19. package/cjs/drivers/{mongo/mongo-id-generator.js → mongodb/mongodb-id-generator.js} +1 -1
  20. package/cjs/drivers/mongodb/mongodb-id-generator.js.map +1 -0
  21. package/cjs/drivers/{mongo/mongo-migration-driver.d.ts → mongodb/mongodb-migration-driver.d.ts} +10 -1
  22. package/cjs/drivers/mongodb/mongodb-migration-driver.d.ts.map +1 -0
  23. package/cjs/drivers/{mongo/mongo-migration-driver.js → mongodb/mongodb-migration-driver.js} +18 -1
  24. package/cjs/drivers/mongodb/mongodb-migration-driver.js.map +1 -0
  25. package/cjs/drivers/{mongo/mongo-query-builder.d.ts → mongodb/mongodb-query-builder.d.ts} +172 -4
  26. package/cjs/drivers/mongodb/mongodb-query-builder.d.ts.map +1 -0
  27. package/cjs/drivers/{mongo/mongo-query-builder.js → mongodb/mongodb-query-builder.js} +220 -14
  28. package/cjs/drivers/mongodb/mongodb-query-builder.js.map +1 -0
  29. package/{esm/drivers/mongo/mongo-query-operations.d.ts → cjs/drivers/mongodb/mongodb-query-operations.d.ts} +16 -16
  30. package/cjs/drivers/mongodb/mongodb-query-operations.d.ts.map +1 -0
  31. package/cjs/drivers/{mongo/mongo-query-operations.js → mongodb/mongodb-query-operations.js} +22 -22
  32. package/cjs/drivers/mongodb/mongodb-query-operations.js.map +1 -0
  33. package/cjs/drivers/{mongo/mongo-query-parser.d.ts → mongodb/mongodb-query-parser.d.ts} +2 -2
  34. package/cjs/drivers/mongodb/mongodb-query-parser.d.ts.map +1 -0
  35. package/cjs/drivers/{mongo/mongo-query-parser.js → mongodb/mongodb-query-parser.js} +87 -87
  36. package/cjs/drivers/mongodb/mongodb-query-parser.js.map +1 -0
  37. package/cjs/drivers/{mongo/mongo-sync-adapter.d.ts → mongodb/mongodb-sync-adapter.d.ts} +2 -2
  38. package/cjs/drivers/mongodb/mongodb-sync-adapter.d.ts.map +1 -0
  39. package/cjs/drivers/{mongo/mongo-sync-adapter.js → mongodb/mongodb-sync-adapter.js} +2 -2
  40. package/cjs/drivers/mongodb/mongodb-sync-adapter.js.map +1 -0
  41. package/{esm/drivers/mongo → cjs/drivers/mongodb}/types.d.ts +2 -2
  42. package/cjs/drivers/mongodb/types.d.ts.map +1 -0
  43. package/cjs/drivers/postgres/index.d.ts +16 -0
  44. package/cjs/drivers/postgres/index.d.ts.map +1 -0
  45. package/cjs/drivers/postgres/postgres-blueprint.d.ts +64 -0
  46. package/cjs/drivers/postgres/postgres-blueprint.d.ts.map +1 -0
  47. package/cjs/drivers/postgres/postgres-blueprint.js +121 -0
  48. package/cjs/drivers/postgres/postgres-blueprint.js.map +1 -0
  49. package/cjs/drivers/postgres/postgres-dialect.d.ts +135 -0
  50. package/cjs/drivers/postgres/postgres-dialect.d.ts.map +1 -0
  51. package/cjs/drivers/postgres/postgres-dialect.js +245 -0
  52. package/cjs/drivers/postgres/postgres-dialect.js.map +1 -0
  53. package/cjs/drivers/postgres/postgres-driver.d.ts +360 -0
  54. package/cjs/drivers/postgres/postgres-driver.d.ts.map +1 -0
  55. package/cjs/drivers/postgres/postgres-driver.js +763 -0
  56. package/cjs/drivers/postgres/postgres-driver.js.map +1 -0
  57. package/cjs/drivers/postgres/postgres-migration-driver.d.ts +297 -0
  58. package/cjs/drivers/postgres/postgres-migration-driver.d.ts.map +1 -0
  59. package/cjs/drivers/postgres/postgres-migration-driver.js +578 -0
  60. package/cjs/drivers/postgres/postgres-migration-driver.js.map +1 -0
  61. package/cjs/drivers/postgres/postgres-query-builder.d.ts +824 -0
  62. package/cjs/drivers/postgres/postgres-query-builder.d.ts.map +1 -0
  63. package/cjs/drivers/postgres/postgres-query-builder.js +1800 -0
  64. package/cjs/drivers/postgres/postgres-query-builder.js.map +1 -0
  65. package/cjs/drivers/postgres/postgres-query-parser.d.ts +308 -0
  66. package/cjs/drivers/postgres/postgres-query-parser.d.ts.map +1 -0
  67. package/cjs/drivers/postgres/postgres-query-parser.js +706 -0
  68. package/cjs/drivers/postgres/postgres-query-parser.js.map +1 -0
  69. package/cjs/drivers/postgres/postgres-sync-adapter.d.ts +83 -0
  70. package/cjs/drivers/postgres/postgres-sync-adapter.d.ts.map +1 -0
  71. package/cjs/drivers/postgres/postgres-sync-adapter.js +197 -0
  72. package/cjs/drivers/postgres/postgres-sync-adapter.js.map +1 -0
  73. package/cjs/drivers/postgres/types.d.ts +142 -0
  74. package/cjs/drivers/postgres/types.d.ts.map +1 -0
  75. package/cjs/drivers/sql/index.d.ts +10 -0
  76. package/cjs/drivers/sql/index.d.ts.map +1 -0
  77. package/cjs/drivers/sql/sql-dialect.contract.d.ts +203 -0
  78. package/cjs/drivers/sql/sql-dialect.contract.d.ts.map +1 -0
  79. package/cjs/drivers/sql/sql-types.d.ts +202 -0
  80. package/cjs/drivers/sql/sql-types.d.ts.map +1 -0
  81. package/cjs/index.d.ts +9 -6
  82. package/cjs/index.d.ts.map +1 -1
  83. package/cjs/index.js +1 -1
  84. package/cjs/migration/migration-runner.d.ts.map +1 -1
  85. package/cjs/migration/migration-runner.js +3 -0
  86. package/cjs/migration/migration-runner.js.map +1 -1
  87. package/cjs/model/model.d.ts +236 -1
  88. package/cjs/model/model.d.ts.map +1 -1
  89. package/cjs/model/model.js +203 -4
  90. package/cjs/model/model.js.map +1 -1
  91. package/cjs/relations/helpers.d.ts +156 -0
  92. package/cjs/relations/helpers.d.ts.map +1 -0
  93. package/cjs/relations/helpers.js +197 -0
  94. package/cjs/relations/helpers.js.map +1 -0
  95. package/cjs/relations/index.d.ts +33 -0
  96. package/cjs/relations/index.d.ts.map +1 -0
  97. package/cjs/relations/pivot-operations.d.ts +160 -0
  98. package/cjs/relations/pivot-operations.d.ts.map +1 -0
  99. package/cjs/relations/pivot-operations.js +293 -0
  100. package/cjs/relations/pivot-operations.js.map +1 -0
  101. package/cjs/relations/relation-loader.d.ts +194 -0
  102. package/cjs/relations/relation-loader.d.ts.map +1 -0
  103. package/cjs/relations/relation-loader.js +466 -0
  104. package/cjs/relations/relation-loader.js.map +1 -0
  105. package/cjs/relations/types.d.ts +280 -0
  106. package/cjs/relations/types.d.ts.map +1 -0
  107. package/cjs/sync/model-sync-operation.js +1 -1
  108. package/cjs/sync/model-sync-operation.js.map +1 -1
  109. package/cjs/utils/connect-to-database.d.ts.map +1 -1
  110. package/cjs/utils/connect-to-database.js +15 -3
  111. package/cjs/utils/connect-to-database.js.map +1 -1
  112. package/cjs/utils/define-model.d.ts +51 -29
  113. package/cjs/utils/define-model.d.ts.map +1 -1
  114. package/cjs/validation/rules/database-model-rule.js +1 -1
  115. package/cjs/validation/rules/database-model-rule.js.map +1 -1
  116. package/esm/contracts/database-driver.contract.d.ts +118 -0
  117. package/esm/contracts/database-driver.contract.d.ts.map +1 -1
  118. package/esm/contracts/migration-driver.contract.d.ts +14 -0
  119. package/esm/contracts/migration-driver.contract.d.ts.map +1 -1
  120. package/esm/contracts/query-builder.contract.d.ts +410 -1
  121. package/esm/contracts/query-builder.contract.d.ts.map +1 -1
  122. package/esm/data-source/data-source-registry.d.ts +4 -0
  123. package/esm/data-source/data-source-registry.d.ts.map +1 -1
  124. package/esm/data-source/data-source-registry.js +7 -0
  125. package/esm/data-source/data-source-registry.js.map +1 -1
  126. package/esm/drivers/mongodb/mongodb-blueprint.d.ts.map +1 -0
  127. package/esm/drivers/mongodb/mongodb-blueprint.js.map +1 -0
  128. package/{cjs/drivers/mongo → esm/drivers/mongodb}/mongodb-driver.d.ts +49 -0
  129. package/esm/drivers/mongodb/mongodb-driver.d.ts.map +1 -0
  130. package/esm/drivers/{mongo → mongodb}/mongodb-driver.js +121 -4
  131. package/esm/drivers/mongodb/mongodb-driver.js.map +1 -0
  132. package/esm/drivers/{mongo/mongo-id-generator.d.ts → mongodb/mongodb-id-generator.d.ts} +1 -1
  133. package/esm/drivers/mongodb/mongodb-id-generator.d.ts.map +1 -0
  134. package/esm/drivers/{mongo/mongo-id-generator.js → mongodb/mongodb-id-generator.js} +1 -1
  135. package/esm/drivers/mongodb/mongodb-id-generator.js.map +1 -0
  136. package/esm/drivers/{mongo/mongo-migration-driver.d.ts → mongodb/mongodb-migration-driver.d.ts} +10 -1
  137. package/esm/drivers/mongodb/mongodb-migration-driver.d.ts.map +1 -0
  138. package/esm/drivers/{mongo/mongo-migration-driver.js → mongodb/mongodb-migration-driver.js} +18 -1
  139. package/esm/drivers/mongodb/mongodb-migration-driver.js.map +1 -0
  140. package/esm/drivers/{mongo/mongo-query-builder.d.ts → mongodb/mongodb-query-builder.d.ts} +172 -4
  141. package/esm/drivers/mongodb/mongodb-query-builder.d.ts.map +1 -0
  142. package/esm/drivers/{mongo/mongo-query-builder.js → mongodb/mongodb-query-builder.js} +218 -12
  143. package/esm/drivers/mongodb/mongodb-query-builder.js.map +1 -0
  144. package/{cjs/drivers/mongo/mongo-query-operations.d.ts → esm/drivers/mongodb/mongodb-query-operations.d.ts} +16 -16
  145. package/esm/drivers/mongodb/mongodb-query-operations.d.ts.map +1 -0
  146. package/esm/drivers/{mongo/mongo-query-operations.js → mongodb/mongodb-query-operations.js} +22 -22
  147. package/esm/drivers/mongodb/mongodb-query-operations.js.map +1 -0
  148. package/esm/drivers/{mongo/mongo-query-parser.d.ts → mongodb/mongodb-query-parser.d.ts} +2 -2
  149. package/esm/drivers/mongodb/mongodb-query-parser.d.ts.map +1 -0
  150. package/esm/drivers/{mongo/mongo-query-parser.js → mongodb/mongodb-query-parser.js} +87 -87
  151. package/esm/drivers/mongodb/mongodb-query-parser.js.map +1 -0
  152. package/esm/drivers/{mongo/mongo-sync-adapter.d.ts → mongodb/mongodb-sync-adapter.d.ts} +2 -2
  153. package/esm/drivers/mongodb/mongodb-sync-adapter.d.ts.map +1 -0
  154. package/esm/drivers/{mongo/mongo-sync-adapter.js → mongodb/mongodb-sync-adapter.js} +2 -2
  155. package/esm/drivers/mongodb/mongodb-sync-adapter.js.map +1 -0
  156. package/{cjs/drivers/mongo → esm/drivers/mongodb}/types.d.ts +2 -2
  157. package/esm/drivers/mongodb/types.d.ts.map +1 -0
  158. package/esm/drivers/postgres/index.d.ts +16 -0
  159. package/esm/drivers/postgres/index.d.ts.map +1 -0
  160. package/esm/drivers/postgres/postgres-blueprint.d.ts +64 -0
  161. package/esm/drivers/postgres/postgres-blueprint.d.ts.map +1 -0
  162. package/esm/drivers/postgres/postgres-blueprint.js +121 -0
  163. package/esm/drivers/postgres/postgres-blueprint.js.map +1 -0
  164. package/esm/drivers/postgres/postgres-dialect.d.ts +135 -0
  165. package/esm/drivers/postgres/postgres-dialect.d.ts.map +1 -0
  166. package/esm/drivers/postgres/postgres-dialect.js +245 -0
  167. package/esm/drivers/postgres/postgres-dialect.js.map +1 -0
  168. package/esm/drivers/postgres/postgres-driver.d.ts +360 -0
  169. package/esm/drivers/postgres/postgres-driver.d.ts.map +1 -0
  170. package/esm/drivers/postgres/postgres-driver.js +763 -0
  171. package/esm/drivers/postgres/postgres-driver.js.map +1 -0
  172. package/esm/drivers/postgres/postgres-migration-driver.d.ts +297 -0
  173. package/esm/drivers/postgres/postgres-migration-driver.d.ts.map +1 -0
  174. package/esm/drivers/postgres/postgres-migration-driver.js +578 -0
  175. package/esm/drivers/postgres/postgres-migration-driver.js.map +1 -0
  176. package/esm/drivers/postgres/postgres-query-builder.d.ts +824 -0
  177. package/esm/drivers/postgres/postgres-query-builder.d.ts.map +1 -0
  178. package/esm/drivers/postgres/postgres-query-builder.js +1800 -0
  179. package/esm/drivers/postgres/postgres-query-builder.js.map +1 -0
  180. package/esm/drivers/postgres/postgres-query-parser.d.ts +308 -0
  181. package/esm/drivers/postgres/postgres-query-parser.d.ts.map +1 -0
  182. package/esm/drivers/postgres/postgres-query-parser.js +706 -0
  183. package/esm/drivers/postgres/postgres-query-parser.js.map +1 -0
  184. package/esm/drivers/postgres/postgres-sync-adapter.d.ts +83 -0
  185. package/esm/drivers/postgres/postgres-sync-adapter.d.ts.map +1 -0
  186. package/esm/drivers/postgres/postgres-sync-adapter.js +197 -0
  187. package/esm/drivers/postgres/postgres-sync-adapter.js.map +1 -0
  188. package/esm/drivers/postgres/types.d.ts +142 -0
  189. package/esm/drivers/postgres/types.d.ts.map +1 -0
  190. package/esm/drivers/sql/index.d.ts +10 -0
  191. package/esm/drivers/sql/index.d.ts.map +1 -0
  192. package/esm/drivers/sql/sql-dialect.contract.d.ts +203 -0
  193. package/esm/drivers/sql/sql-dialect.contract.d.ts.map +1 -0
  194. package/esm/drivers/sql/sql-types.d.ts +202 -0
  195. package/esm/drivers/sql/sql-types.d.ts.map +1 -0
  196. package/esm/index.d.ts +9 -6
  197. package/esm/index.d.ts.map +1 -1
  198. package/esm/index.js +1 -1
  199. package/esm/migration/migration-runner.d.ts.map +1 -1
  200. package/esm/migration/migration-runner.js +3 -0
  201. package/esm/migration/migration-runner.js.map +1 -1
  202. package/esm/model/model.d.ts +236 -1
  203. package/esm/model/model.d.ts.map +1 -1
  204. package/esm/model/model.js +203 -4
  205. package/esm/model/model.js.map +1 -1
  206. package/esm/relations/helpers.d.ts +156 -0
  207. package/esm/relations/helpers.d.ts.map +1 -0
  208. package/esm/relations/helpers.js +197 -0
  209. package/esm/relations/helpers.js.map +1 -0
  210. package/esm/relations/index.d.ts +33 -0
  211. package/esm/relations/index.d.ts.map +1 -0
  212. package/esm/relations/pivot-operations.d.ts +160 -0
  213. package/esm/relations/pivot-operations.d.ts.map +1 -0
  214. package/esm/relations/pivot-operations.js +293 -0
  215. package/esm/relations/pivot-operations.js.map +1 -0
  216. package/esm/relations/relation-loader.d.ts +194 -0
  217. package/esm/relations/relation-loader.d.ts.map +1 -0
  218. package/esm/relations/relation-loader.js +466 -0
  219. package/esm/relations/relation-loader.js.map +1 -0
  220. package/esm/relations/types.d.ts +280 -0
  221. package/esm/relations/types.d.ts.map +1 -0
  222. package/esm/sync/model-sync-operation.js +1 -1
  223. package/esm/sync/model-sync-operation.js.map +1 -1
  224. package/esm/utils/connect-to-database.d.ts.map +1 -1
  225. package/esm/utils/connect-to-database.js +15 -3
  226. package/esm/utils/connect-to-database.js.map +1 -1
  227. package/esm/utils/define-model.d.ts +51 -29
  228. package/esm/utils/define-model.d.ts.map +1 -1
  229. package/esm/validation/rules/database-model-rule.js +1 -1
  230. package/esm/validation/rules/database-model-rule.js.map +1 -1
  231. package/package.json +4 -4
  232. package/cjs/drivers/mongo/mongo-id-generator.d.ts.map +0 -1
  233. package/cjs/drivers/mongo/mongo-id-generator.js.map +0 -1
  234. package/cjs/drivers/mongo/mongo-migration-driver.d.ts.map +0 -1
  235. package/cjs/drivers/mongo/mongo-migration-driver.js.map +0 -1
  236. package/cjs/drivers/mongo/mongo-query-builder.d.ts.map +0 -1
  237. package/cjs/drivers/mongo/mongo-query-builder.js.map +0 -1
  238. package/cjs/drivers/mongo/mongo-query-operations.d.ts.map +0 -1
  239. package/cjs/drivers/mongo/mongo-query-operations.js.map +0 -1
  240. package/cjs/drivers/mongo/mongo-query-parser.d.ts.map +0 -1
  241. package/cjs/drivers/mongo/mongo-query-parser.js.map +0 -1
  242. package/cjs/drivers/mongo/mongo-sync-adapter.d.ts.map +0 -1
  243. package/cjs/drivers/mongo/mongo-sync-adapter.js.map +0 -1
  244. package/cjs/drivers/mongo/mongodb-blueprint.d.ts.map +0 -1
  245. package/cjs/drivers/mongo/mongodb-blueprint.js.map +0 -1
  246. package/cjs/drivers/mongo/mongodb-driver.d.ts.map +0 -1
  247. package/cjs/drivers/mongo/mongodb-driver.js.map +0 -1
  248. package/cjs/drivers/mongo/types.d.ts.map +0 -1
  249. package/esm/drivers/mongo/mongo-id-generator.d.ts.map +0 -1
  250. package/esm/drivers/mongo/mongo-id-generator.js.map +0 -1
  251. package/esm/drivers/mongo/mongo-migration-driver.d.ts.map +0 -1
  252. package/esm/drivers/mongo/mongo-migration-driver.js.map +0 -1
  253. package/esm/drivers/mongo/mongo-query-builder.d.ts.map +0 -1
  254. package/esm/drivers/mongo/mongo-query-builder.js.map +0 -1
  255. package/esm/drivers/mongo/mongo-query-operations.d.ts.map +0 -1
  256. package/esm/drivers/mongo/mongo-query-operations.js.map +0 -1
  257. package/esm/drivers/mongo/mongo-query-parser.d.ts.map +0 -1
  258. package/esm/drivers/mongo/mongo-query-parser.js.map +0 -1
  259. package/esm/drivers/mongo/mongo-sync-adapter.d.ts.map +0 -1
  260. package/esm/drivers/mongo/mongo-sync-adapter.js.map +0 -1
  261. package/esm/drivers/mongo/mongodb-blueprint.d.ts.map +0 -1
  262. package/esm/drivers/mongo/mongodb-blueprint.js.map +0 -1
  263. package/esm/drivers/mongo/mongodb-driver.d.ts.map +0 -1
  264. package/esm/drivers/mongo/mongodb-driver.js.map +0 -1
  265. package/esm/drivers/mongo/types.d.ts.map +0 -1
  266. /package/cjs/drivers/{mongo → mongodb}/mongodb-blueprint.d.ts +0 -0
  267. /package/cjs/drivers/{mongo → mongodb}/mongodb-blueprint.js +0 -0
  268. /package/esm/drivers/{mongo → mongodb}/mongodb-blueprint.d.ts +0 -0
  269. /package/esm/drivers/{mongo → mongodb}/mongodb-blueprint.js +0 -0
@@ -10,7 +10,7 @@ import type { Operation, PipelineStage } from "./types";
10
10
  * Each operation consists of:
11
11
  * - **stage**: The MongoDB aggregation stage name (e.g., "$match", "$project")
12
12
  * - **type**: An internal identifier for the operation type
13
- * - **payload**: The data associated with the operation
13
+ * - **data**: The data associated with the operation
14
14
  * - **mergeable**: Whether this operation can be merged with adjacent similar operations
15
15
  *
16
16
  * @internal This class is for internal use within the MongoDB driver
@@ -29,8 +29,8 @@ import type { Operation, PipelineStage } from "./types";
29
29
  * // Operations array is now populated
30
30
  * console.log(operations);
31
31
  * // [
32
- * // { stage: "$match", mergeable: true, type: "whereIn", payload: {...} },
33
- * // { stage: "$project", mergeable: true, type: "select", payload: {...} }
32
+ * // { stage: "$match", mergeable: true, type: "whereIn", data: {...} },
33
+ * // { stage: "$project", mergeable: true, type: "select", data: {...} }
34
34
  * // ]
35
35
  * ```
36
36
  */
@@ -62,7 +62,7 @@ export declare class MongoQueryOperations {
62
62
  * by the parser for optimization.
63
63
  *
64
64
  * @param type - The operation type identifier (e.g., "where", "whereIn", "whereLike")
65
- * @param payload - The operation payload data containing filter criteria
65
+ * @param data - The operation data data containing filter criteria
66
66
  * @param mergeable - Whether this operation can be merged with adjacent match operations (default: true)
67
67
  *
68
68
  * @example
@@ -77,7 +77,7 @@ export declare class MongoQueryOperations {
77
77
  * helper.addMatchOperation("having", { field: "count", operator: ">", value: 5 }, false);
78
78
  * ```
79
79
  */
80
- addMatchOperation(type: string, payload: Record<string, unknown>, mergeable?: boolean): void;
80
+ addMatchOperation(type: string, data: Record<string, unknown>, mergeable?: boolean): void;
81
81
  /**
82
82
  * Adds a $project stage operation to the pipeline.
83
83
  *
@@ -86,7 +86,7 @@ export declare class MongoQueryOperations {
86
86
  * used to compute new fields or reshape documents.
87
87
  *
88
88
  * @param type - The operation type identifier (e.g., "select", "deselect", "selectRaw")
89
- * @param payload - The operation payload data containing projection specifications
89
+ * @param data - The operation data data containing projection specifications
90
90
  * @param mergeable - Whether this operation can be merged with adjacent project operations (default: true)
91
91
  *
92
92
  * @example
@@ -103,7 +103,7 @@ export declare class MongoQueryOperations {
103
103
  * });
104
104
  * ```
105
105
  */
106
- addProjectOperation(type: string, payload: Record<string, unknown>, mergeable?: boolean): void;
106
+ addProjectOperation(type: string, data: Record<string, unknown>, mergeable?: boolean): void;
107
107
  /**
108
108
  * Adds a $sort stage operation to the pipeline.
109
109
  *
@@ -112,7 +112,7 @@ export declare class MongoQueryOperations {
112
112
  * sorting.
113
113
  *
114
114
  * @param type - The operation type identifier (e.g., "orderBy", "orderByRandom")
115
- * @param payload - The operation payload data containing sort specifications
115
+ * @param data - The operation data data containing sort specifications
116
116
  * @param mergeable - Whether this operation can be merged with adjacent sort operations (default: true)
117
117
  *
118
118
  * @example
@@ -129,7 +129,7 @@ export declare class MongoQueryOperations {
129
129
  * });
130
130
  * ```
131
131
  */
132
- addSortOperation(type: string, payload: Record<string, unknown>, mergeable?: boolean): void;
132
+ addSortOperation(type: string, data: Record<string, unknown>, mergeable?: boolean): void;
133
133
  /**
134
134
  * Adds a $group stage operation to the pipeline.
135
135
  *
@@ -138,7 +138,7 @@ export declare class MongoQueryOperations {
138
138
  * are typically not mergeable as they represent distinct aggregation boundaries.
139
139
  *
140
140
  * @param type - The operation type identifier (e.g., "groupBy", "distinct")
141
- * @param payload - The operation payload data containing grouping specifications
141
+ * @param data - The operation data data containing grouping specifications
142
142
  * @param mergeable - Whether this operation can be merged with adjacent group operations (default: false)
143
143
  *
144
144
  * @example
@@ -155,7 +155,7 @@ export declare class MongoQueryOperations {
155
155
  * helper.addGroupOperation("distinct", { fields: ["email"] });
156
156
  * ```
157
157
  */
158
- addGroupOperation(type: string, payload: Record<string, unknown>, mergeable?: boolean): void;
158
+ addGroupOperation(type: string, data: Record<string, unknown>, mergeable?: boolean): void;
159
159
  /**
160
160
  * Adds a $lookup stage operation to the pipeline.
161
161
  *
@@ -164,7 +164,7 @@ export declare class MongoQueryOperations {
164
164
  * distinct join operation.
165
165
  *
166
166
  * @param type - The operation type identifier (typically "join")
167
- * @param payload - The operation payload data containing join specifications
167
+ * @param data - The operation data data containing join specifications
168
168
  *
169
169
  * @example
170
170
  * ```typescript
@@ -187,7 +187,7 @@ export declare class MongoQueryOperations {
187
187
  * });
188
188
  * ```
189
189
  */
190
- addLookupOperation(type: string, payload: Record<string, unknown>): void;
190
+ addLookupOperation(type: string, data: Record<string, unknown>): void;
191
191
  /**
192
192
  * Adds a generic stage operation to the pipeline.
193
193
  *
@@ -197,7 +197,7 @@ export declare class MongoQueryOperations {
197
197
  *
198
198
  * @param stage - The MongoDB aggregation stage name (e.g., "$limit", "$skip", "$unwind")
199
199
  * @param type - The operation type identifier
200
- * @param payload - The operation payload data
200
+ * @param data - The operation data data
201
201
  * @param mergeable - Whether this operation can be merged with adjacent operations (default: false)
202
202
  *
203
203
  * @example
@@ -221,6 +221,6 @@ export declare class MongoQueryOperations {
221
221
  * });
222
222
  * ```
223
223
  */
224
- addOperation(stage: PipelineStage, type: string, payload: Record<string, unknown>, mergeable?: boolean): void;
224
+ addOperation(stage: PipelineStage, type: string, data: Record<string, unknown>, mergeable?: boolean): void;
225
225
  }
226
- //# sourceMappingURL=mongo-query-operations.d.ts.map
226
+ //# sourceMappingURL=mongodb-query-operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongodb-query-operations.d.ts","sourceRoot":"","sources":["../../../src/drivers/mongodb/mongodb-query-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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MongoDB aggregation stage name (e.g., "$match", "$project")
11
11
  * - **type**: An internal identifier for the operation type
12
- * - **payload**: The data associated with the operation
12
+ * - **data**: The data associated with the operation
13
13
  * - **mergeable**: Whether this operation can be merged with adjacent similar operations
14
14
  *
15
15
  * @internal This class is for internal use within the MongoDB driver
@@ -28,8 +28,8 @@
28
28
  * // Operations array is now populated
29
29
  * console.log(operations);
30
30
  * // [
31
- * // { stage: "$match", mergeable: true, type: "whereIn", payload: {...} },
32
- * // { stage: "$project", mergeable: true, type: "select", payload: {...} }
31
+ * // { stage: "$match", mergeable: true, type: "whereIn", data: {...} },
32
+ * // { stage: "$project", mergeable: true, type: "select", data: {...} }
33
33
  * // ]
34
34
  * ```
35
35
  */
@@ -65,7 +65,7 @@ class MongoQueryOperations {
65
65
  * by the parser for optimization.
66
66
  *
67
67
  * @param type - The operation type identifier (e.g., "where", "whereIn", "whereLike")
68
- * @param payload - The operation payload data containing filter criteria
68
+ * @param data - The operation data data containing filter criteria
69
69
  * @param mergeable - Whether this operation can be merged with adjacent match operations (default: true)
70
70
  *
71
71
  * @example
@@ -80,12 +80,12 @@ class MongoQueryOperations {
80
80
  * helper.addMatchOperation("having", { field: "count", operator: ">", value: 5 }, false);
81
81
  * ```
82
82
  */
83
- addMatchOperation(type, payload, mergeable = true) {
83
+ addMatchOperation(type, data, mergeable = true) {
84
84
  this.operations.push({
85
85
  stage: "$match",
86
86
  mergeable,
87
87
  type,
88
- payload,
88
+ data,
89
89
  });
90
90
  }
91
91
  /**
@@ -96,7 +96,7 @@ class MongoQueryOperations {
96
96
  * used to compute new fields or reshape documents.
97
97
  *
98
98
  * @param type - The operation type identifier (e.g., "select", "deselect", "selectRaw")
99
- * @param payload - The operation payload data containing projection specifications
99
+ * @param data - The operation data data containing projection specifications
100
100
  * @param mergeable - Whether this operation can be merged with adjacent project operations (default: true)
101
101
  *
102
102
  * @example
@@ -113,12 +113,12 @@ class MongoQueryOperations {
113
113
  * });
114
114
  * ```
115
115
  */
116
- addProjectOperation(type, payload, mergeable = true) {
116
+ addProjectOperation(type, data, mergeable = true) {
117
117
  this.operations.push({
118
118
  stage: "$project",
119
119
  mergeable,
120
120
  type,
121
- payload,
121
+ data,
122
122
  });
123
123
  }
124
124
  /**
@@ -129,7 +129,7 @@ class MongoQueryOperations {
129
129
  * sorting.
130
130
  *
131
131
  * @param type - The operation type identifier (e.g., "orderBy", "orderByRandom")
132
- * @param payload - The operation payload data containing sort specifications
132
+ * @param data - The operation data data containing sort specifications
133
133
  * @param mergeable - Whether this operation can be merged with adjacent sort operations (default: true)
134
134
  *
135
135
  * @example
@@ -146,12 +146,12 @@ class MongoQueryOperations {
146
146
  * });
147
147
  * ```
148
148
  */
149
- addSortOperation(type, payload, mergeable = true) {
149
+ addSortOperation(type, data, mergeable = true) {
150
150
  this.operations.push({
151
151
  stage: "$sort",
152
152
  mergeable,
153
153
  type,
154
- payload,
154
+ data,
155
155
  });
156
156
  }
157
157
  /**
@@ -162,7 +162,7 @@ class MongoQueryOperations {
162
162
  * are typically not mergeable as they represent distinct aggregation boundaries.
163
163
  *
164
164
  * @param type - The operation type identifier (e.g., "groupBy", "distinct")
165
- * @param payload - The operation payload data containing grouping specifications
165
+ * @param data - The operation data data containing grouping specifications
166
166
  * @param mergeable - Whether this operation can be merged with adjacent group operations (default: false)
167
167
  *
168
168
  * @example
@@ -179,12 +179,12 @@ class MongoQueryOperations {
179
179
  * helper.addGroupOperation("distinct", { fields: ["email"] });
180
180
  * ```
181
181
  */
182
- addGroupOperation(type, payload, mergeable = false) {
182
+ addGroupOperation(type, data, mergeable = false) {
183
183
  this.operations.push({
184
184
  stage: "$group",
185
185
  mergeable,
186
186
  type,
187
- payload,
187
+ data,
188
188
  });
189
189
  }
190
190
  /**
@@ -195,7 +195,7 @@ class MongoQueryOperations {
195
195
  * distinct join operation.
196
196
  *
197
197
  * @param type - The operation type identifier (typically "join")
198
- * @param payload - The operation payload data containing join specifications
198
+ * @param data - The operation data data containing join specifications
199
199
  *
200
200
  * @example
201
201
  * ```typescript
@@ -218,12 +218,12 @@ class MongoQueryOperations {
218
218
  * });
219
219
  * ```
220
220
  */
221
- addLookupOperation(type, payload) {
221
+ addLookupOperation(type, data) {
222
222
  this.operations.push({
223
223
  stage: "$lookup",
224
224
  mergeable: false,
225
225
  type,
226
- payload,
226
+ data,
227
227
  });
228
228
  }
229
229
  /**
@@ -235,7 +235,7 @@ class MongoQueryOperations {
235
235
  *
236
236
  * @param stage - The MongoDB aggregation stage name (e.g., "$limit", "$skip", "$unwind")
237
237
  * @param type - The operation type identifier
238
- * @param payload - The operation payload data
238
+ * @param data - The operation data data
239
239
  * @param mergeable - Whether this operation can be merged with adjacent operations (default: false)
240
240
  *
241
241
  * @example
@@ -259,12 +259,12 @@ class MongoQueryOperations {
259
259
  * });
260
260
  * ```
261
261
  */
262
- addOperation(stage, type, payload, mergeable = false) {
262
+ addOperation(stage, type, data, mergeable = false) {
263
263
  this.operations.push({
264
264
  stage,
265
265
  mergeable,
266
266
  type,
267
- payload,
267
+ data,
268
268
  });
269
269
  }
270
- }exports.MongoQueryOperations=MongoQueryOperations;//# sourceMappingURL=mongo-query-operations.js.map
270
+ }exports.MongoQueryOperations=MongoQueryOperations;//# sourceMappingURL=mongodb-query-operations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongodb-query-operations.js","sources":["../../../src/drivers/mongodb/mongodb-query-operations.ts"],"sourcesContent":[null],"names":[],"mappings":"aAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;MACU,oBAAoB,CAAA;AAiBJ,IAAA,UAAA,CAAA;AAhB3B;;;;;;;;;;;;;;;AAeG;AACH,IAAA,WAAA,CAA2B,UAAuB,EAAA;QAAvB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAa;KAAI;AAE/C,IAAA,aAAa,CAAC,UAAuB,EAAA;AAC1C,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;KAC9B;AAED;;;;;;;;;;;;;;;;;;;;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,CAAC,CAAC;KACJ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;IACI,YAAY,CACjB,KAAoB,EACpB,IAAY,EACZ,IAA6B,EAC7B,SAAS,GAAG,KAAK,EAAA;AAEjB,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YACnB,KAAK;YACL,SAAS;YACT,IAAI;YACJ,IAAI;AACL,SAAA,CAAC,CAAC;KACJ;AACF"}
@@ -1,5 +1,5 @@
1
1
  import type { Collection } from "mongodb";
2
- import type { MongoQueryBuilder } from "./mongo-query-builder";
2
+ import type { MongoQueryBuilder } from "./mongodb-query-builder";
3
3
  import type { Operation } from "./types";
4
4
  /**
5
5
  * Options for configuring the MongoDB query parser.
@@ -259,4 +259,4 @@ export declare class MongoQueryParser {
259
259
  */
260
260
  private buildLookupStage;
261
261
  }
262
- //# sourceMappingURL=mongo-query-parser.d.ts.map
262
+ //# sourceMappingURL=mongodb-query-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongodb-query-parser.d.ts","sourceRoot":"","sources":["../../../src/drivers/mongodb/mongodb-query-parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAM1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,SAAS,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,2CAA2C;IAC3C,UAAU,EAAE,UAAU,CAAC;IACvB,8CAA8C;IAC9C,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,oEAAoE;IACpE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;CAC3C,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,gBAAgB;IAC3B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAExC;;OAEG;IACH,OAAO,CAAC,QAAQ,CA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