joist-core 2.3.0-next.96 → 2.3.0-next.98

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 (1190) hide show
  1. package/build/EntityManager.cjs +55 -59
  2. package/build/EntityManager.cjs.map +1 -1
  3. package/build/EntityManager.d.cts +11 -11
  4. package/build/EntityManager.d.mts +11 -11
  5. package/build/EntityManager.js +30 -34
  6. package/build/EntityManager.js.map +1 -1
  7. package/build/EntityMetadata.cjs +2 -4
  8. package/build/EntityMetadata.cjs.map +1 -1
  9. package/build/EntityMetadata.d.cts +3 -3
  10. package/build/EntityMetadata.d.mts +3 -3
  11. package/build/EntityMetadata.js +2 -4
  12. package/build/EntityMetadata.js.map +1 -1
  13. package/build/IndexManager.cjs +1 -1
  14. package/build/IndexManager.js +1 -1
  15. package/build/InstanceData.cjs +1 -1
  16. package/build/InstanceData.js +1 -1
  17. package/build/PluginManager.cjs +0 -2
  18. package/build/PluginManager.cjs.map +1 -1
  19. package/build/PluginManager.d.cts +2 -2
  20. package/build/PluginManager.d.mts +2 -2
  21. package/build/PluginManager.js +0 -2
  22. package/build/PluginManager.js.map +1 -1
  23. package/build/batchloaders/enumCollectionBatchLoader.d.cts +1 -1
  24. package/build/batchloaders/enumCollectionBatchLoader.d.mts +1 -1
  25. package/build/batchloaders/loadBatchLoader.cjs +7 -7
  26. package/build/batchloaders/loadBatchLoader.cjs.map +1 -1
  27. package/build/batchloaders/loadBatchLoader.d.cts +1 -1
  28. package/build/batchloaders/loadBatchLoader.d.cts.map +1 -1
  29. package/build/batchloaders/loadBatchLoader.d.mts +1 -1
  30. package/build/batchloaders/loadBatchLoader.d.mts.map +1 -1
  31. package/build/batchloaders/loadBatchLoader.js +4 -4
  32. package/build/batchloaders/loadBatchLoader.js.map +1 -1
  33. package/build/batchloaders/manyToManyBatchLoader.d.cts +1 -1
  34. package/build/batchloaders/manyToManyBatchLoader.d.mts +1 -1
  35. package/build/batchloaders/oneToManyBatchLoader.cjs +3 -3
  36. package/build/batchloaders/oneToManyBatchLoader.cjs.map +1 -1
  37. package/build/batchloaders/oneToManyBatchLoader.js +2 -2
  38. package/build/batchloaders/oneToOneBatchLoader.cjs +5 -5
  39. package/build/batchloaders/oneToOneBatchLoader.cjs.map +1 -1
  40. package/build/batchloaders/oneToOneBatchLoader.js +4 -4
  41. package/build/batchloaders/populateBatchLoader.cjs +15 -16
  42. package/build/batchloaders/populateBatchLoader.cjs.map +1 -1
  43. package/build/batchloaders/populateBatchLoader.d.cts +1 -1
  44. package/build/batchloaders/populateBatchLoader.d.mts +1 -1
  45. package/build/batchloaders/populateBatchLoader.js +8 -9
  46. package/build/batchloaders/populateBatchLoader.js.map +1 -1
  47. package/build/batchloaders/recursiveChildrenBatchLoader.cjs +8 -8
  48. package/build/batchloaders/recursiveChildrenBatchLoader.cjs.map +1 -1
  49. package/build/batchloaders/recursiveChildrenBatchLoader.js +5 -5
  50. package/build/batchloaders/recursiveM2mBatchLoader.cjs +5 -5
  51. package/build/batchloaders/recursiveM2mBatchLoader.cjs.map +1 -1
  52. package/build/batchloaders/recursiveM2mBatchLoader.js +2 -2
  53. package/build/batchloaders/recursiveParentsBatchLoader.cjs +7 -7
  54. package/build/batchloaders/recursiveParentsBatchLoader.cjs.map +1 -1
  55. package/build/batchloaders/recursiveParentsBatchLoader.js +4 -4
  56. package/build/changes.cjs +3 -4
  57. package/build/changes.cjs.map +1 -1
  58. package/build/changes.js +3 -4
  59. package/build/changes.js.map +1 -1
  60. package/build/config.cjs +6 -6
  61. package/build/config.cjs.map +1 -1
  62. package/build/config.d.cts +2 -2
  63. package/build/config.d.mts +2 -2
  64. package/build/config.js +4 -4
  65. package/build/config.js.map +1 -1
  66. package/build/configure.cjs +13 -13
  67. package/build/configure.cjs.map +1 -1
  68. package/build/configure.js +8 -8
  69. package/build/configure.js.map +1 -1
  70. package/build/dataloaders/fastWhereFilterHash.cjs +9 -9
  71. package/build/dataloaders/fastWhereFilterHash.cjs.map +1 -1
  72. package/build/dataloaders/fastWhereFilterHash.d.cts.map +1 -1
  73. package/build/dataloaders/fastWhereFilterHash.d.mts.map +1 -1
  74. package/build/dataloaders/fastWhereFilterHash.js +3 -3
  75. package/build/dataloaders/fastWhereFilterHash.js.map +1 -1
  76. package/build/dataloaders/findByUniqueDataLoader.cjs +5 -6
  77. package/build/dataloaders/findByUniqueDataLoader.cjs.map +1 -1
  78. package/build/dataloaders/findByUniqueDataLoader.d.cts.map +1 -1
  79. package/build/dataloaders/findByUniqueDataLoader.d.mts.map +1 -1
  80. package/build/dataloaders/findByUniqueDataLoader.js +3 -4
  81. package/build/dataloaders/findByUniqueDataLoader.js.map +1 -1
  82. package/build/dataloaders/findCountDataLoader.cjs +12 -15
  83. package/build/dataloaders/findCountDataLoader.cjs.map +1 -1
  84. package/build/dataloaders/findCountDataLoader.d.cts +2 -2
  85. package/build/dataloaders/findCountDataLoader.d.mts +2 -2
  86. package/build/dataloaders/findCountDataLoader.js +5 -8
  87. package/build/dataloaders/findCountDataLoader.js.map +1 -1
  88. package/build/dataloaders/findDataLoader.cjs +21 -25
  89. package/build/dataloaders/findDataLoader.cjs.map +1 -1
  90. package/build/dataloaders/findDataLoader.d.cts +3 -3
  91. package/build/dataloaders/findDataLoader.d.cts.map +1 -1
  92. package/build/dataloaders/findDataLoader.d.mts +3 -3
  93. package/build/dataloaders/findDataLoader.d.mts.map +1 -1
  94. package/build/dataloaders/findDataLoader.js +8 -12
  95. package/build/dataloaders/findDataLoader.js.map +1 -1
  96. package/build/dataloaders/findIdsDataLoader.cjs +8 -11
  97. package/build/dataloaders/findIdsDataLoader.cjs.map +1 -1
  98. package/build/dataloaders/findIdsDataLoader.d.cts +1 -1
  99. package/build/dataloaders/findIdsDataLoader.d.mts +1 -1
  100. package/build/dataloaders/findIdsDataLoader.js +4 -7
  101. package/build/dataloaders/findIdsDataLoader.js.map +1 -1
  102. package/build/dataloaders/findOrCreateDataLoader.cjs +1 -2
  103. package/build/dataloaders/findOrCreateDataLoader.cjs.map +1 -1
  104. package/build/dataloaders/findOrCreateDataLoader.js +1 -2
  105. package/build/dataloaders/findOrCreateDataLoader.js.map +1 -1
  106. package/build/dataloaders/findPaginatedDataLoader.cjs +8 -11
  107. package/build/dataloaders/findPaginatedDataLoader.cjs.map +1 -1
  108. package/build/dataloaders/findPaginatedDataLoader.d.cts +2 -2
  109. package/build/dataloaders/findPaginatedDataLoader.d.mts +2 -2
  110. package/build/dataloaders/findPaginatedDataLoader.js +4 -7
  111. package/build/dataloaders/findPaginatedDataLoader.js.map +1 -1
  112. package/build/dataloaders/lensDataLoader.cjs +6 -6
  113. package/build/dataloaders/lensDataLoader.cjs.map +1 -1
  114. package/build/dataloaders/lensDataLoader.js +3 -3
  115. package/build/dataloaders/lensDataLoader.js.map +1 -1
  116. package/build/dataloaders/manyToManyFindDataLoader.cjs +0 -3
  117. package/build/dataloaders/manyToManyFindDataLoader.cjs.map +1 -1
  118. package/build/dataloaders/manyToManyFindDataLoader.d.cts +0 -1
  119. package/build/dataloaders/manyToManyFindDataLoader.d.cts.map +1 -1
  120. package/build/dataloaders/manyToManyFindDataLoader.d.mts +0 -1
  121. package/build/dataloaders/manyToManyFindDataLoader.d.mts.map +1 -1
  122. package/build/dataloaders/manyToManyFindDataLoader.js +0 -3
  123. package/build/dataloaders/manyToManyFindDataLoader.js.map +1 -1
  124. package/build/dataloaders/oneToManyFindDataLoader.cjs +2 -5
  125. package/build/dataloaders/oneToManyFindDataLoader.cjs.map +1 -1
  126. package/build/dataloaders/oneToManyFindDataLoader.d.cts +0 -1
  127. package/build/dataloaders/oneToManyFindDataLoader.d.cts.map +1 -1
  128. package/build/dataloaders/oneToManyFindDataLoader.d.mts +0 -1
  129. package/build/dataloaders/oneToManyFindDataLoader.d.mts.map +1 -1
  130. package/build/dataloaders/oneToManyFindDataLoader.js +1 -4
  131. package/build/dataloaders/oneToManyFindDataLoader.js.map +1 -1
  132. package/build/defaults.cjs +6 -6
  133. package/build/defaults.cjs.map +1 -1
  134. package/build/defaults.d.cts +1 -1
  135. package/build/defaults.d.mts +1 -1
  136. package/build/defaults.js +5 -5
  137. package/build/defaults.js.map +1 -1
  138. package/build/drivers/Driver.cjs +0 -2
  139. package/build/drivers/Driver.d.cts +2 -2
  140. package/build/drivers/Driver.d.mts +2 -2
  141. package/build/drivers/Driver.js +0 -2
  142. package/build/drivers/EntityWriter.cjs +7 -8
  143. package/build/drivers/EntityWriter.cjs.map +1 -1
  144. package/build/drivers/EntityWriter.d.cts +1 -1
  145. package/build/drivers/EntityWriter.d.mts +1 -1
  146. package/build/drivers/EntityWriter.js +3 -4
  147. package/build/drivers/EntityWriter.js.map +1 -1
  148. package/build/drivers/IdAssigner.cjs +0 -1
  149. package/build/drivers/IdAssigner.cjs.map +1 -1
  150. package/build/drivers/IdAssigner.d.cts +1 -1
  151. package/build/drivers/IdAssigner.d.mts +1 -1
  152. package/build/drivers/IdAssigner.js +0 -1
  153. package/build/drivers/IdAssigner.js.map +1 -1
  154. package/build/drivers/driverApi.cjs +19 -0
  155. package/build/drivers/driverApi.cjs.map +1 -0
  156. package/build/drivers/driverApi.d.cts +22 -0
  157. package/build/drivers/driverApi.d.cts.map +1 -0
  158. package/build/drivers/driverApi.d.mts +22 -0
  159. package/build/drivers/driverApi.d.mts.map +1 -0
  160. package/build/drivers/driverApi.js +18 -0
  161. package/build/drivers/driverApi.js.map +1 -0
  162. package/build/drivers/index.cjs +0 -6
  163. package/build/drivers/index.d.cts +1 -3
  164. package/build/drivers/index.d.mts +1 -3
  165. package/build/drivers/index.js +1 -3
  166. package/build/fields.cjs +3 -3
  167. package/build/fields.cjs.map +1 -1
  168. package/build/fields.js +2 -2
  169. package/build/fields.js.map +1 -1
  170. package/build/flush/FlushLock.cjs +51 -0
  171. package/build/flush/FlushLock.cjs.map +1 -0
  172. package/build/flush/FlushLock.d.cts +29 -0
  173. package/build/flush/FlushLock.d.cts.map +1 -0
  174. package/build/flush/FlushLock.d.mts +29 -0
  175. package/build/flush/FlushLock.d.mts.map +1 -0
  176. package/build/flush/FlushLock.js +51 -0
  177. package/build/flush/FlushLock.js.map +1 -0
  178. package/build/flush/JoinRows.cjs +263 -0
  179. package/build/flush/JoinRows.cjs.map +1 -0
  180. package/build/flush/JoinRows.d.cts +120 -0
  181. package/build/flush/JoinRows.d.cts.map +1 -0
  182. package/build/flush/JoinRows.d.mts +120 -0
  183. package/build/flush/JoinRows.d.mts.map +1 -0
  184. package/build/flush/JoinRows.js +261 -0
  185. package/build/flush/JoinRows.js.map +1 -0
  186. package/build/flush/PendingChanges.d.cts +29 -0
  187. package/build/flush/PendingChanges.d.cts.map +1 -0
  188. package/build/flush/PendingChanges.d.mts +29 -0
  189. package/build/flush/PendingChanges.d.mts.map +1 -0
  190. package/build/flush/Todo.cjs +71 -0
  191. package/build/flush/Todo.cjs.map +1 -0
  192. package/build/flush/Todo.d.cts +38 -0
  193. package/build/flush/Todo.d.cts.map +1 -0
  194. package/build/flush/Todo.d.mts +38 -0
  195. package/build/flush/Todo.d.mts.map +1 -0
  196. package/build/flush/Todo.js +67 -0
  197. package/build/flush/Todo.js.map +1 -0
  198. package/build/getProperties.cjs +1 -1
  199. package/build/getProperties.js +1 -1
  200. package/build/index.cjs +168 -166
  201. package/build/index.cjs.map +1 -1
  202. package/build/index.d.cts +42 -39
  203. package/build/index.d.cts.map +1 -1
  204. package/build/index.d.mts +42 -39
  205. package/build/index.d.mts.map +1 -1
  206. package/build/index.js +52 -50
  207. package/build/index.js.map +1 -1
  208. package/build/json.cjs +4 -4
  209. package/build/json.cjs.map +1 -1
  210. package/build/json.js +3 -3
  211. package/build/json.js.map +1 -1
  212. package/build/keys.cjs +1 -1
  213. package/build/keys.js +1 -1
  214. package/build/loading/HintTree.cjs +67 -0
  215. package/build/loading/HintTree.cjs.map +1 -0
  216. package/build/loading/HintTree.d.cts +45 -0
  217. package/build/loading/HintTree.d.cts.map +1 -0
  218. package/build/loading/HintTree.d.mts +45 -0
  219. package/build/loading/HintTree.d.mts.map +1 -0
  220. package/build/loading/HintTree.js +66 -0
  221. package/build/loading/HintTree.js.map +1 -0
  222. package/build/loading/IsLoadedCache.cjs +58 -0
  223. package/build/loading/IsLoadedCache.cjs.map +1 -0
  224. package/build/loading/IsLoadedCache.d.cts +35 -0
  225. package/build/loading/IsLoadedCache.d.cts.map +1 -0
  226. package/build/loading/IsLoadedCache.d.mts +35 -0
  227. package/build/loading/IsLoadedCache.d.mts.map +1 -0
  228. package/build/loading/IsLoadedCache.js +57 -0
  229. package/build/loading/IsLoadedCache.js.map +1 -0
  230. package/build/loading/loadHints.cjs +95 -0
  231. package/build/loading/loadHints.cjs.map +1 -0
  232. package/build/loading/loadHints.d.cts +116 -0
  233. package/build/loading/loadHints.d.cts.map +1 -0
  234. package/build/loading/loadHints.d.mts +116 -0
  235. package/build/loading/loadHints.d.mts.map +1 -0
  236. package/build/loading/loadHints.js +88 -0
  237. package/build/loading/loadHints.js.map +1 -0
  238. package/build/loading/loadLens.cjs +212 -0
  239. package/build/loading/loadLens.cjs.map +1 -0
  240. package/build/loading/loadLens.d.cts +77 -0
  241. package/build/loading/loadLens.d.cts.map +1 -0
  242. package/build/loading/loadLens.d.mts +77 -0
  243. package/build/loading/loadLens.d.mts.map +1 -0
  244. package/build/loading/loadLens.js +201 -0
  245. package/build/loading/loadLens.js.map +1 -0
  246. package/build/loading/withLoaded.cjs +64 -0
  247. package/build/loading/withLoaded.cjs.map +1 -0
  248. package/build/loading/withLoaded.d.cts +65 -0
  249. package/build/loading/withLoaded.d.cts.map +1 -0
  250. package/build/loading/withLoaded.d.mts +65 -0
  251. package/build/loading/withLoaded.d.mts.map +1 -0
  252. package/build/loading/withLoaded.js +61 -0
  253. package/build/loading/withLoaded.js.map +1 -0
  254. package/build/logging/FactoryLogger.cjs +1 -1
  255. package/build/logging/FactoryLogger.js +1 -1
  256. package/build/logging/FieldLogger.cjs +1 -1
  257. package/build/logging/FieldLogger.js +1 -1
  258. package/build/logging/ReactionLogger.cjs +1 -3
  259. package/build/logging/ReactionLogger.cjs.map +1 -1
  260. package/build/logging/ReactionLogger.d.cts +2 -2
  261. package/build/logging/ReactionLogger.d.mts +2 -2
  262. package/build/logging/ReactionLogger.js +1 -3
  263. package/build/logging/ReactionLogger.js.map +1 -1
  264. package/build/newEntity.cjs +1 -1
  265. package/build/newEntity.js +1 -1
  266. package/build/newTestInstance.cjs +4 -4
  267. package/build/newTestInstance.cjs.map +1 -1
  268. package/build/newTestInstance.d.cts +1 -1
  269. package/build/newTestInstance.d.mts +1 -1
  270. package/build/newTestInstance.js +3 -3
  271. package/build/newTestInstance.js.map +1 -1
  272. package/build/normalizeHints.cjs +0 -2
  273. package/build/normalizeHints.cjs.map +1 -1
  274. package/build/normalizeHints.d.cts +2 -2
  275. package/build/normalizeHints.d.mts +2 -2
  276. package/build/normalizeHints.js +0 -2
  277. package/build/normalizeHints.js.map +1 -1
  278. package/build/nowUTC.cjs +2 -2
  279. package/build/nowUTC.cjs.map +1 -1
  280. package/build/nowUTC.d.cts +1 -1
  281. package/build/nowUTC.d.mts +1 -1
  282. package/build/nowUTC.js +1 -1
  283. package/build/nowUTC.js.map +1 -1
  284. package/build/plugins/PreloadPlugin.cjs +0 -3
  285. package/build/plugins/PreloadPlugin.d.cts +3 -3
  286. package/build/plugins/PreloadPlugin.d.mts +3 -3
  287. package/build/plugins/PreloadPlugin.js +0 -3
  288. package/build/preloading/JsonAggregatePreloader.cjs +30 -33
  289. package/build/preloading/JsonAggregatePreloader.cjs.map +1 -1
  290. package/build/preloading/JsonAggregatePreloader.d.cts +3 -3
  291. package/build/preloading/JsonAggregatePreloader.d.mts +3 -3
  292. package/build/preloading/JsonAggregatePreloader.js +5 -8
  293. package/build/preloading/JsonAggregatePreloader.js.map +1 -1
  294. package/build/preloading/partitionHint.cjs +2 -3
  295. package/build/preloading/partitionHint.cjs.map +1 -1
  296. package/build/preloading/partitionHint.d.cts +1 -1
  297. package/build/preloading/partitionHint.d.mts +1 -1
  298. package/build/preloading/partitionHint.js +2 -3
  299. package/build/preloading/partitionHint.js.map +1 -1
  300. package/build/queries/ConditionBuilder.cjs +106 -0
  301. package/build/queries/ConditionBuilder.cjs.map +1 -0
  302. package/build/queries/ConditionBuilder.d.cts +31 -0
  303. package/build/queries/ConditionBuilder.d.cts.map +1 -0
  304. package/build/queries/ConditionBuilder.d.mts +31 -0
  305. package/build/queries/ConditionBuilder.d.mts.map +1 -0
  306. package/build/queries/ConditionBuilder.js +105 -0
  307. package/build/queries/ConditionBuilder.js.map +1 -0
  308. package/build/queries/conditions.cjs +15 -0
  309. package/build/queries/conditions.cjs.map +1 -0
  310. package/build/queries/conditions.d.cts +38 -0
  311. package/build/queries/conditions.d.cts.map +1 -0
  312. package/build/queries/conditions.d.mts +38 -0
  313. package/build/queries/conditions.d.mts.map +1 -0
  314. package/build/queries/conditions.js +13 -0
  315. package/build/queries/conditions.js.map +1 -0
  316. package/build/queries/entityQueryUtils.cjs +60 -0
  317. package/build/queries/entityQueryUtils.cjs.map +1 -0
  318. package/build/queries/entityQueryUtils.d.cts +19 -0
  319. package/build/queries/entityQueryUtils.d.cts.map +1 -0
  320. package/build/queries/entityQueryUtils.d.mts +19 -0
  321. package/build/queries/entityQueryUtils.d.mts.map +1 -0
  322. package/build/queries/entityQueryUtils.js +56 -0
  323. package/build/queries/entityQueryUtils.js.map +1 -0
  324. package/build/queries/find/Aliases.cjs +301 -0
  325. package/build/queries/find/Aliases.cjs.map +1 -0
  326. package/build/queries/find/Aliases.d.cts +122 -0
  327. package/build/queries/find/Aliases.d.cts.map +1 -0
  328. package/build/queries/find/Aliases.d.mts +122 -0
  329. package/build/queries/find/Aliases.d.mts.map +1 -0
  330. package/build/queries/find/Aliases.js +293 -0
  331. package/build/queries/find/Aliases.js.map +1 -0
  332. package/build/queries/find/DeferredAlias.cjs +25 -0
  333. package/build/queries/find/DeferredAlias.cjs.map +1 -0
  334. package/build/queries/find/DeferredAlias.d.cts +22 -0
  335. package/build/queries/find/DeferredAlias.d.cts.map +1 -0
  336. package/build/queries/find/DeferredAlias.d.mts +22 -0
  337. package/build/queries/find/DeferredAlias.d.mts.map +1 -0
  338. package/build/queries/find/DeferredAlias.js +22 -0
  339. package/build/queries/find/DeferredAlias.js.map +1 -0
  340. package/build/queries/find/EntityFilter.cjs +27 -0
  341. package/build/queries/find/EntityFilter.cjs.map +1 -0
  342. package/build/queries/find/EntityFilter.d.cts +127 -0
  343. package/build/queries/find/EntityFilter.d.cts.map +1 -0
  344. package/build/queries/find/EntityFilter.d.mts +127 -0
  345. package/build/queries/find/EntityFilter.d.mts.map +1 -0
  346. package/build/queries/find/EntityFilter.js +26 -0
  347. package/build/queries/find/EntityFilter.js.map +1 -0
  348. package/build/queries/find/EntityGraphQLFilter.cjs +52 -0
  349. package/build/queries/find/EntityGraphQLFilter.cjs.map +1 -0
  350. package/build/queries/find/EntityGraphQLFilter.d.cts +59 -0
  351. package/build/queries/find/EntityGraphQLFilter.d.cts.map +1 -0
  352. package/build/queries/find/EntityGraphQLFilter.d.mts +59 -0
  353. package/build/queries/find/EntityGraphQLFilter.d.mts.map +1 -0
  354. package/build/queries/find/EntityGraphQLFilter.js +50 -0
  355. package/build/queries/find/EntityGraphQLFilter.js.map +1 -0
  356. package/build/queries/find/QueryParser.cjs +554 -0
  357. package/build/queries/find/QueryParser.cjs.map +1 -0
  358. package/build/queries/find/QueryParser.collectionJoins.cjs +353 -0
  359. package/build/queries/find/QueryParser.collectionJoins.cjs.map +1 -0
  360. package/build/queries/find/QueryParser.collectionJoins.d.cts +30 -0
  361. package/build/queries/find/QueryParser.collectionJoins.d.cts.map +1 -0
  362. package/build/queries/find/QueryParser.collectionJoins.d.mts +30 -0
  363. package/build/queries/find/QueryParser.collectionJoins.d.mts.map +1 -0
  364. package/build/queries/find/QueryParser.collectionJoins.js +352 -0
  365. package/build/queries/find/QueryParser.collectionJoins.js.map +1 -0
  366. package/build/queries/find/QueryParser.d.cts +192 -0
  367. package/build/queries/find/QueryParser.d.cts.map +1 -0
  368. package/build/queries/find/QueryParser.d.mts +192 -0
  369. package/build/queries/find/QueryParser.d.mts.map +1 -0
  370. package/build/queries/find/QueryParser.js +547 -0
  371. package/build/queries/find/QueryParser.js.map +1 -0
  372. package/build/queries/find/QueryParser.pruning.cjs +115 -0
  373. package/build/queries/find/QueryParser.pruning.cjs.map +1 -0
  374. package/build/queries/find/QueryParser.pruning.d.cts +8 -0
  375. package/build/queries/find/QueryParser.pruning.d.cts.map +1 -0
  376. package/build/queries/find/QueryParser.pruning.d.mts +8 -0
  377. package/build/queries/find/QueryParser.pruning.d.mts.map +1 -0
  378. package/build/queries/find/QueryParser.pruning.js +113 -0
  379. package/build/queries/find/QueryParser.pruning.js.map +1 -0
  380. package/build/queries/find/QueryVisitor.cjs +60 -0
  381. package/build/queries/find/QueryVisitor.cjs.map +1 -0
  382. package/build/queries/find/QueryVisitor.d.cts +22 -0
  383. package/build/queries/find/QueryVisitor.d.cts.map +1 -0
  384. package/build/queries/find/QueryVisitor.d.mts +22 -0
  385. package/build/queries/find/QueryVisitor.d.mts.map +1 -0
  386. package/build/queries/find/QueryVisitor.js +58 -0
  387. package/build/queries/find/QueryVisitor.js.map +1 -0
  388. package/build/queries/find/buildFindQuery.cjs +112 -0
  389. package/build/queries/find/buildFindQuery.cjs.map +1 -0
  390. package/build/queries/find/buildFindQuery.d.cts +24 -0
  391. package/build/queries/find/buildFindQuery.d.cts.map +1 -0
  392. package/build/queries/find/buildFindQuery.d.mts +24 -0
  393. package/build/queries/find/buildFindQuery.d.mts.map +1 -0
  394. package/build/queries/find/buildFindQuery.js +110 -0
  395. package/build/queries/find/buildFindQuery.js.map +1 -0
  396. package/build/queries/find/scopes.cjs +301 -0
  397. package/build/queries/find/scopes.cjs.map +1 -0
  398. package/build/queries/find/scopes.d.cts +188 -0
  399. package/build/queries/find/scopes.d.cts.map +1 -0
  400. package/build/queries/find/scopes.d.mts +188 -0
  401. package/build/queries/find/scopes.d.mts.map +1 -0
  402. package/build/queries/find/scopes.js +296 -0
  403. package/build/queries/find/scopes.js.map +1 -0
  404. package/build/queries/parsedConditions.cjs +21 -0
  405. package/build/queries/parsedConditions.cjs.map +1 -0
  406. package/build/queries/parsedConditions.d.cts +127 -0
  407. package/build/queries/parsedConditions.d.cts.map +1 -0
  408. package/build/queries/parsedConditions.d.mts +127 -0
  409. package/build/queries/parsedConditions.d.mts.map +1 -0
  410. package/build/queries/parsedConditions.js +20 -0
  411. package/build/queries/parsedConditions.js.map +1 -0
  412. package/build/queries/renderConditions.cjs +66 -0
  413. package/build/queries/renderConditions.cjs.map +1 -0
  414. package/build/queries/renderConditions.d.cts +15 -0
  415. package/build/queries/renderConditions.d.cts.map +1 -0
  416. package/build/queries/renderConditions.d.mts +15 -0
  417. package/build/queries/renderConditions.d.mts.map +1 -0
  418. package/build/queries/renderConditions.js +64 -0
  419. package/build/queries/renderConditions.js.map +1 -0
  420. package/build/queries/skipCondition.cjs +14 -0
  421. package/build/queries/skipCondition.cjs.map +1 -0
  422. package/build/queries/skipCondition.d.cts +7 -0
  423. package/build/queries/skipCondition.d.cts.map +1 -0
  424. package/build/queries/skipCondition.d.mts +7 -0
  425. package/build/queries/skipCondition.d.mts.map +1 -0
  426. package/build/queries/skipCondition.js +13 -0
  427. package/build/queries/skipCondition.js.map +1 -0
  428. package/build/queries/sql/AliasAssigner.cjs +35 -0
  429. package/build/queries/sql/AliasAssigner.cjs.map +1 -0
  430. package/build/queries/sql/AliasAssigner.d.cts +13 -0
  431. package/build/queries/sql/AliasAssigner.d.cts.map +1 -0
  432. package/build/queries/sql/AliasAssigner.d.mts +13 -0
  433. package/build/queries/sql/AliasAssigner.d.mts.map +1 -0
  434. package/build/queries/sql/AliasAssigner.js +34 -0
  435. package/build/queries/sql/AliasAssigner.js.map +1 -0
  436. package/build/queries/sql/Expr.cjs +512 -0
  437. package/build/queries/sql/Expr.cjs.map +1 -0
  438. package/build/queries/sql/Expr.d.cts +274 -0
  439. package/build/queries/sql/Expr.d.cts.map +1 -0
  440. package/build/queries/sql/Expr.d.mts +274 -0
  441. package/build/queries/sql/Expr.d.mts.map +1 -0
  442. package/build/queries/sql/Expr.js +496 -0
  443. package/build/queries/sql/Expr.js.map +1 -0
  444. package/build/queries/sql/Tables.cjs +706 -0
  445. package/build/queries/sql/Tables.cjs.map +1 -0
  446. package/build/queries/sql/Tables.d.cts +263 -0
  447. package/build/queries/sql/Tables.d.cts.map +1 -0
  448. package/build/queries/sql/Tables.d.mts +263 -0
  449. package/build/queries/sql/Tables.d.mts.map +1 -0
  450. package/build/queries/sql/Tables.js +695 -0
  451. package/build/queries/sql/Tables.js.map +1 -0
  452. package/build/queries/sql/execute.cjs +236 -0
  453. package/build/queries/sql/execute.cjs.map +1 -0
  454. package/build/queries/sql/execute.d.cts +195 -0
  455. package/build/queries/sql/execute.d.cts.map +1 -0
  456. package/build/queries/sql/execute.d.mts +195 -0
  457. package/build/queries/sql/execute.d.mts.map +1 -0
  458. package/build/queries/sql/execute.js +233 -0
  459. package/build/queries/sql/execute.js.map +1 -0
  460. package/build/queries/sql/expressions/arrayAgg.cjs +63 -0
  461. package/build/queries/sql/expressions/arrayAgg.cjs.map +1 -0
  462. package/build/queries/sql/expressions/arrayAgg.d.cts +24 -0
  463. package/build/queries/sql/expressions/arrayAgg.d.cts.map +1 -0
  464. package/build/queries/sql/expressions/arrayAgg.d.mts +24 -0
  465. package/build/queries/sql/expressions/arrayAgg.d.mts.map +1 -0
  466. package/build/queries/sql/expressions/arrayAgg.js +61 -0
  467. package/build/queries/sql/expressions/arrayAgg.js.map +1 -0
  468. package/build/queries/sql/expressions/case.cjs +71 -0
  469. package/build/queries/sql/expressions/case.cjs.map +1 -0
  470. package/build/queries/sql/expressions/case.d.cts +57 -0
  471. package/build/queries/sql/expressions/case.d.cts.map +1 -0
  472. package/build/queries/sql/expressions/case.d.mts +57 -0
  473. package/build/queries/sql/expressions/case.d.mts.map +1 -0
  474. package/build/queries/sql/expressions/case.js +68 -0
  475. package/build/queries/sql/expressions/case.js.map +1 -0
  476. package/build/queries/sql/expressions/coalesce.cjs +25 -0
  477. package/build/queries/sql/expressions/coalesce.cjs.map +1 -0
  478. package/build/queries/sql/expressions/coalesce.d.cts +21 -0
  479. package/build/queries/sql/expressions/coalesce.d.cts.map +1 -0
  480. package/build/queries/sql/expressions/coalesce.d.mts +21 -0
  481. package/build/queries/sql/expressions/coalesce.d.mts.map +1 -0
  482. package/build/queries/sql/expressions/coalesce.js +22 -0
  483. package/build/queries/sql/expressions/coalesce.js.map +1 -0
  484. package/build/queries/sql/expressions/codecs.cjs +126 -0
  485. package/build/queries/sql/expressions/codecs.cjs.map +1 -0
  486. package/build/queries/sql/expressions/codecs.d.cts +11 -0
  487. package/build/queries/sql/expressions/codecs.d.cts.map +1 -0
  488. package/build/queries/sql/expressions/codecs.d.mts +11 -0
  489. package/build/queries/sql/expressions/codecs.d.mts.map +1 -0
  490. package/build/queries/sql/expressions/codecs.js +125 -0
  491. package/build/queries/sql/expressions/codecs.js.map +1 -0
  492. package/build/queries/sql/expressions/expression.cjs +102 -0
  493. package/build/queries/sql/expressions/expression.cjs.map +1 -0
  494. package/build/queries/sql/expressions/expression.d.cts +23 -0
  495. package/build/queries/sql/expressions/expression.d.cts.map +1 -0
  496. package/build/queries/sql/expressions/expression.d.mts +23 -0
  497. package/build/queries/sql/expressions/expression.d.mts.map +1 -0
  498. package/build/queries/sql/expressions/expression.js +97 -0
  499. package/build/queries/sql/expressions/expression.js.map +1 -0
  500. package/build/queries/sql/expressions/greatest.cjs +25 -0
  501. package/build/queries/sql/expressions/greatest.cjs.map +1 -0
  502. package/build/queries/sql/expressions/greatest.d.cts +21 -0
  503. package/build/queries/sql/expressions/greatest.d.cts.map +1 -0
  504. package/build/queries/sql/expressions/greatest.d.mts +21 -0
  505. package/build/queries/sql/expressions/greatest.d.mts.map +1 -0
  506. package/build/queries/sql/expressions/greatest.js +22 -0
  507. package/build/queries/sql/expressions/greatest.js.map +1 -0
  508. package/build/queries/sql/expressions/least.cjs +25 -0
  509. package/build/queries/sql/expressions/least.cjs.map +1 -0
  510. package/build/queries/sql/expressions/least.d.cts +21 -0
  511. package/build/queries/sql/expressions/least.d.cts.map +1 -0
  512. package/build/queries/sql/expressions/least.d.mts +21 -0
  513. package/build/queries/sql/expressions/least.d.mts.map +1 -0
  514. package/build/queries/sql/expressions/least.js +22 -0
  515. package/build/queries/sql/expressions/least.js.map +1 -0
  516. package/build/queries/sql/expressions/nullIf.cjs +27 -0
  517. package/build/queries/sql/expressions/nullIf.cjs.map +1 -0
  518. package/build/queries/sql/expressions/nullIf.d.cts +22 -0
  519. package/build/queries/sql/expressions/nullIf.d.cts.map +1 -0
  520. package/build/queries/sql/expressions/nullIf.d.mts +22 -0
  521. package/build/queries/sql/expressions/nullIf.d.mts.map +1 -0
  522. package/build/queries/sql/expressions/nullIf.js +24 -0
  523. package/build/queries/sql/expressions/nullIf.js.map +1 -0
  524. package/build/queries/sql/expressions/parseExpression.cjs +75 -0
  525. package/build/queries/sql/expressions/parseExpression.cjs.map +1 -0
  526. package/build/queries/sql/expressions/parseExpression.d.cts +19 -0
  527. package/build/queries/sql/expressions/parseExpression.d.cts.map +1 -0
  528. package/build/queries/sql/expressions/parseExpression.d.mts +19 -0
  529. package/build/queries/sql/expressions/parseExpression.d.mts.map +1 -0
  530. package/build/queries/sql/expressions/parseExpression.js +70 -0
  531. package/build/queries/sql/expressions/parseExpression.js.map +1 -0
  532. package/build/queries/sql/expressions/types.cjs +1 -0
  533. package/build/queries/sql/expressions/types.d.cts +114 -0
  534. package/build/queries/sql/expressions/types.d.cts.map +1 -0
  535. package/build/queries/sql/expressions/types.d.mts +114 -0
  536. package/build/queries/sql/expressions/types.d.mts.map +1 -0
  537. package/build/queries/sql/expressions/types.js +1 -0
  538. package/build/queries/sql/keywords.cjs +136 -0
  539. package/build/queries/sql/keywords.cjs.map +1 -0
  540. package/build/queries/sql/keywords.d.cts +18 -0
  541. package/build/queries/sql/keywords.d.cts.map +1 -0
  542. package/build/queries/sql/keywords.d.mts +18 -0
  543. package/build/queries/sql/keywords.d.mts.map +1 -0
  544. package/build/queries/sql/keywords.js +132 -0
  545. package/build/queries/sql/keywords.js.map +1 -0
  546. package/build/queries/sql/query.cjs +1548 -0
  547. package/build/queries/sql/query.cjs.map +1 -0
  548. package/build/queries/sql/query.d.cts +794 -0
  549. package/build/queries/sql/query.d.cts.map +1 -0
  550. package/build/queries/sql/query.d.mts +794 -0
  551. package/build/queries/sql/query.d.mts.map +1 -0
  552. package/build/queries/sql/query.js +1530 -0
  553. package/build/queries/sql/query.js.map +1 -0
  554. package/build/queries/unnest.cjs +62 -0
  555. package/build/queries/unnest.cjs.map +1 -0
  556. package/build/queries/unnest.d.cts +16 -0
  557. package/build/queries/unnest.d.cts.map +1 -0
  558. package/build/queries/unnest.d.mts +16 -0
  559. package/build/queries/unnest.d.mts.map +1 -0
  560. package/build/queries/unnest.js +60 -0
  561. package/build/queries/unnest.js.map +1 -0
  562. package/build/queries/valueFilters.cjs +248 -0
  563. package/build/queries/valueFilters.cjs.map +1 -0
  564. package/build/queries/valueFilters.d.cts +28 -0
  565. package/build/queries/valueFilters.d.cts.map +1 -0
  566. package/build/queries/valueFilters.d.mts +28 -0
  567. package/build/queries/valueFilters.d.mts.map +1 -0
  568. package/build/queries/valueFilters.js +243 -0
  569. package/build/queries/valueFilters.js.map +1 -0
  570. package/build/reactivity/ReactionsManager.cjs +264 -0
  571. package/build/reactivity/ReactionsManager.cjs.map +1 -0
  572. package/build/reactivity/ReactionsManager.d.cts +98 -0
  573. package/build/reactivity/ReactionsManager.d.cts.map +1 -0
  574. package/build/reactivity/ReactionsManager.d.mts +98 -0
  575. package/build/reactivity/ReactionsManager.d.mts.map +1 -0
  576. package/build/reactivity/ReactionsManager.js +263 -0
  577. package/build/reactivity/ReactionsManager.js.map +1 -0
  578. package/build/reactivity/reactiveHints.cjs +328 -0
  579. package/build/reactivity/reactiveHints.cjs.map +1 -0
  580. package/build/reactivity/reactiveHints.d.cts +143 -0
  581. package/build/reactivity/reactiveHints.d.cts.map +1 -0
  582. package/build/reactivity/reactiveHints.d.mts +143 -0
  583. package/build/reactivity/reactiveHints.d.mts.map +1 -0
  584. package/build/reactivity/reactiveHints.js +321 -0
  585. package/build/reactivity/reactiveHints.js.map +1 -0
  586. package/build/relations/AbstractRelationImpl.cjs +0 -5
  587. package/build/relations/AbstractRelationImpl.cjs.map +1 -1
  588. package/build/relations/AbstractRelationImpl.d.cts +1 -2
  589. package/build/relations/AbstractRelationImpl.d.cts.map +1 -1
  590. package/build/relations/AbstractRelationImpl.d.mts +1 -2
  591. package/build/relations/AbstractRelationImpl.d.mts.map +1 -1
  592. package/build/relations/AbstractRelationImpl.js +1 -5
  593. package/build/relations/AbstractRelationImpl.js.map +1 -1
  594. package/build/relations/AsyncProperty.cjs +1 -1
  595. package/build/relations/AsyncProperty.js +1 -1
  596. package/build/relations/AsyncReactiveField.cjs +7 -7
  597. package/build/relations/AsyncReactiveField.cjs.map +1 -1
  598. package/build/relations/AsyncReactiveField.d.cts +1 -1
  599. package/build/relations/AsyncReactiveField.d.mts +1 -1
  600. package/build/relations/AsyncReactiveField.js +5 -5
  601. package/build/relations/AsyncReactiveField.js.map +1 -1
  602. package/build/relations/CustomCollection.cjs +1 -1
  603. package/build/relations/CustomCollection.d.cts +1 -1
  604. package/build/relations/CustomCollection.d.mts +1 -1
  605. package/build/relations/CustomCollection.js +1 -1
  606. package/build/relations/CustomReference.cjs +3 -3
  607. package/build/relations/CustomReference.d.cts +1 -1
  608. package/build/relations/CustomReference.d.mts +1 -1
  609. package/build/relations/CustomReference.js +3 -3
  610. package/build/relations/EnumCollection.cjs +2 -2
  611. package/build/relations/EnumCollection.d.cts +1 -1
  612. package/build/relations/EnumCollection.d.mts +1 -1
  613. package/build/relations/EnumCollection.js +2 -2
  614. package/build/relations/LazyField.cjs +6 -7
  615. package/build/relations/LazyField.cjs.map +1 -1
  616. package/build/relations/LazyField.js +5 -6
  617. package/build/relations/LazyField.js.map +1 -1
  618. package/build/relations/ManyToManyCollection.cjs +5 -4
  619. package/build/relations/ManyToManyCollection.cjs.map +1 -1
  620. package/build/relations/ManyToManyCollection.d.cts.map +1 -1
  621. package/build/relations/ManyToManyCollection.d.mts.map +1 -1
  622. package/build/relations/ManyToManyCollection.js +5 -4
  623. package/build/relations/ManyToManyCollection.js.map +1 -1
  624. package/build/relations/ManyToManyLargeCollection.cjs +3 -3
  625. package/build/relations/ManyToManyLargeCollection.js +3 -3
  626. package/build/relations/ManyToOneReference.cjs +6 -5
  627. package/build/relations/ManyToOneReference.cjs.map +1 -1
  628. package/build/relations/ManyToOneReference.d.cts.map +1 -1
  629. package/build/relations/ManyToOneReference.d.mts.map +1 -1
  630. package/build/relations/ManyToOneReference.js +6 -5
  631. package/build/relations/ManyToOneReference.js.map +1 -1
  632. package/build/relations/OneToManyCollection.cjs +7 -7
  633. package/build/relations/OneToManyCollection.cjs.map +1 -1
  634. package/build/relations/OneToManyCollection.d.cts +1 -1
  635. package/build/relations/OneToManyCollection.d.cts.map +1 -1
  636. package/build/relations/OneToManyCollection.d.mts +1 -1
  637. package/build/relations/OneToManyCollection.d.mts.map +1 -1
  638. package/build/relations/OneToManyCollection.js +5 -5
  639. package/build/relations/OneToManyCollection.js.map +1 -1
  640. package/build/relations/OneToManyLargeCollection.cjs +2 -2
  641. package/build/relations/OneToManyLargeCollection.js +2 -2
  642. package/build/relations/OneToOneReference.cjs +5 -4
  643. package/build/relations/OneToOneReference.cjs.map +1 -1
  644. package/build/relations/OneToOneReference.d.cts.map +1 -1
  645. package/build/relations/OneToOneReference.d.mts.map +1 -1
  646. package/build/relations/OneToOneReference.js +5 -4
  647. package/build/relations/OneToOneReference.js.map +1 -1
  648. package/build/relations/PolymorphicReference.cjs +7 -6
  649. package/build/relations/PolymorphicReference.cjs.map +1 -1
  650. package/build/relations/PolymorphicReference.d.cts.map +1 -1
  651. package/build/relations/PolymorphicReference.d.mts.map +1 -1
  652. package/build/relations/PolymorphicReference.js +7 -6
  653. package/build/relations/PolymorphicReference.js.map +1 -1
  654. package/build/relations/ReactiveField.cjs +6 -7
  655. package/build/relations/ReactiveField.cjs.map +1 -1
  656. package/build/relations/ReactiveField.d.cts +2 -2
  657. package/build/relations/ReactiveField.d.mts +2 -2
  658. package/build/relations/ReactiveField.js +4 -5
  659. package/build/relations/ReactiveField.js.map +1 -1
  660. package/build/relations/ReactiveGetter.cjs +1 -2
  661. package/build/relations/ReactiveGetter.cjs.map +1 -1
  662. package/build/relations/ReactiveGetter.d.cts +1 -1
  663. package/build/relations/ReactiveGetter.d.mts +1 -1
  664. package/build/relations/ReactiveGetter.js +1 -2
  665. package/build/relations/ReactiveGetter.js.map +1 -1
  666. package/build/relations/ReactiveManyToMany.cjs +8 -8
  667. package/build/relations/ReactiveManyToMany.cjs.map +1 -1
  668. package/build/relations/ReactiveManyToMany.d.cts +2 -2
  669. package/build/relations/ReactiveManyToMany.d.cts.map +1 -1
  670. package/build/relations/ReactiveManyToMany.d.mts +2 -2
  671. package/build/relations/ReactiveManyToMany.d.mts.map +1 -1
  672. package/build/relations/ReactiveManyToMany.js +6 -6
  673. package/build/relations/ReactiveManyToMany.js.map +1 -1
  674. package/build/relations/ReactiveManyToManyOtherSide.cjs +1 -3
  675. package/build/relations/ReactiveManyToManyOtherSide.cjs.map +1 -1
  676. package/build/relations/ReactiveManyToManyOtherSide.d.cts +2 -2
  677. package/build/relations/ReactiveManyToManyOtherSide.d.mts +2 -2
  678. package/build/relations/ReactiveManyToManyOtherSide.js +1 -3
  679. package/build/relations/ReactiveManyToManyOtherSide.js.map +1 -1
  680. package/build/relations/ReactiveReference.cjs +10 -10
  681. package/build/relations/ReactiveReference.cjs.map +1 -1
  682. package/build/relations/ReactiveReference.d.cts +2 -2
  683. package/build/relations/ReactiveReference.d.cts.map +1 -1
  684. package/build/relations/ReactiveReference.d.mts +2 -2
  685. package/build/relations/ReactiveReference.d.mts.map +1 -1
  686. package/build/relations/ReactiveReference.js +8 -8
  687. package/build/relations/ReactiveReference.js.map +1 -1
  688. package/build/relations/RecursiveCollection.cjs +5 -6
  689. package/build/relations/RecursiveCollection.cjs.map +1 -1
  690. package/build/relations/RecursiveCollection.d.cts +1 -1
  691. package/build/relations/RecursiveCollection.d.mts +1 -1
  692. package/build/relations/RecursiveCollection.js +5 -6
  693. package/build/relations/RecursiveCollection.js.map +1 -1
  694. package/build/relations/hasAsyncMethod.cjs +2 -2
  695. package/build/relations/hasAsyncMethod.cjs.map +1 -1
  696. package/build/relations/hasAsyncMethod.d.cts +1 -1
  697. package/build/relations/hasAsyncMethod.d.mts +1 -1
  698. package/build/relations/hasAsyncMethod.js +1 -1
  699. package/build/relations/hasAsyncMethod.js.map +1 -1
  700. package/build/relations/hasManyDerived.cjs +3 -3
  701. package/build/relations/hasManyDerived.cjs.map +1 -1
  702. package/build/relations/hasManyDerived.d.cts +1 -1
  703. package/build/relations/hasManyDerived.d.mts +1 -1
  704. package/build/relations/hasManyDerived.js +2 -2
  705. package/build/relations/hasManyDerived.js.map +1 -1
  706. package/build/relations/hasManyThrough.cjs +6 -6
  707. package/build/relations/hasManyThrough.cjs.map +1 -1
  708. package/build/relations/hasManyThrough.d.cts +1 -1
  709. package/build/relations/hasManyThrough.d.mts +1 -1
  710. package/build/relations/hasManyThrough.js +2 -2
  711. package/build/relations/hasOneDerived.cjs +3 -3
  712. package/build/relations/hasOneDerived.cjs.map +1 -1
  713. package/build/relations/hasOneDerived.d.cts +1 -1
  714. package/build/relations/hasOneDerived.d.mts +1 -1
  715. package/build/relations/hasOneDerived.js +2 -2
  716. package/build/relations/hasOneDerived.js.map +1 -1
  717. package/build/relations/hasOneThrough.cjs +7 -7
  718. package/build/relations/hasOneThrough.cjs.map +1 -1
  719. package/build/relations/hasOneThrough.d.cts +1 -1
  720. package/build/relations/hasOneThrough.d.mts +1 -1
  721. package/build/relations/hasOneThrough.js +2 -2
  722. package/build/relations/hasProperty.cjs +6 -6
  723. package/build/relations/hasProperty.cjs.map +1 -1
  724. package/build/relations/hasProperty.d.cts +2 -2
  725. package/build/relations/hasProperty.d.mts +2 -2
  726. package/build/relations/hasProperty.js +4 -4
  727. package/build/relations/hasProperty.js.map +1 -1
  728. package/build/relations/index.cjs +5 -5
  729. package/build/relations/index.js +5 -5
  730. package/build/relations/isCascadeDelete.cjs +11 -0
  731. package/build/relations/isCascadeDelete.cjs.map +1 -0
  732. package/build/relations/isCascadeDelete.d.cts +7 -0
  733. package/build/relations/isCascadeDelete.d.cts.map +1 -0
  734. package/build/relations/isCascadeDelete.d.mts +7 -0
  735. package/build/relations/isCascadeDelete.d.mts.map +1 -0
  736. package/build/relations/isCascadeDelete.js +10 -0
  737. package/build/relations/isCascadeDelete.js.map +1 -0
  738. package/build/resurrection.cjs +1 -1
  739. package/build/resurrection.js +1 -1
  740. package/build/rules.cjs +3 -4
  741. package/build/rules.cjs.map +1 -1
  742. package/build/rules.d.cts +1 -1
  743. package/build/rules.d.mts +1 -1
  744. package/build/rules.js +3 -4
  745. package/build/rules.js.map +1 -1
  746. package/build/serde/TypeInfo.cjs +80 -0
  747. package/build/serde/TypeInfo.cjs.map +1 -0
  748. package/build/serde/TypeInfo.d.cts +57 -0
  749. package/build/serde/TypeInfo.d.cts.map +1 -0
  750. package/build/serde/TypeInfo.d.mts +57 -0
  751. package/build/serde/TypeInfo.d.mts.map +1 -0
  752. package/build/serde/TypeInfo.js +78 -0
  753. package/build/serde/TypeInfo.js.map +1 -0
  754. package/build/serde/columns.cjs +63 -0
  755. package/build/serde/columns.cjs.map +1 -0
  756. package/build/serde/columns.d.cts +38 -0
  757. package/build/serde/columns.d.cts.map +1 -0
  758. package/build/serde/columns.d.mts +38 -0
  759. package/build/serde/columns.d.mts.map +1 -0
  760. package/build/serde/columns.js +62 -0
  761. package/build/serde/columns.js.map +1 -0
  762. package/build/serde/fieldSerde.cjs +188 -0
  763. package/build/serde/fieldSerde.cjs.map +1 -0
  764. package/build/serde/fieldSerde.d.cts +87 -0
  765. package/build/serde/fieldSerde.d.cts.map +1 -0
  766. package/build/serde/fieldSerde.d.mts +87 -0
  767. package/build/serde/fieldSerde.d.mts.map +1 -0
  768. package/build/serde/fieldSerde.js +182 -0
  769. package/build/serde/fieldSerde.js.map +1 -0
  770. package/build/serde/serde.cjs +499 -0
  771. package/build/serde/serde.cjs.map +1 -0
  772. package/build/serde/serde.d.cts +248 -0
  773. package/build/serde/serde.d.cts.map +1 -0
  774. package/build/serde/serde.d.mts +248 -0
  775. package/build/serde/serde.d.mts.map +1 -0
  776. package/build/serde/serde.js +485 -0
  777. package/build/serde/serde.js.map +1 -0
  778. package/build/serde/temporal.cjs +57 -0
  779. package/build/serde/temporal.cjs.map +1 -0
  780. package/build/serde/temporal.d.cts +44 -0
  781. package/build/serde/temporal.d.cts.map +1 -0
  782. package/build/serde/temporal.d.mts +44 -0
  783. package/build/serde/temporal.d.mts.map +1 -0
  784. package/build/serde/temporal.js +55 -0
  785. package/build/serde/temporal.js.map +1 -0
  786. package/build/serde/temporalMappers.cjs +62 -0
  787. package/build/serde/temporalMappers.cjs.map +1 -0
  788. package/build/serde/temporalMappers.d.cts +36 -0
  789. package/build/serde/temporalMappers.d.cts.map +1 -0
  790. package/build/serde/temporalMappers.d.mts +36 -0
  791. package/build/serde/temporalMappers.d.mts.map +1 -0
  792. package/build/serde/temporalMappers.js +58 -0
  793. package/build/serde/temporalMappers.js.map +1 -0
  794. package/build/upsert.cjs +4 -4
  795. package/build/upsert.js +4 -4
  796. package/build/utils.cjs +0 -2
  797. package/build/utils.cjs.map +1 -1
  798. package/build/utils.d.cts +2 -2
  799. package/build/utils.d.mts +2 -2
  800. package/build/utils.js +0 -2
  801. package/build/utils.js.map +1 -1
  802. package/package.json +2 -2
  803. package/build/AliasAssigner.cjs +0 -36
  804. package/build/AliasAssigner.cjs.map +0 -1
  805. package/build/AliasAssigner.d.cts +0 -13
  806. package/build/AliasAssigner.d.cts.map +0 -1
  807. package/build/AliasAssigner.d.mts +0 -13
  808. package/build/AliasAssigner.d.mts.map +0 -1
  809. package/build/AliasAssigner.js +0 -35
  810. package/build/AliasAssigner.js.map +0 -1
  811. package/build/Aliases.cjs +0 -306
  812. package/build/Aliases.cjs.map +0 -1
  813. package/build/Aliases.d.cts +0 -122
  814. package/build/Aliases.d.cts.map +0 -1
  815. package/build/Aliases.d.mts +0 -122
  816. package/build/Aliases.d.mts.map +0 -1
  817. package/build/Aliases.js +0 -298
  818. package/build/Aliases.js.map +0 -1
  819. package/build/ConditionBuilder.cjs +0 -107
  820. package/build/ConditionBuilder.cjs.map +0 -1
  821. package/build/ConditionBuilder.d.cts +0 -31
  822. package/build/ConditionBuilder.d.cts.map +0 -1
  823. package/build/ConditionBuilder.d.mts +0 -31
  824. package/build/ConditionBuilder.d.mts.map +0 -1
  825. package/build/ConditionBuilder.js +0 -106
  826. package/build/ConditionBuilder.js.map +0 -1
  827. package/build/DeferredAlias.cjs +0 -28
  828. package/build/DeferredAlias.cjs.map +0 -1
  829. package/build/DeferredAlias.d.cts +0 -22
  830. package/build/DeferredAlias.d.cts.map +0 -1
  831. package/build/DeferredAlias.d.mts +0 -22
  832. package/build/DeferredAlias.d.mts.map +0 -1
  833. package/build/DeferredAlias.js +0 -25
  834. package/build/DeferredAlias.js.map +0 -1
  835. package/build/EntityFilter.cjs +0 -32
  836. package/build/EntityFilter.cjs.map +0 -1
  837. package/build/EntityFilter.d.cts +0 -127
  838. package/build/EntityFilter.d.cts.map +0 -1
  839. package/build/EntityFilter.d.mts +0 -127
  840. package/build/EntityFilter.d.mts.map +0 -1
  841. package/build/EntityFilter.js +0 -31
  842. package/build/EntityFilter.js.map +0 -1
  843. package/build/EntityGraphQLFilter.cjs +0 -56
  844. package/build/EntityGraphQLFilter.cjs.map +0 -1
  845. package/build/EntityGraphQLFilter.d.cts +0 -59
  846. package/build/EntityGraphQLFilter.d.cts.map +0 -1
  847. package/build/EntityGraphQLFilter.d.mts +0 -59
  848. package/build/EntityGraphQLFilter.d.mts.map +0 -1
  849. package/build/EntityGraphQLFilter.js +0 -54
  850. package/build/EntityGraphQLFilter.js.map +0 -1
  851. package/build/Expr.cjs +0 -512
  852. package/build/Expr.cjs.map +0 -1
  853. package/build/Expr.d.cts +0 -274
  854. package/build/Expr.d.cts.map +0 -1
  855. package/build/Expr.d.mts +0 -274
  856. package/build/Expr.d.mts.map +0 -1
  857. package/build/Expr.js +0 -496
  858. package/build/Expr.js.map +0 -1
  859. package/build/FlushLock.cjs +0 -51
  860. package/build/FlushLock.cjs.map +0 -1
  861. package/build/FlushLock.d.cts +0 -29
  862. package/build/FlushLock.d.cts.map +0 -1
  863. package/build/FlushLock.d.mts +0 -29
  864. package/build/FlushLock.d.mts.map +0 -1
  865. package/build/FlushLock.js +0 -51
  866. package/build/FlushLock.js.map +0 -1
  867. package/build/HintTree.cjs +0 -70
  868. package/build/HintTree.cjs.map +0 -1
  869. package/build/HintTree.d.cts +0 -45
  870. package/build/HintTree.d.cts.map +0 -1
  871. package/build/HintTree.d.mts +0 -45
  872. package/build/HintTree.d.mts.map +0 -1
  873. package/build/HintTree.js +0 -69
  874. package/build/HintTree.js.map +0 -1
  875. package/build/IsLoadedCache.cjs +0 -59
  876. package/build/IsLoadedCache.cjs.map +0 -1
  877. package/build/IsLoadedCache.d.cts +0 -35
  878. package/build/IsLoadedCache.d.cts.map +0 -1
  879. package/build/IsLoadedCache.d.mts +0 -35
  880. package/build/IsLoadedCache.d.mts.map +0 -1
  881. package/build/IsLoadedCache.js +0 -58
  882. package/build/IsLoadedCache.js.map +0 -1
  883. package/build/JoinRows.cjs +0 -266
  884. package/build/JoinRows.cjs.map +0 -1
  885. package/build/JoinRows.d.cts +0 -120
  886. package/build/JoinRows.d.cts.map +0 -1
  887. package/build/JoinRows.d.mts +0 -120
  888. package/build/JoinRows.d.mts.map +0 -1
  889. package/build/JoinRows.js +0 -264
  890. package/build/JoinRows.js.map +0 -1
  891. package/build/PendingChanges.cjs +0 -2
  892. package/build/PendingChanges.d.cts +0 -29
  893. package/build/PendingChanges.d.cts.map +0 -1
  894. package/build/PendingChanges.d.mts +0 -29
  895. package/build/PendingChanges.d.mts.map +0 -1
  896. package/build/PendingChanges.js +0 -2
  897. package/build/QueryParser.cjs +0 -842
  898. package/build/QueryParser.cjs.map +0 -1
  899. package/build/QueryParser.collectionJoins.cjs +0 -353
  900. package/build/QueryParser.collectionJoins.cjs.map +0 -1
  901. package/build/QueryParser.collectionJoins.d.cts +0 -30
  902. package/build/QueryParser.collectionJoins.d.cts.map +0 -1
  903. package/build/QueryParser.collectionJoins.d.mts +0 -30
  904. package/build/QueryParser.collectionJoins.d.mts.map +0 -1
  905. package/build/QueryParser.collectionJoins.js +0 -352
  906. package/build/QueryParser.collectionJoins.js.map +0 -1
  907. package/build/QueryParser.d.cts +0 -346
  908. package/build/QueryParser.d.cts.map +0 -1
  909. package/build/QueryParser.d.mts +0 -346
  910. package/build/QueryParser.d.mts.map +0 -1
  911. package/build/QueryParser.js +0 -827
  912. package/build/QueryParser.js.map +0 -1
  913. package/build/QueryParser.pruning.cjs +0 -129
  914. package/build/QueryParser.pruning.cjs.map +0 -1
  915. package/build/QueryParser.pruning.d.cts +0 -10
  916. package/build/QueryParser.pruning.d.cts.map +0 -1
  917. package/build/QueryParser.pruning.d.mts +0 -10
  918. package/build/QueryParser.pruning.d.mts.map +0 -1
  919. package/build/QueryParser.pruning.js +0 -126
  920. package/build/QueryParser.pruning.js.map +0 -1
  921. package/build/QueryVisitor.cjs +0 -61
  922. package/build/QueryVisitor.cjs.map +0 -1
  923. package/build/QueryVisitor.d.cts +0 -21
  924. package/build/QueryVisitor.d.cts.map +0 -1
  925. package/build/QueryVisitor.d.mts +0 -21
  926. package/build/QueryVisitor.d.mts.map +0 -1
  927. package/build/QueryVisitor.js +0 -59
  928. package/build/QueryVisitor.js.map +0 -1
  929. package/build/ReactionsManager.cjs +0 -266
  930. package/build/ReactionsManager.cjs.map +0 -1
  931. package/build/ReactionsManager.d.cts +0 -99
  932. package/build/ReactionsManager.d.cts.map +0 -1
  933. package/build/ReactionsManager.d.mts +0 -99
  934. package/build/ReactionsManager.d.mts.map +0 -1
  935. package/build/ReactionsManager.js +0 -265
  936. package/build/ReactionsManager.js.map +0 -1
  937. package/build/Tables.cjs +0 -710
  938. package/build/Tables.cjs.map +0 -1
  939. package/build/Tables.d.cts +0 -264
  940. package/build/Tables.d.cts.map +0 -1
  941. package/build/Tables.d.mts +0 -264
  942. package/build/Tables.d.mts.map +0 -1
  943. package/build/Tables.js +0 -699
  944. package/build/Tables.js.map +0 -1
  945. package/build/Todo.cjs +0 -73
  946. package/build/Todo.cjs.map +0 -1
  947. package/build/Todo.d.cts +0 -38
  948. package/build/Todo.d.cts.map +0 -1
  949. package/build/Todo.d.mts +0 -38
  950. package/build/Todo.d.mts.map +0 -1
  951. package/build/Todo.js +0 -69
  952. package/build/Todo.js.map +0 -1
  953. package/build/TypeInfo.cjs +0 -80
  954. package/build/TypeInfo.cjs.map +0 -1
  955. package/build/TypeInfo.d.cts +0 -57
  956. package/build/TypeInfo.d.cts.map +0 -1
  957. package/build/TypeInfo.d.mts +0 -57
  958. package/build/TypeInfo.d.mts.map +0 -1
  959. package/build/TypeInfo.js +0 -78
  960. package/build/TypeInfo.js.map +0 -1
  961. package/build/columns.cjs +0 -63
  962. package/build/columns.cjs.map +0 -1
  963. package/build/columns.d.cts +0 -38
  964. package/build/columns.d.cts.map +0 -1
  965. package/build/columns.d.mts +0 -38
  966. package/build/columns.d.mts.map +0 -1
  967. package/build/columns.js +0 -62
  968. package/build/columns.js.map +0 -1
  969. package/build/conditions.cjs +0 -16
  970. package/build/conditions.cjs.map +0 -1
  971. package/build/conditions.d.cts +0 -38
  972. package/build/conditions.d.cts.map +0 -1
  973. package/build/conditions.d.mts +0 -38
  974. package/build/conditions.d.mts.map +0 -1
  975. package/build/conditions.js +0 -14
  976. package/build/conditions.js.map +0 -1
  977. package/build/driverApi.cjs +0 -19
  978. package/build/driverApi.cjs.map +0 -1
  979. package/build/driverApi.d.cts +0 -22
  980. package/build/driverApi.d.cts.map +0 -1
  981. package/build/driverApi.d.mts +0 -22
  982. package/build/driverApi.d.mts.map +0 -1
  983. package/build/driverApi.js +0 -18
  984. package/build/driverApi.js.map +0 -1
  985. package/build/drivers/buildRawQuery.cjs +0 -113
  986. package/build/drivers/buildRawQuery.cjs.map +0 -1
  987. package/build/drivers/buildRawQuery.d.cts +0 -24
  988. package/build/drivers/buildRawQuery.d.cts.map +0 -1
  989. package/build/drivers/buildRawQuery.d.mts +0 -24
  990. package/build/drivers/buildRawQuery.d.mts.map +0 -1
  991. package/build/drivers/buildRawQuery.js +0 -111
  992. package/build/drivers/buildRawQuery.js.map +0 -1
  993. package/build/drivers/buildUtils.cjs +0 -67
  994. package/build/drivers/buildUtils.cjs.map +0 -1
  995. package/build/drivers/buildUtils.d.cts +0 -14
  996. package/build/drivers/buildUtils.d.cts.map +0 -1
  997. package/build/drivers/buildUtils.d.mts +0 -14
  998. package/build/drivers/buildUtils.d.mts.map +0 -1
  999. package/build/drivers/buildUtils.js +0 -65
  1000. package/build/drivers/buildUtils.js.map +0 -1
  1001. package/build/execute.cjs +0 -241
  1002. package/build/execute.cjs.map +0 -1
  1003. package/build/execute.d.cts +0 -195
  1004. package/build/execute.d.cts.map +0 -1
  1005. package/build/execute.d.mts +0 -195
  1006. package/build/execute.d.mts.map +0 -1
  1007. package/build/execute.js +0 -238
  1008. package/build/execute.js.map +0 -1
  1009. package/build/expressions/arrayAgg.cjs +0 -63
  1010. package/build/expressions/arrayAgg.cjs.map +0 -1
  1011. package/build/expressions/arrayAgg.d.cts +0 -24
  1012. package/build/expressions/arrayAgg.d.cts.map +0 -1
  1013. package/build/expressions/arrayAgg.d.mts +0 -24
  1014. package/build/expressions/arrayAgg.d.mts.map +0 -1
  1015. package/build/expressions/arrayAgg.js +0 -61
  1016. package/build/expressions/arrayAgg.js.map +0 -1
  1017. package/build/expressions/case.cjs +0 -71
  1018. package/build/expressions/case.cjs.map +0 -1
  1019. package/build/expressions/case.d.cts +0 -57
  1020. package/build/expressions/case.d.cts.map +0 -1
  1021. package/build/expressions/case.d.mts +0 -57
  1022. package/build/expressions/case.d.mts.map +0 -1
  1023. package/build/expressions/case.js +0 -68
  1024. package/build/expressions/case.js.map +0 -1
  1025. package/build/expressions/coalesce.cjs +0 -25
  1026. package/build/expressions/coalesce.cjs.map +0 -1
  1027. package/build/expressions/coalesce.d.cts +0 -21
  1028. package/build/expressions/coalesce.d.cts.map +0 -1
  1029. package/build/expressions/coalesce.d.mts +0 -21
  1030. package/build/expressions/coalesce.d.mts.map +0 -1
  1031. package/build/expressions/coalesce.js +0 -22
  1032. package/build/expressions/coalesce.js.map +0 -1
  1033. package/build/expressions/codecs.cjs +0 -126
  1034. package/build/expressions/codecs.cjs.map +0 -1
  1035. package/build/expressions/codecs.d.cts +0 -11
  1036. package/build/expressions/codecs.d.cts.map +0 -1
  1037. package/build/expressions/codecs.d.mts +0 -11
  1038. package/build/expressions/codecs.d.mts.map +0 -1
  1039. package/build/expressions/codecs.js +0 -125
  1040. package/build/expressions/codecs.js.map +0 -1
  1041. package/build/expressions/expression.cjs +0 -102
  1042. package/build/expressions/expression.cjs.map +0 -1
  1043. package/build/expressions/expression.d.cts +0 -23
  1044. package/build/expressions/expression.d.cts.map +0 -1
  1045. package/build/expressions/expression.d.mts +0 -23
  1046. package/build/expressions/expression.d.mts.map +0 -1
  1047. package/build/expressions/expression.js +0 -97
  1048. package/build/expressions/expression.js.map +0 -1
  1049. package/build/expressions/greatest.cjs +0 -25
  1050. package/build/expressions/greatest.cjs.map +0 -1
  1051. package/build/expressions/greatest.d.cts +0 -21
  1052. package/build/expressions/greatest.d.cts.map +0 -1
  1053. package/build/expressions/greatest.d.mts +0 -21
  1054. package/build/expressions/greatest.d.mts.map +0 -1
  1055. package/build/expressions/greatest.js +0 -22
  1056. package/build/expressions/greatest.js.map +0 -1
  1057. package/build/expressions/least.cjs +0 -25
  1058. package/build/expressions/least.cjs.map +0 -1
  1059. package/build/expressions/least.d.cts +0 -21
  1060. package/build/expressions/least.d.cts.map +0 -1
  1061. package/build/expressions/least.d.mts +0 -21
  1062. package/build/expressions/least.d.mts.map +0 -1
  1063. package/build/expressions/least.js +0 -22
  1064. package/build/expressions/least.js.map +0 -1
  1065. package/build/expressions/nullIf.cjs +0 -27
  1066. package/build/expressions/nullIf.cjs.map +0 -1
  1067. package/build/expressions/nullIf.d.cts +0 -22
  1068. package/build/expressions/nullIf.d.cts.map +0 -1
  1069. package/build/expressions/nullIf.d.mts +0 -22
  1070. package/build/expressions/nullIf.d.mts.map +0 -1
  1071. package/build/expressions/nullIf.js +0 -24
  1072. package/build/expressions/nullIf.js.map +0 -1
  1073. package/build/expressions/parseExpression.cjs +0 -75
  1074. package/build/expressions/parseExpression.cjs.map +0 -1
  1075. package/build/expressions/parseExpression.d.cts +0 -19
  1076. package/build/expressions/parseExpression.d.cts.map +0 -1
  1077. package/build/expressions/parseExpression.d.mts +0 -19
  1078. package/build/expressions/parseExpression.d.mts.map +0 -1
  1079. package/build/expressions/parseExpression.js +0 -70
  1080. package/build/expressions/parseExpression.js.map +0 -1
  1081. package/build/expressions/types.d.cts +0 -114
  1082. package/build/expressions/types.d.cts.map +0 -1
  1083. package/build/expressions/types.d.mts +0 -114
  1084. package/build/expressions/types.d.mts.map +0 -1
  1085. package/build/fieldSerde.cjs +0 -188
  1086. package/build/fieldSerde.cjs.map +0 -1
  1087. package/build/fieldSerde.d.cts +0 -87
  1088. package/build/fieldSerde.d.cts.map +0 -1
  1089. package/build/fieldSerde.d.mts +0 -87
  1090. package/build/fieldSerde.d.mts.map +0 -1
  1091. package/build/fieldSerde.js +0 -182
  1092. package/build/fieldSerde.js.map +0 -1
  1093. package/build/keywords.cjs +0 -136
  1094. package/build/keywords.cjs.map +0 -1
  1095. package/build/keywords.d.cts +0 -18
  1096. package/build/keywords.d.cts.map +0 -1
  1097. package/build/keywords.d.mts +0 -18
  1098. package/build/keywords.d.mts.map +0 -1
  1099. package/build/keywords.js +0 -132
  1100. package/build/keywords.js.map +0 -1
  1101. package/build/loadHints.cjs +0 -100
  1102. package/build/loadHints.cjs.map +0 -1
  1103. package/build/loadHints.d.cts +0 -116
  1104. package/build/loadHints.d.cts.map +0 -1
  1105. package/build/loadHints.d.mts +0 -116
  1106. package/build/loadHints.d.mts.map +0 -1
  1107. package/build/loadHints.js +0 -93
  1108. package/build/loadHints.js.map +0 -1
  1109. package/build/loadLens.cjs +0 -213
  1110. package/build/loadLens.cjs.map +0 -1
  1111. package/build/loadLens.d.cts +0 -77
  1112. package/build/loadLens.d.cts.map +0 -1
  1113. package/build/loadLens.d.mts +0 -77
  1114. package/build/loadLens.d.mts.map +0 -1
  1115. package/build/loadLens.js +0 -202
  1116. package/build/loadLens.js.map +0 -1
  1117. package/build/query.cjs +0 -1549
  1118. package/build/query.cjs.map +0 -1
  1119. package/build/query.d.cts +0 -794
  1120. package/build/query.d.cts.map +0 -1
  1121. package/build/query.d.mts +0 -794
  1122. package/build/query.d.mts.map +0 -1
  1123. package/build/query.js +0 -1531
  1124. package/build/query.js.map +0 -1
  1125. package/build/reactiveHints.cjs +0 -332
  1126. package/build/reactiveHints.cjs.map +0 -1
  1127. package/build/reactiveHints.d.cts +0 -143
  1128. package/build/reactiveHints.d.cts.map +0 -1
  1129. package/build/reactiveHints.d.mts +0 -143
  1130. package/build/reactiveHints.d.mts.map +0 -1
  1131. package/build/reactiveHints.js +0 -325
  1132. package/build/reactiveHints.js.map +0 -1
  1133. package/build/scopes.cjs +0 -302
  1134. package/build/scopes.cjs.map +0 -1
  1135. package/build/scopes.d.cts +0 -188
  1136. package/build/scopes.d.cts.map +0 -1
  1137. package/build/scopes.d.mts +0 -188
  1138. package/build/scopes.d.mts.map +0 -1
  1139. package/build/scopes.js +0 -297
  1140. package/build/scopes.js.map +0 -1
  1141. package/build/serde.cjs +0 -500
  1142. package/build/serde.cjs.map +0 -1
  1143. package/build/serde.d.cts +0 -248
  1144. package/build/serde.d.cts.map +0 -1
  1145. package/build/serde.d.mts +0 -248
  1146. package/build/serde.d.mts.map +0 -1
  1147. package/build/serde.js +0 -486
  1148. package/build/serde.js.map +0 -1
  1149. package/build/skipCondition.cjs +0 -15
  1150. package/build/skipCondition.cjs.map +0 -1
  1151. package/build/skipCondition.d.cts +0 -7
  1152. package/build/skipCondition.d.cts.map +0 -1
  1153. package/build/skipCondition.d.mts +0 -7
  1154. package/build/skipCondition.d.mts.map +0 -1
  1155. package/build/skipCondition.js +0 -14
  1156. package/build/skipCondition.js.map +0 -1
  1157. package/build/temporal.cjs +0 -57
  1158. package/build/temporal.cjs.map +0 -1
  1159. package/build/temporal.d.cts +0 -44
  1160. package/build/temporal.d.cts.map +0 -1
  1161. package/build/temporal.d.mts +0 -44
  1162. package/build/temporal.d.mts.map +0 -1
  1163. package/build/temporal.js +0 -55
  1164. package/build/temporal.js.map +0 -1
  1165. package/build/temporalMappers.cjs +0 -63
  1166. package/build/temporalMappers.cjs.map +0 -1
  1167. package/build/temporalMappers.d.cts +0 -36
  1168. package/build/temporalMappers.d.cts.map +0 -1
  1169. package/build/temporalMappers.d.mts +0 -36
  1170. package/build/temporalMappers.d.mts.map +0 -1
  1171. package/build/temporalMappers.js +0 -59
  1172. package/build/temporalMappers.js.map +0 -1
  1173. package/build/unnest.cjs +0 -64
  1174. package/build/unnest.cjs.map +0 -1
  1175. package/build/unnest.d.cts +0 -16
  1176. package/build/unnest.d.cts.map +0 -1
  1177. package/build/unnest.d.mts +0 -16
  1178. package/build/unnest.d.mts.map +0 -1
  1179. package/build/unnest.js +0 -62
  1180. package/build/unnest.js.map +0 -1
  1181. package/build/withLoaded.cjs +0 -65
  1182. package/build/withLoaded.cjs.map +0 -1
  1183. package/build/withLoaded.d.cts +0 -65
  1184. package/build/withLoaded.d.cts.map +0 -1
  1185. package/build/withLoaded.d.mts +0 -65
  1186. package/build/withLoaded.d.mts.map +0 -1
  1187. package/build/withLoaded.js +0 -62
  1188. package/build/withLoaded.js.map +0 -1
  1189. /package/build/{expressions/types.cjs → flush/PendingChanges.cjs} +0 -0
  1190. /package/build/{expressions/types.js → flush/PendingChanges.js} +0 -0
package/build/query.d.cts DELETED
@@ -1,794 +0,0 @@
1
- import { SqlCondition, SqlPredicate, UnbrandedPredicate } from "./conditions.cjs";
2
- import { TypeInfo } from "./TypeInfo.cjs";
3
- import { EntityMetadata } from "./EntityMetadata.cjs";
4
- import { CheckInput, ExprFromInput, ExprInput, ExpressionSources, ExpressionValue } from "./expressions/types.cjs";
5
- import "./expressions/expression.cjs";
6
- import { BaseExpr, Expr, ExprContext, ExprLike, InnerJoin, LeftJoin, SqlFragment } from "./Expr.cjs";
7
- import { Table, TableBrand, referenceJoinSource, tableMgmt } from "./Tables.cjs";
8
- import { Entity } from "./Entity.cjs";
9
- import { ColumnCondition } from "./QueryParser.cjs";
10
- import { AliasAssigner } from "./AliasAssigner.cjs";
11
- //#region src/query.d.ts
12
- /**
13
- * `em.query`: SQL-shaped queries as plain object literals.
14
- *
15
- * A query is data, a `Query<S, J>` POJO, `{ from, join, where, groupBy, having, select, orderBy, ... }`
16
- * in SQL evaluation order:
17
- *
18
- * const [a, b] = tables(Author, Book);
19
- * const bookStats = query({ from: b, groupBy: [b.author_id], select: { authorId: b.author_id, n: b.id.count() } });
20
- * const rows = await em.query({
21
- * from: a,
22
- * join: [{ left: bookStats, on: bookStats.authorId.eq(a.id) }],
23
- * select: { name: a.first_name, n: bookStats.n },
24
- * orderBy: { n: "DESC" },
25
- * });
26
- * // rows: { name: string; n: number | null }[] (null because of the LEFT join)
27
- *
28
- * `em.query(pojo)` runs it. `select` decides the row type: a bare table returns entities, a
29
- * `{ key: expr }` object returns typed POJOs, a bare subquery returns that subquery's rows.
30
- *
31
- * `query(pojo)` turns the *same* POJO into a value: a derived table with typed columns, a scalar
32
- * expression, or an entity list. It is the one non-POJO step, and the subquery analog of `table(Author)`:
33
- * to reference a query's columns, the outer query needs *values* for them, and no POJO can manufacture
34
- * values keyed off its own `select` keys.
35
- *
36
- * `table()`/`tables()` and `query()` are the only free functions a query needs, plus the `sql` tagged
37
- * template as the escape hatch for SQL with no modeled shape. Everything else is in-DSL: join kinds are
38
- * keyword keys (`{ left: b, on }`), SQL functions are methods on
39
- * expressions (`b.id.count()`, `b.title.max()`, `x.coalesce(0)`), conditions are methods
40
- * (`a.age.gte(18)`), and pruning is `undefined`: an `undefined` condition drops out, and a join nothing
41
- * references anymore drops with it (see "Pruning" below).
42
- *
43
- * User documentation: `docs/src/content/docs/features/queries-raw.md`.
44
- */
45
- declare const subqueryBrand: unique symbol;
46
- declare const entityQueryBrand: unique symbol;
47
- declare const scalarQueryBrand: unique symbol;
48
- /** A query(...) value with any projection, for EXISTS and NOT EXISTS predicates. */
49
- type ExistsQuery = Subquery<unknown, string> | EntityQuery<Entity> | {
50
- readonly [scalarQueryBrand]: true;
51
- };
52
- /**
53
- * A condition for a query's where, having, or join on clause. Combine conditions with and/or,
54
- * or use exists/notExists to check whether a query(...) value returns any rows.
55
- *
56
- * I.e. `{ and: [a.age.gte(18), { exists: booksForAuthor }] }` selects adult Authors with Books,
57
- * where `booksForAuthor` is `query({ from: b, where: b.author_id.eq(a.id), select: b.id })`.
58
- */
59
- type QueryCondition = SqlPredicate | UnbrandedPredicate | (({
60
- and: readonly (QueryCondition | undefined)[];
61
- or?: never;
62
- exists?: never;
63
- notExists?: never;
64
- } | {
65
- or: readonly (QueryCondition | undefined)[];
66
- and?: never;
67
- exists?: never;
68
- notExists?: never;
69
- }) & {
70
- pruneIfUndefined?: "any" | "all";
71
- }) | {
72
- exists: ExistsQuery | undefined;
73
- notExists?: never;
74
- and?: never;
75
- or?: never;
76
- } | {
77
- notExists: ExistsQuery | undefined;
78
- exists?: never;
79
- and?: never;
80
- or?: never;
81
- };
82
- /** Phantom type information carried by a table-shaped subquery. */
83
- interface SubqueryBrand<R, Name extends string> {
84
- readonly __row: R;
85
- readonly __name: Name;
86
- }
87
- /** Anything that can be a source or be joined: an entity table or a table-shaped subquery. */
88
- type QuerySource = {
89
- readonly [tableMgmt]: TableBrand<any, string>;
90
- } | {
91
- readonly [subqueryBrand]: SubqueryBrand<any, string>;
92
- };
93
- /**
94
- * A join entry (see `InnerJoin`/`LeftJoin` in `Expr.ts`): the expanded `{ inner: b, on }` form, or the
95
- * entry a relation join factory returns (`a.books.as(b)`); joins to a subquery are always the expanded
96
- * form, since a subquery has no FK metadata.
97
- */
98
- type QueryJoin = InnerJoin<QuerySource, QueryCondition> | LeftJoin<QuerySource, QueryCondition>;
99
- type QueryJoins = readonly (QueryJoin | undefined)[];
100
- /**
101
- * A CTE declaration: a `query(...)` value with named columns, i.e. a POJO or set-operation select.
102
- *
103
- * Entity-mode and scalar `query(...)` shapes are excluded: a CTE must be a table shape, so it needs
104
- * columns.
105
- */
106
- type WithSource = Subquery<unknown, string>;
107
- /** One CTE or an array of them; an `undefined` entry prunes, like any other clause. */
108
- type WithInput = WithSource | readonly (WithSource | undefined)[];
109
- /** How a recursive CTE combines its two terms: `UNION ALL` keeps every row, `UNION` drops duplicates. */
110
- interface RecursiveOptions {
111
- /** Defaults to `"all"`. `"distinct"` emits UNION, which stops a cyclic graph from looping forever. */
112
- union?: "all" | "distinct";
113
- }
114
- /** An expression order-by entry. An undefined order prunes the complete entry. */
115
- type ExpressionOrderBy = {
116
- readonly sort: ExprLike<unknown>;
117
- readonly order: "ASC" | "DESC" | undefined;
118
- readonly nulls?: "first" | "last";
119
- };
120
- type OrderByDirection = "ASC" | "DESC" | "ASC NULLS FIRST" | "ASC NULLS LAST" | "DESC NULLS FIRST" | "DESC NULLS LAST";
121
- /**
122
- * A keyed `orderBy` entry, used alone or in an array, like `em.find`'s `orderBy: [{ firstName: "ASC" }]`.
123
- *
124
- * The keys are the keys of a POJO/subquery `select` (rendered as SQL output-column names, so ordering
125
- * by an aggregate does not repeat its expression), or the entity's sortable fields in entity mode.
126
- * An `undefined` direction prunes the entry, like any other condition. For expressions that are not
127
- * in `select`, mix in `{ sort, order }` entries in the array form.
128
- */
129
- type OrderByKeys<S> = S extends {
130
- readonly [tableMgmt]: {
131
- readonly __entity: infer T;
132
- };
133
- } ? T extends Entity ? { readonly [K in keyof Table<T> as Table<T>[K] extends ExprLike<any> ? K : never]?: OrderByDirection | undefined; } : never : S extends ExprLike<unknown> ? never : { readonly [K in keyof S & string]?: OrderByDirection | undefined; };
134
- /** All sortable keys across select variants, not just the keys shared by every variant. */
135
- type OrderByKey<S> = S extends unknown ? keyof OrderByKeys<S> : never;
136
- /** Prevents a selected keyed sort from being silently mixed into an expression entry. */
137
- type CheckedExpressionOrderBy<S> = ExpressionOrderBy & (string extends OrderByKey<S> ? unknown : [S] extends [{
138
- readonly [tableMgmt]: unknown;
139
- }] ? unknown : { readonly [K in Exclude<OrderByKey<S>, keyof ExpressionOrderBy>]?: never; });
140
- /** The three select shapes: a source, an existing scalar expression, or a POJO naming result columns. */
141
- type QuerySelect = QuerySource | ExprLike<unknown> | Record<string, SelectExpression>;
142
- /** A named projection value may be an existing expression or an inline expression literal. */
143
- type SelectExpression = ExprLike<unknown> | ExprInput;
144
- /** Checks expression literals only inside named projections. */
145
- type CheckSelect<S> = S extends QuerySource | ExprLike<unknown> ? unknown : { readonly [K in keyof S]: S[K] extends ExprInput ? CheckInput<S[K]> : unknown; };
146
- /**
147
- * Everything but the source, in SQL evaluation order: FROM/JOIN, WHERE, GROUP BY, HAVING, SELECT,
148
- * ORDER BY, LIMIT.
149
- *
150
- * `S` and `J` are generic so callers keep the literal shape of `select` and `join`; the defaults let
151
- * a standalone object use `satisfies Query` (or `satisfies Clauses` for a source-less fragment).
152
- */
153
- interface Clauses<S extends QuerySelect = QuerySelect, J extends QueryJoins = QueryJoins> {
154
- /**
155
- * CTEs to include in a `WITH` clause, declared as `query(...)` values; either a single value or an array.
156
- *
157
- * I.e. `{ with: bookStats, from: a, join: [{ left: bookStats, on: ... }], select: { n: bookStats.n } }`.
158
- *
159
- * An `undefined` entry is ignored, and a CTE that nothing else in the query references will be pruned,
160
- * the same pruning `join` gets (see "Pruning"); `pruneJoins: false` keeps every CTE.
161
- */
162
- with?: WithInput;
163
- join?: J;
164
- /** A boolean group, an exists/notExists query, or a bare condition such as `a.age.gte(18)`. */
165
- where?: QueryCondition;
166
- groupBy?: readonly ExprLike<any>[];
167
- having?: QueryCondition;
168
- select: S;
169
- orderBy?: readonly (CheckedExpressionOrderBy<S> | OrderByKeys<S> | undefined)[] | OrderByKeys<S>;
170
- limit?: number;
171
- offset?: number;
172
- distinct?: boolean;
173
- /** Defaults to true. `false` keeps every join, em.find's opt-out. */
174
- pruneJoins?: boolean;
175
- /**
176
- * Defaults to `"exclude"`, em.find's rule: a soft-deletable entity in `from` gains a
177
- * `deleted_at IS NULL` condition in WHERE, and a joined one gains it in its join's ON (so a LEFT
178
- * join nulls its columns out instead of dropping rows). `"include"` turns the injection off for
179
- * this query; subqueries read their own key.
180
- */
181
- softDeletes?: "include" | "exclude";
182
- }
183
- /** A whole query: `Clauses` plus its source. `query(q)` turns it into a value; `em.query(q)` runs it. */
184
- interface Query<S extends QuerySelect = QuerySelect, J extends QueryJoins = QueryJoins> extends Clauses<S, J>, Partial<Record<SetOperation | MutationKey | "ctes", never>> {
185
- from: QuerySource;
186
- }
187
- /**
188
- * The six PostgreSQL set operations. Each compound root has exactly one operation.
189
- *
190
- * I.e. `union` removes duplicate projected Author names; `unionAll` keeps every copy.
191
- */
192
- type SetOperation = "union" | "unionAll" | "intersect" | "intersectAll" | "except" | "exceptAll";
193
- /** Mutation clauses are forbidden even on nonliteral read inputs. */
194
- type MutationKey = "insert" | "update" | "delete" | "values" | "set" | "returning" | "allowAll";
195
- /**
196
- * For set operations like UNION, this is one read operand with named POJO columns: an ordinary query,
197
- * a reusable query value, or another compound.
198
- * Scalar queries, expressions, and entity hydration are excluded.
199
- *
200
- * I.e. `{ from: a, select: { id: a.id } }` and its `query(...)` value can contribute Author IDs to a
201
- * union. `{ from: a, select: a.id }` cannot: even one-column set operands must give that column a name.
202
- */
203
- type SetOperand = Query<Record<string, SelectExpression> | Subquery<unknown, string>> | Subquery<unknown, string> | SetQuery<readonly SetOperand[]>;
204
- /**
205
- * SQL-shaped compound input; use `satisfies SetQuery` to retain the operands' literal row types.
206
- *
207
- * I.e. for Author alias `a` and Book alias `b`:
208
- * ```ts
209
- * const names = {
210
- * union: [
211
- * { from: a, select: { name: a.first_name } },
212
- * { from: b, select: { name: b.title } },
213
- * ],
214
- * orderBy: { name: "ASC" },
215
- * } satisfies SetQuery;
216
- * ```
217
- *
218
- * The default operand tuple requires at least two reads. `query` and `em.query` also infer dynamically
219
- * sized arrays; `CheckSetQuery` validates their row types, and runtime validation checks their length.
220
- * This input shape checks direction values; `CheckSetQuery` checks the inferred output keys in orderBy.
221
- */
222
- type SetQuery<Operands extends readonly SetOperand[] = readonly [SetOperand, SetOperand, ...SetOperand[]]> = { [K in SetOperation]: { readonly [P in K]: Operands; } & { readonly [P in Exclude<SetOperation, K>]?: never; }; }[SetOperation] & {
223
- /** CTEs for the combined query, declared once and in scope for every operand; see `Clauses.with`. */
224
- readonly with?: WithInput;
225
- readonly orderBy?: Readonly<Record<string, OrderByDirection | undefined>> | readonly (Readonly<Record<string, OrderByDirection | undefined>> | undefined)[];
226
- readonly limit?: number;
227
- readonly offset?: number;
228
- readonly as?: string;
229
- } & { readonly [K in "from" | "select" | "join" | "where" | "groupBy" | "having" | "distinct" | "softDeletes" | "pruneJoins" | MutationKey | "ctes"]?: never; };
230
- /**
231
- * Extracts the operand collection from each possible compound root, ignoring pagination and ordering.
232
- *
233
- * I.e. for `Q = { union: readonly [typeof authorNames, typeof bookNames]; limit: 10 }`, the result is
234
- * `readonly [typeof authorNames, typeof bookNames]`. Distributing over Q also handles a runtime choice
235
- * between different operations; Extract discards optional, unused operation keys whose value is undefined.
236
- */
237
- type OperandsOf<Q> = Q extends unknown ? Extract<Q[keyof Q & SetOperation], readonly SetOperand[]> : never;
238
- /**
239
- * Gets the left operand, which supplies canonical output keys and the retained row type for EXCEPT/INTERSECT.
240
- *
241
- * I.e. `FirstOperand<{ except: readonly [typeof authorNames, typeof bookNames] }>` is `typeof authorNames`.
242
- * For a dynamic array, the exact first element is unknown, so this is the array's element type instead.
243
- */
244
- type FirstOperand<Q> = OperandsOf<Q>[0];
245
- /**
246
- * Resolves the named rows of an ordinary or compound read operand, including its LEFT join nullability.
247
- *
248
- * I.e. a query from Author `a` with a LEFT-joined Book `b` and `select: { title: b.title }` has row type
249
- * `{ title: string | null }`, even though Book.title is required. A reusable `query(...)` value already
250
- * stores that row type in its brand; a nested compound combines its own operands recursively.
251
- */
252
- type ReadQueryRow<Q> = SetOperand extends Q ? unknown : Q extends {
253
- readonly [subqueryBrand]: {
254
- readonly __row: infer R;
255
- };
256
- } ? R : Q extends {
257
- select: infer S;
258
- } ? QueryRow<S, "join" extends keyof Q ? Extract<Q[keyof Q & "join"], QueryJoins> : []> : [OperandsOf<Q>] extends [never] ? never : SetQueryRow<Q>;
259
- /**
260
- * UNION combines each column's values; INTERSECT and EXCEPT conservatively retain the left row.
261
- *
262
- * I.e. Author first names projected as `{ name: string }` unioned with LEFT-joined Book titles projected
263
- * as `{ name: string | null }` produce `{ name: string | null }`. EXCEPT with those Author names on the
264
- * left retains `{ name: string }`; it neither adds the right side's NULL nor promises narrower values.
265
- *
266
- * The outer conditional distributes over a TypeScript union of alternative queries. I.e. a runtime
267
- * choice between an Author-name UNION and a Book-order EXCEPT must retain `{ name: string } | { order: number }`.
268
- */
269
- type SetQueryRow<Q> = Q extends unknown ? { -readonly [K in keyof ReadQueryRow<FirstOperand<Q>>]: ColumnValue<Q extends {
270
- union: readonly SetOperand[];
271
- } | {
272
- unionAll: readonly SetOperand[];
273
- } ? ReadQueryRow<OperandsOf<Q>[number]> : ReadQueryRow<FirstOperand<Q>>, K>; } : never;
274
- /**
275
- * Collects column K's value from each row alternative in R, rather than requiring K on every alternative.
276
- *
277
- * I.e. `ColumnValue<{ name: string } | { name: string | null }, "name">` is `string | null`.
278
- * An alternative without K contributes never; `CompatibleRow` separately rejects mismatched operand keys.
279
- */
280
- type ColumnValue<R, K extends PropertyKey> = R extends unknown ? (K extends keyof R ? R[K] : never) : never;
281
- /**
282
- * Checks whether either non-null value type is assignable to the other, without requiring equal nullability.
283
- *
284
- * I.e. `CompatibleValue<number, number | null>` is true, while `CompatibleValue<AuthorId, BookId>` is false.
285
- * This is only a TypeScript check: Author.age and Author.age.sum() both pass as numbers, but runtime
286
- * output-type checks must still reject their different int4/int8 representations.
287
- */
288
- type CompatibleValue<L, R> = [NonNullable<L>] extends [NonNullable<R>] ? true : [NonNullable<R>] extends [NonNullable<L>] ? true : false;
289
- /**
290
- * Requires exactly the same output keys and compatible TypeScript values for every column.
291
- *
292
- * I.e. `L = { name: string; age: number }` and `R = { age: number | null; name: string }` are compatible despite
293
- * key order and nullability. `{ name: string }` and `{ title: string }` are not. SQL representations and
294
- * codec domains still need runtime validation; this boolean does not establish decoder compatibility.
295
- */
296
- type CompatibleRow<L, R> = [keyof L] extends [keyof R] ? [keyof R] extends [keyof L] ? false extends { [K in keyof L]: CompatibleValue<L[K], ColumnValue<R, K>>; }[keyof L] ? false : true : false : false;
297
- /**
298
- * Produces a constraint for Q: unknown leaves a valid operand unchanged, while a message rejects it.
299
- *
300
- * I.e. First can select Author.firstName as `name` and Q can select Book.title as `name`. Both pass.
301
- * Changing Q's key to `title` produces the key/value diagnostic. A nested compound must also pass its own
302
- * arity and ordering checks, not merely expose a compatible result row.
303
- */
304
- type CheckOperand<First, Q> = CompatibleRow<ReadQueryRow<First>, ReadQueryRow<Q>> extends true ? Q extends SetQuery<readonly SetOperand[]> ? CheckSetQuery<Q> : CheckReadQuery<Q> : "set operands must have the same keys and compatible column values";
305
- /**
306
- * Checks every operand against O[0] while preserving the collection's tuple shape and readonly modifier.
307
- *
308
- * I.e. compatible operands `O = readonly [typeof authorNames, typeof bookNames]` produce
309
- * `readonly [unknown, unknown]` constraints. Mapping O directly preserves length instead of validating
310
- * array methods and the length property as though they were additional query operands.
311
- */
312
- type CheckOperands<O extends readonly SetOperand[]> = { readonly [I in keyof O]: CheckOperand<O[0], O[I]>; };
313
- /**
314
- * Restricts each ordering hash to Keys, including hashes supplied through variables or readonly arrays.
315
- *
316
- * I.e. with `Keys = "name"`, `{ name: "ASC" }` and `[undefined, { name: "DESC" }]` pass, but a `title`
317
- * key receives a diagnostic. SetQuery already restricts direction values; this check does not replace them.
318
- */
319
- type CheckSetOrder<O, Keys> = O extends readonly unknown[] ? { readonly [I in keyof O]: CheckSetOrder<O[I], Keys>; } : { readonly [K in keyof O]: K extends Keys ? unknown : "orderBy must name a set output column"; };
320
- /**
321
- * Validate known tuples and output ordering without widening the inferred operand projections.
322
- * Preserve optional keys when TypeScript infers a runtime choice between different operations.
323
- *
324
- * I.e. `{ union: [authorNames] as const }` fails minimum arity; a `typeof authorNames[]` can pass the
325
- * static checks but still needs a runtime length check. If authorNames and bookNames both expose only
326
- * `name`, combining them with `orderBy: { title: "ASC" }` fails the output-key check.
327
- *
328
- * The result is intersected with the inferred input Q. Unknown constraints leave its literal types
329
- * intact; error messages make the offending operands or ordering keys incompatible with that input.
330
- */
331
- type CheckSetQuery<Q extends SetQuery<readonly SetOperand[]>> = Q extends unknown ? SetOperand extends FirstOperand<Q> ? "set operands were typed too generically; use `satisfies SetQuery` instead" : { readonly [K in keyof Q]: K extends SetOperation ? Q[K] extends readonly SetOperand[] ? number extends Q[K]["length"] ? CheckOperands<Q[K]> : Q[K] extends readonly [SetOperand, SetOperand, ...SetOperand[]] ? CheckOperands<Q[K]> : "set operations require at least two operands" : never : unknown; } & CheckReadQuery<Q> & {
332
- readonly orderBy?: CheckSetOrder<Q["orderBy"], keyof ReadQueryRow<FirstOperand<Q>>>;
333
- } : never;
334
- /**
335
- * Rejects unknown clauses on concrete read inputs, recursively through compound operands.
336
- * Intersect this with an inferred Q; a widened annotation cannot reveal keys already erased from its type.
337
- * I.e. an INSERT source with `select: { title: b.title }` and `ctes: [...]` must not silently discard the CTEs.
338
- */
339
- type CheckReadQuery<Q> = SetOperand extends Q ? unknown : Q extends readonly unknown[] ? { readonly [I in keyof Q]: CheckReadQuery<Q[I]>; } : Q extends {
340
- readonly [subqueryBrand]: SubqueryBrand<infer R, string>;
341
- } ? { readonly [K in keyof Q]: K extends keyof R | typeof subqueryBrand ? unknown : never; } : Q extends {
342
- readonly [entityQueryBrand]: unknown;
343
- } ? { readonly [K in keyof Q]: K extends typeof entityQueryBrand ? unknown : never; } : Q extends {
344
- readonly from: unknown;
345
- readonly select: unknown;
346
- } ? { readonly [K in keyof Q]: K extends "select" ? CheckSelect<Q[K]> : K extends keyof Clauses | "from" | "as" ? unknown : never; } : { readonly [K in keyof Q]: K extends SetOperation ? Q[K] extends readonly unknown[] ? CheckReadQuery<Q[K]> : unknown : K extends "with" | "orderBy" | "limit" | "offset" | "as" ? unknown : never; };
347
- /** The type-level name of a table or subquery, i.e. `"Author"` or `"book_stats"`. */
348
- type NameOf<A> = A extends {
349
- readonly [tableMgmt]: {
350
- readonly __name: infer N;
351
- };
352
- } ? N : A extends {
353
- readonly [subqueryBrand]: {
354
- readonly __name: infer N;
355
- };
356
- } ? N : never;
357
- /** The names of every alias that was LEFT JOINed; `X` is a naked type parameter so this distributes. */
358
- type LeftJoined<X> = X extends LeftJoin<infer A> ? NameOf<A> : never;
359
- /** Adds default reference targets whose source is already nullable; explicit INNER joins do not inherit. */
360
- type InheritedLeft<X, Left> = X extends {
361
- readonly [referenceJoinSource]: infer Src;
362
- readonly inner: infer A;
363
- } ? [Extract<Src, Left>] extends [never] ? never : NameOf<A> : never;
364
- /**
365
- * Finds all aliases that can be NULL through LEFT joins and subsequent reference joins.
366
- * I.e. LEFT Book adds Author via Book.author.as(a), then further required references inherit Author's NULL.
367
- * Alias-name collisions are conservative, as they are for explicit LEFT joins; runtime uses exact handles.
368
- */
369
- type NullableSources<X, Left = LeftJoined<X>> = [Exclude<InheritedLeft<X, Left>, Left>] extends [never] ? Left : NullableSources<X, Left | InheritedLeft<X, Left>>;
370
- /**
371
- * Asks: is this expression's source key among the LEFT-joined sources in this query's join list? If
372
- * yes, the value can be `null`, so `R` becomes `R | null`; if no, `R` is unchanged.
373
- *
374
- * I.e. `MaybeNull<number, "book_stats", [LeftJoin<typeof bookStats>]>` is `number | null`,
375
- * because `book_stats` is in `NullableSources<J[number]>`; with an inner join it stays `number`.
376
- * Default references from nullable sources are included transitively.
377
- *
378
- * Source-less expressions (`Src` is `never`, i.e. `b.id.count()`) are never nullified. Untracked ones
379
- * (`Src` is `string`, i.e. a `sql.ref` on an unknown table) might come from any left-joined table,
380
- * so they are conservatively nullified whenever the query has a left join at all.
381
- *
382
- * `string` must never be a *table's* name: `Extract<"Author", string>` matches, so one left-joined
383
- * table named `string` would nullify every column in the query. That is why anonymous subqueries
384
- * share the literal sentinel `"?"` instead.
385
- */
386
- type MaybeNull<R, Src extends string, J extends QueryJoins> = string extends Src ? [NullableSources<J[number]>] extends [never] ? R : R | null : [Extract<Src, NullableSources<J[number]>>] extends [never] ? R : R | null;
387
- /**
388
- * The result row for a query with select `S` and joins `J`.
389
- *
390
- * - entity mode (`select: a`) is the entity
391
- * - subquery mode (`select: bookStats`) is the subquery's row, i.e. `select *`
392
- * - single expression (`select: b.id.count()`) is that expression's value, used by scalar subqueries
393
- * - POJO mode is a mapped type over the select keys, with left-join nullability applied
394
- */
395
- type QueryRow<S, J extends QueryJoins = []> = S extends {
396
- readonly [tableMgmt]: {
397
- readonly __entity: infer T;
398
- };
399
- } ? T : S extends {
400
- readonly [subqueryBrand]: {
401
- readonly __row: infer R;
402
- };
403
- } ? R : S extends ExprLike<unknown> ? ExpressionValue<S, J> : { -readonly [K in keyof S]: S[K] extends SelectExpression ? ExpressionValue<S[K] extends ExprInput ? ExprFromInput<S[K]> : S[K], J> : never; };
404
- /**
405
- * A table-shaped query: one `Expr` per select key, each tagged with the table's name as its `Src`,
406
- * plus a brand carrying the row type. This is the direct analog of `Table<T>`: `Table<T>` maps physical
407
- * columns to expressions, `Subquery<Row, Name>` maps the inner query's select keys to expressions.
408
- */
409
- type Subquery<R, Name extends string> = {
410
- readonly [subqueryBrand]: SubqueryBrand<R, Name>;
411
- } & { readonly [K in keyof R]: Expr<R[K], Name>; };
412
- /** An entity-mode query (`select: a`): runnable, but it has no columns to reference. */
413
- type EntityQuery<T extends Entity> = {
414
- readonly [entityQueryBrand]: {
415
- readonly __row: T;
416
- };
417
- } & Partial<Record<MutationKey | "with" | "ctes", never>>;
418
- /** A scalar/list query that remains distinguishable from ordinary expressions for EXISTS. */
419
- type ScalarQuery<R> = Expr<R | null, never> & {
420
- readonly [scalarQueryBrand]: true;
421
- };
422
- /**
423
- * Rejects a `select` that a `: Query` annotation widened to the whole `QuerySelect` union.
424
- *
425
- * `satisfies Query` checks the shape but keeps the literal type of `select`, so `S` infers as
426
- * `{ name: Expr<string, "Author"> }`. A `: Query` annotation replaces that type with the annotation, so
427
- * `S` infers as `QuerySelect` itself, and without this guard `query(q)` returned a useless union with no
428
- * error at all.
429
- *
430
- * A widened `S` is the only kind of `S` the whole `QuerySelect` union is assignable to (a POJO, an
431
- * `Expr`, or a `Table` never is), so `QuerySelect extends S` detects it, and intersecting the parameter
432
- * with `{ select: "<message>" }` fails the call on `select` with that message, for `query()` and
433
- * `em.query()` alike:
434
- *
435
- * const narrow = { from: a, select: { name: a.first_name } } satisfies Query;
436
- * query(narrow); // Subquery<{ name: string }, "?">
437
- *
438
- * const widened: Query = { from: a, select: { name: a.first_name } };
439
- * query(widened);
440
- * // error: Type 'QuerySelect' is not assignable to type
441
- * // '"select was typed too generically; use `satisfies Query` instead of `: Query`"'
442
- *
443
- * `S` also defaults to `never`, so a *missing* `select` is reported as "Property 'select' is missing"
444
- * against `Query<never, []>` instead of tripping this guard.
445
- */
446
- type NotWidened<S> = QuerySelect extends S ? {
447
- select: "select was typed too generically; use `satisfies Query` instead of `: Query`";
448
- } : unknown;
449
- /** What `query()` returns, by select shape: an entity list, a scalar/list subquery, or a derived table. */
450
- type QueryValue<S, J extends QueryJoins, Name extends string> = S extends {
451
- readonly [tableMgmt]: {
452
- readonly __entity: infer T extends Entity;
453
- };
454
- } ? EntityQuery<T> : S extends ExprLike<unknown> ? ScalarQuery<QueryRow<S, J>> : Subquery<QueryRow<S, J>, Name>;
455
- /** The names of every alias in scope for a query: the source alias plus every joined alias. */
456
- type JoinedName<X> = X extends {
457
- readonly inner: infer A;
458
- } ? NameOf<A> : X extends {
459
- readonly left: infer A;
460
- } ? NameOf<A> : never;
461
- type InScope<F, J extends QueryJoins> = NameOf<F> | JoinedName<J[number]>;
462
- /**
463
- * Asks, for every column of a POJO select: is its source key among `from` + `join` at all? If no, the
464
- * query reads from a table it never joined, and that select key's type becomes an error message.
465
- *
466
- * Because `Expr` already carries `Src`, this is nearly free: for each select key, if `Src` is tracked
467
- * and any of its names is outside `InScope`, intersect that key's type with an error string, so the
468
- * caller sees `Type 'Expr<number, "book_stats">' is not assignable to type '... is not in from/join'`.
469
- * Untracked (`string`) and source-less (`never`) expressions always pass. Tables with the same
470
- * type-level name (two bare `table(Author)`, or two anonymous tables) cannot be told apart, so a miss
471
- * there goes unreported; the check never gives a false positive, only false negatives on collisions.
472
- *
473
- * `[S] extends [...]` keeps this non-distributive, and `never` is skipped outright: `query()` defaults
474
- * `S` to `never` when `select` is missing, and a distributive conditional over `never` would swallow the
475
- * whole parameter type.
476
- */
477
- type CheckScope<S, F, J extends QueryJoins> = [S] extends [never] ? unknown : [S] extends [QuerySource] ? NameOf<S> extends NameOf<F> ? unknown : {
478
- select: `'${NameOf<S> & string}' is a joined source, not the from; select its columns individually`;
479
- } : [S] extends [Record<string, SelectExpression>] ? {
480
- select: { [K in keyof S]: CheckExpressionScope<S[K], InScope<F, J>>; };
481
- } : unknown;
482
- /** Includes columns nested in inline CASE values and fallbacks in the existing scope check. */
483
- type CheckExpressionScope<V, Scope> = string extends ExpressionSources<V> ? unknown : [Exclude<ExpressionSources<V>, Scope>] extends [never] ? unknown : `table '${Exclude<ExpressionSources<V>, Scope> & string}' is not in from/join`;
484
- /** The one argument type `query()` and `em.query()` share: a `Query` POJO plus its source, name, and checks. */
485
- type QueryArg<F extends QuerySource, S extends QuerySelect, J extends QueryJoins, Name extends string> = Query<S, J> & {
486
- from: F;
487
- as?: Name;
488
- } & CheckScope<S, F, J> & NotWidened<S> & {
489
- select: CheckSelect<NoInfer<S>>;
490
- };
491
- /**
492
- * Turns a `Query` POJO into a value. The select shape decides which (`QueryValue`):
493
- *
494
- * - a single expression is a scalar subquery or an IN list (`Expr<R | null>`; a scalar subquery can
495
- * return no row, so use `.coalesce(0)` when the SQL guarantees a value, i.e. an ungrouped `count`)
496
- * - an entity table is an entity list, runnable via `em.query`
497
- * - a POJO is a derived table whose columns are `Expr`s; it can be a source, be joined, or be run
498
- *
499
- * `as` is the SQL alias and the type-level identity, the same role the second argument of
500
- * `table(Author, "m")` plays. Without it the SQL alias is generated, like `table(Author)`, and all
501
- * anonymous tables share the type-level identity `"?"`: precise against every named alias, and
502
- * conservative (a left-joined anonymous table nullifies every anonymous table's columns) only among
503
- * themselves. This is the same collision two bare `table(Author)` have.
504
- *
505
- * Ordinary SELECT shapes share one signature: separate scalar/entity/POJO overloads hid `as` from
506
- * completions and cost 15-28% check time. The separate compound root has one additional signature;
507
- * `NotWidened` still rejects a SELECT widened by a `: Query` annotation.
508
- */
509
- declare function query<const Q extends SetQuery<readonly SetOperand[]>, Name extends string = "?">(q: Q & CheckSetQuery<Q> & {
510
- as?: Name;
511
- }): Subquery<SetQueryRow<Q>, Name>;
512
- declare function query<F extends QuerySource, const S extends QuerySelect = never, J extends QueryJoins = [], Name extends string = "?">(q: QueryArg<F, S, J, Name>): QueryValue<S, J, Name>;
513
- /**
514
- * Builds a query value only when its user-supplied `where` survives pruning.
515
- *
516
- * Missing or empty conditions prune the value, including nested groups and `pruneIfUndefined`.
517
- * Joins, HAVING, and implicit soft-delete/STI conditions do not keep the value alive.
518
- *
519
- * I.e. `queryMaybe({ from: b, where: b.authorId.eq(enabled ? a.id : undefined), select: b.id })`
520
- * returns `undefined` when `enabled` is false, so an enclosing `notExists` also prunes.
521
- */
522
- declare function queryMaybe<F extends QuerySource, const S extends QuerySelect = never, J extends QueryJoins = [], Name extends string = "?">(q: QueryArg<F, S, J, Name>): QueryValue<S, J, Name> | undefined;
523
- /**
524
- * Declares a `WITH RECURSIVE` CTE from its two terms, and returns the CTE as a readable value.
525
- *
526
- * `base` is the non-recursive term, which seeds the rows and, as in PostgreSQL, supplies the CTE's
527
- * columns. `step` is the recursive term: it receives the CTE itself, so it can join back to the rows
528
- * found so far. The two terms are combined with UNION ALL, or UNION when `union: "distinct"` drops
529
- * duplicates, which is how a cyclic graph is kept from looping forever.
530
- *
531
- * ```ts
532
- * const [a] = tables(Author);
533
- * const tree = recursiveQuery(
534
- * "tree",
535
- * { from: a, where: a.mentor_id.isNull(), select: { id: a.id, mentorId: a.mentor_id } },
536
- * (self) => ({
537
- * from: a,
538
- * join: [{ inner: self, on: a.mentor_id.eq(self.id) }],
539
- * select: { id: a.id, mentorId: a.mentor_id },
540
- * }),
541
- * );
542
- * const rows = await em.query({ with: tree, from: tree, select: tree });
543
- * ```
544
- *
545
- * Unlike `query()`, the name is required, because the step term must name it.
546
- */
547
- declare function recursiveQuery<Name extends string, F extends QuerySource, const S extends QuerySelect, J extends QueryJoins>(name: Name, base: QueryArg<F, S, J, Name>, step: (self: Subquery<QueryRow<S, J>, Name>) => SetOperand, opts?: RecursiveOptions): Subquery<QueryRow<S, J>, Name>;
548
- /**
549
- * Builds a SQL expression from a tagged template.
550
- *
551
- * For an Author alias `a` assigned the SQL alias `a1`:
552
- *
553
- * ```ts
554
- * sql`${a.age} * 2` // Expression: a1.age * 2
555
- * sql`${a.age.gte(18)}` // Condition: (a1.age >= ?), bindings [18]
556
- * sql`${"Alice"}` // Value: ?, bindings ["Alice"]
557
- *
558
- * // Selecting this expression keeps the join to Book b.
559
- * sql.number`${b.order} * ${2}`
560
- *
561
- * // Reference an unmodeled column; it is untracked at the type level.
562
- * sql.ref<string>(a, "ts_search")
563
- * sql.condition`${sql.ref(a, "ts_search")} @@ plainto_tsquery(${term})`
564
- * ```
565
- */
566
- declare function sql<R = unknown>(strings: TemplateStringsArray, ...values: unknown[]): Expr<R, never>;
567
- declare namespace sql {
568
- var number: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<number, never>;
569
- var numberOrNull: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<number | null, never>;
570
- var numberArray: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<number[], never>;
571
- var numberArrayOrNull: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<number[] | null, never>;
572
- var string: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<string, never>;
573
- var stringOrNull: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<string | null, never>;
574
- var stringArray: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<string[], never>;
575
- var stringArrayOrNull: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<string[] | null, never>;
576
- var boolean: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<boolean, never>;
577
- var booleanOrNull: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<boolean | null, never>;
578
- var booleanArray: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<boolean[], never>;
579
- var booleanArrayOrNull: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<boolean[] | null, never>;
580
- var condition: (strings: TemplateStringsArray, ...values: unknown[]) => SqlCondition;
581
- var ref: <R = unknown>(source: QuerySource, column: string) => Expr<R, string>;
582
- }
583
- /**
584
- * Parses `arg` (a `Query` POJO or `query(...)` value) into a runnable `Plan`.
585
- *
586
- * `EntityManager.query` runs the plan; this module deliberately does not import `EntityManager` (see
587
- * `EntityHydrator`), so it parses and hands back `{ sql, bindings, decodeRows }` instead of executing.
588
- */
589
- declare function parseUserQuery(arg: unknown): Plan;
590
- /**
591
- * Parses a read that sits inside another statement, i.e. an INSERT's SELECT source, so it resolves that
592
- * statement's CTEs and shares its alias space instead of generating names that could collide with them.
593
- */
594
- declare function parseNestedQuery(arg: unknown, parent: Ctx, assigner: AliasAssigner): Plan;
595
- /** Recognizes read brands, including malformed hybrids that must reach read validation rather than mutation execution. */
596
- declare function isReadQueryValue(arg: unknown): boolean;
597
- /**
598
- * Compiles scalar or nonempty named expression projections, shared by SELECT and mutation RETURNING.
599
- * Source-shaped values need read hydration/source rules and are deliberately excluded here.
600
- */
601
- declare function projectionToSql(select: unknown, ctx: Ctx): {
602
- selects: SqlFragment[];
603
- decodeRows: Plan["decodeRows"];
604
- output: QueryOutput;
605
- };
606
- /**
607
- * The one `EntityManager` capability that row decoding needs, typed structurally.
608
- *
609
- * Importing `EntityManager.ts` here would complete an `EntityManager.ts` <-> `query.ts` declaration
610
- * cycle (`EntityManager.query` imports this module's types), which correlated with a tsc 7.0.2
611
- * incremental-build bug: after tsdown rewrites `build/`, `tsc --build` sporadically reports thousands
612
- * of phantom "Module 'joist-orm' has no exported member ..." errors and caches them in `.tsbuildinfo`.
613
- */
614
- interface EntityHydrator {
615
- hydrate(cstr: any, rows: readonly any[]): any[];
616
- }
617
- interface Plan {
618
- sql: string;
619
- bindings: any[];
620
- /** Aliases of enclosing queries this (sub)query referenced. */
621
- outerRefs: string[];
622
- /** Ordered SQL output columns and their existing expression codecs, before JS row decoding. */
623
- output: QueryOutput;
624
- decodeRows(em: EntityHydrator, rows: any[]): any[];
625
- }
626
- type AnyQuery = Query<any, any> & {
627
- as?: string;
628
- };
629
- type AnyReadQuery = AnyQuery | SetQuery<readonly SetOperand[]>;
630
- /** Only POJO outputs can be set operands; ordinary scalar reads also expose an ordered output column. */
631
- interface QueryOutput {
632
- kind: "entity" | "scalar" | "pojo";
633
- /** Expressions retain codecs and physical nullability after LEFT joins and set operations. */
634
- columns: readonly (readonly [string, BaseExpr])[];
635
- }
636
- /** The runtime identity of a `query(...)` value; `Ctx.aliasFor` keys on it, like a table's `TableMgmt`. */
637
- declare class SubqueryHandle {
638
- #private;
639
- readonly recursive: boolean;
640
- constructor(q: AnyReadQuery, recursive?: boolean);
641
- get q(): AnyReadQuery;
642
- /**
643
- * Gives a recursive CTE its finished body. `recursiveQuery` starts the handle on its base term, so
644
- * the step term can read the CTE's columns while the body that will hold that step is still being
645
- * built. The base term supplies the CTE's columns either way, PostgreSQL's rule for a recursive WITH.
646
- */
647
- setBody(q: AnyReadQuery): void;
648
- get name(): string | undefined;
649
- /** The select keys, for `select: <subquery>` and for reporting unknown columns. */
650
- columnKeys(): string[];
651
- /** The inner expression behind `key`, for its decoder/encoder. */
652
- columnExpr(key: string): BaseExpr;
653
- /** Resolve output metadata without parsing SQL or caching aliases from an enclosing query. */
654
- output(): QueryOutput;
655
- column(key: string): SubqueryColumnExpr;
656
- describe(): string;
657
- }
658
- /** A column of a joined/from'd subquery, i.e. `bookStats.bookCount`, which becomes `book_stats."bookCount"`. */
659
- declare class SubqueryColumnExpr extends BaseExpr {
660
- private handle;
661
- private key;
662
- private inner;
663
- constructor(handle: SubqueryHandle, key: string, inner: BaseExpr);
664
- toSql(ctx: ExprContext): SqlFragment;
665
- decode(value: unknown): unknown;
666
- encode(value: unknown): unknown;
667
- get outputType(): TypeInfo | undefined;
668
- get sqlNullable(): boolean | undefined;
669
- get sqlSource(): object;
670
- }
671
- /**
672
- * What an expression needs from the query it is generating SQL for.
673
- *
674
- * Each (sub)query gets its own `Ctx`; a lookup that misses locally walks up to the enclosing query and
675
- * records the hit in `outerRefs`, which is how a correlated subquery reports the outer aliases it
676
- * depends on (the way `ExistsCondition.outerAliases` does), so join pruning keeps them.
677
- */
678
- declare class Ctx implements ExprContext {
679
- readonly assigner: AliasAssigner;
680
- private parent;
681
- private aliases;
682
- /**
683
- * The subset of `aliases` that are CTE names. A `from`/`join` on one of these emits just the name,
684
- * i.e. `FROM book_stats`, where an ordinary `query(...)` value emits its whole body inline, i.e.
685
- * `FROM (SELECT ...) AS sq`.
686
- */
687
- private ctes;
688
- /**
689
- * `with` entries named but not yet turned into SQL. `registerCtes` names every entry first, then
690
- * generates the bodies one at a time, so while one body is being generated the entries after it sit
691
- * here. Reading one of those is a forward reference.
692
- */
693
- private pendingCtes;
694
- /** CTEs already read by this query's `from`/`join`, so a second read fails instead of colliding. */
695
- private usedCtes;
696
- /** The recursive CTE whose body this query is part of, if any; see `recursiveSelf`. */
697
- private ownRecursiveSelf;
698
- readonly outerRefs: Set<string>;
699
- constructor(assigner: AliasAssigner, parent: Ctx | undefined);
700
- /**
701
- * One handle can hold only one alias per query, so a value used twice must be told apart, not
702
- * silently collapsed into the second registration's alias.
703
- */
704
- register(handle: object, alias: string): void;
705
- /** Names every `with` entry up front, so a CTE reading a later sibling is reported, not inlined. */
706
- declareCte(handle: object, alias: string): void;
707
- /** Brings a pending CTE into scope, for the sources and columns that may now read it. */
708
- promoteCte(handle: object): void;
709
- /**
710
- * The CTE name for `handle`, looking in the enclosing queries too, because a CTE is in scope for the
711
- * whole statement.
712
- *
713
- * Unlike `aliasFor`, a hit in an enclosing query is not added to `outerRefs`: reading a CTE by name
714
- * is not a correlated reference, so it must not keep an enclosing join alive.
715
- */
716
- cteAliasFor(handle: object): string | undefined;
717
- /**
718
- * The recursive CTE this query's terms belong to, inherited from the enclosing query.
719
- *
720
- * PostgreSQL requires a recursive term to reference its own CTE, so that reference is not optional
721
- * and must survive pruning, unlike an ordinary explicit join that nothing else reads.
722
- */
723
- get recursiveSelf(): SubqueryHandle | undefined;
724
- setRecursiveSelf(handle: SubqueryHandle): void;
725
- /** Whether `handle` is a CTE with no SQL yet, i.e. itself or a later `with` entry. */
726
- isPendingCte(handle: object): boolean;
727
- /**
728
- * Fails if this query already reads `handle`. A `Ctx` maps each handle to a single alias, so two
729
- * reads of one CTE value would render as the same name, i.e. `FROM tree JOIN tree`, and neither the
730
- * SQL nor a column expression could say which one it meant. Each read needs its own `query(...)`.
731
- *
732
- * Only this query is checked, not the enclosing ones: a nested subquery has its own FROM, so reading
733
- * the same CTE in there is fine.
734
- */
735
- useCte(handle: object): void;
736
- aliasFor(handle: object): string;
737
- conditionToSql(cond: QueryCondition): SqlFragment | undefined;
738
- }
739
- /** A parsed `with` entry: the CTE's name and its body, ready to render into the WITH clause. */
740
- interface ParsedCte {
741
- alias: string;
742
- plan: Plan;
743
- /** A recursive CTE reads itself, and makes the whole clause `WITH RECURSIVE`. */
744
- recursive: boolean;
745
- }
746
- /**
747
- * Per-source soft-delete injections: `alias.deleted_at IS NULL` for a soft-deletable entity.
748
- * CTI subtypes are skipped because their deleted-at column belongs to the base table (see
749
- * `filterSoftDeletes`). STI sources read all physical rows without discriminator predicates.
750
- *
751
- * The conditions go into the from's WHERE or the join's ON, and never keep an otherwise unreferenced
752
- * join alive, which is what `pruneable: true` means on em.find's side.
753
- */
754
- declare function injectedConditions(source: {
755
- meta: EntityMetadata | undefined;
756
- alias: string;
757
- }, softDeletes: "include" | "exclude"): ColumnCondition[];
758
- /**
759
- * Parses a user-facing condition (a single condition or an `{ and }`/`{ or }` filter) with the same
760
- * `ConditionBuilder` `em.find` uses, so `undefined` members drop out, empty groups drop, and
761
- * `pruneIfUndefined` applies unchanged. Deferred SQL expression conditions are resolved
762
- * against the context first.
763
- */
764
- declare function conditionToSql(cond: QueryCondition | undefined, ctx: Ctx, topLevel: boolean): SqlFragment | undefined;
765
- /**
766
- * Names and parses each `with` entry, in declaration order.
767
- *
768
- * Each entry is in scope before the next is parsed, so a CTE can read an *earlier* sibling by name,
769
- * PostgreSQL's rule for a non-recursive WITH. A forward reference, or a CTE reading the query's own
770
- * `from`, fails as "not in this query's from/join", the same error any out-of-scope source gets.
771
- *
772
- * I.e. `with: [totals, ranked]` parses `totals` first, so `ranked` can join it, but not the reverse.
773
- */
774
- declare function registerCtes(q: {
775
- with?: WithInput;
776
- }, ctx: Ctx, assigner: AliasAssigner): ParsedCte[];
777
- /**
778
- * Drops the CTEs that nothing reads, given the aliases the rest of the statement referenced.
779
- *
780
- * A CTE can only read earlier siblings, so going last to first means every CTE that could read this one
781
- * was already visited, and its own reads are already in `referenced`. That makes one pass enough; first
782
- * to last would have to repeat until the set stopped growing. `unshift` restores WITH order.
783
- */
784
- declare function pruneCtes(ctes: ParsedCte[], referenced: Set<string>): ParsedCte[];
785
- /**
786
- * Renders `WITH a AS (...), b AS (...) `, whose bindings lead the statement, as their SQL does.
787
- *
788
- * One recursive CTE makes the whole clause `WITH RECURSIVE`, PostgreSQL's rule: the keyword is on the
789
- * clause, not on the entry that needs it, and it does not force the other entries to be recursive.
790
- */
791
- declare function withFragment(ctes: ParsedCte[]): SqlFragment;
792
- //#endregion
793
- export { CheckReadQuery, CheckScope, CheckSetQuery, Clauses, CompatibleValue, Ctx, EntityHydrator, EntityQuery, ExistsQuery, ExpressionOrderBy, MaybeNull, NameOf, NotWidened, OrderByDirection, OrderByKeys, ParsedCte, Plan, Query, QueryArg, QueryCondition, QueryJoin, QueryJoins, QueryOutput, QueryRow, QuerySelect, QuerySource, QueryValue, ReadQueryRow, RecursiveOptions, ScalarQuery, SelectExpression, SetOperand, SetOperation, SetQuery, SetQueryRow, Subquery, SubqueryBrand, SubqueryHandle, WithInput, WithSource, conditionToSql, entityQueryBrand, injectedConditions, isReadQueryValue, parseNestedQuery, parseUserQuery, projectionToSql, pruneCtes, query, queryMaybe, recursiveQuery, registerCtes, scalarQueryBrand, sql, subqueryBrand, withFragment };
794
- //# sourceMappingURL=query.d.cts.map