joist-core 2.4.0 → 2.5.0-next.2

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 (903) hide show
  1. package/build/BaseEntity.d.cts +3 -4
  2. package/build/BaseEntity.d.cts.map +1 -1
  3. package/build/BaseEntity.d.mts +3 -4
  4. package/build/BaseEntity.d.mts.map +1 -1
  5. package/build/Entity.d.cts +3 -4
  6. package/build/Entity.d.cts.map +1 -1
  7. package/build/Entity.d.mts +3 -4
  8. package/build/Entity.d.mts.map +1 -1
  9. package/build/EntityFields.d.cts +3 -4
  10. package/build/EntityFields.d.cts.map +1 -1
  11. package/build/EntityFields.d.mts +3 -4
  12. package/build/EntityFields.d.mts.map +1 -1
  13. package/build/EntityManager.cjs +102 -22
  14. package/build/EntityManager.cjs.map +1 -1
  15. package/build/EntityManager.d.cts +99 -54
  16. package/build/EntityManager.d.cts.map +1 -1
  17. package/build/EntityManager.d.mts +99 -54
  18. package/build/EntityManager.d.mts.map +1 -1
  19. package/build/EntityManager.js +102 -24
  20. package/build/EntityManager.js.map +1 -1
  21. package/build/EntityMetadata.cjs +0 -1
  22. package/build/EntityMetadata.cjs.map +1 -1
  23. package/build/EntityMetadata.d.cts +47 -36
  24. package/build/EntityMetadata.d.cts.map +1 -1
  25. package/build/EntityMetadata.d.mts +47 -36
  26. package/build/EntityMetadata.d.mts.map +1 -1
  27. package/build/EntityMetadata.js +0 -1
  28. package/build/EntityMetadata.js.map +1 -1
  29. package/build/EnumMetadata.d.cts +1 -2
  30. package/build/EnumMetadata.d.cts.map +1 -1
  31. package/build/EnumMetadata.d.mts +1 -2
  32. package/build/EnumMetadata.d.mts.map +1 -1
  33. package/build/IndexManager.cjs +25 -5
  34. package/build/IndexManager.cjs.map +1 -1
  35. package/build/IndexManager.d.cts +2 -3
  36. package/build/IndexManager.d.cts.map +1 -1
  37. package/build/IndexManager.d.mts +2 -3
  38. package/build/IndexManager.d.mts.map +1 -1
  39. package/build/IndexManager.js +25 -5
  40. package/build/IndexManager.js.map +1 -1
  41. package/build/InstanceData.cjs.map +1 -1
  42. package/build/InstanceData.d.cts +1 -2
  43. package/build/InstanceData.d.cts.map +1 -1
  44. package/build/InstanceData.d.mts +1 -2
  45. package/build/InstanceData.d.mts.map +1 -1
  46. package/build/InstanceData.js.map +1 -1
  47. package/build/PluginManager.cjs.map +1 -1
  48. package/build/PluginManager.d.cts +4 -4
  49. package/build/PluginManager.d.cts.map +1 -1
  50. package/build/PluginManager.d.mts +4 -4
  51. package/build/PluginManager.d.mts.map +1 -1
  52. package/build/PluginManager.js.map +1 -1
  53. package/build/RowData.d.cts +3 -4
  54. package/build/RowData.d.cts.map +1 -1
  55. package/build/RowData.d.mts +3 -4
  56. package/build/RowData.d.mts.map +1 -1
  57. package/build/batchloaders/BatchLoader.cjs.map +1 -1
  58. package/build/batchloaders/BatchLoader.d.cts +1 -2
  59. package/build/batchloaders/BatchLoader.d.cts.map +1 -1
  60. package/build/batchloaders/BatchLoader.d.mts +1 -2
  61. package/build/batchloaders/BatchLoader.d.mts.map +1 -1
  62. package/build/batchloaders/BatchLoader.js.map +1 -1
  63. package/build/batchloaders/enumCollectionBatchLoader.d.cts +2 -3
  64. package/build/batchloaders/enumCollectionBatchLoader.d.cts.map +1 -1
  65. package/build/batchloaders/enumCollectionBatchLoader.d.mts +2 -3
  66. package/build/batchloaders/enumCollectionBatchLoader.d.mts.map +1 -1
  67. package/build/batchloaders/loadBatchLoader.d.cts +2 -3
  68. package/build/batchloaders/loadBatchLoader.d.cts.map +1 -1
  69. package/build/batchloaders/loadBatchLoader.d.mts +2 -3
  70. package/build/batchloaders/loadBatchLoader.d.mts.map +1 -1
  71. package/build/batchloaders/manyToManyBatchLoader.d.cts +2 -3
  72. package/build/batchloaders/manyToManyBatchLoader.d.cts.map +1 -1
  73. package/build/batchloaders/manyToManyBatchLoader.d.mts +2 -3
  74. package/build/batchloaders/manyToManyBatchLoader.d.mts.map +1 -1
  75. package/build/batchloaders/oneToManyBatchLoader.cjs +1 -1
  76. package/build/batchloaders/oneToManyBatchLoader.d.cts +2 -3
  77. package/build/batchloaders/oneToManyBatchLoader.d.cts.map +1 -1
  78. package/build/batchloaders/oneToManyBatchLoader.d.mts +2 -3
  79. package/build/batchloaders/oneToManyBatchLoader.d.mts.map +1 -1
  80. package/build/batchloaders/oneToManyBatchLoader.js +1 -1
  81. package/build/batchloaders/oneToOneBatchLoader.cjs +1 -1
  82. package/build/batchloaders/oneToOneBatchLoader.d.cts +2 -3
  83. package/build/batchloaders/oneToOneBatchLoader.d.cts.map +1 -1
  84. package/build/batchloaders/oneToOneBatchLoader.d.mts +2 -3
  85. package/build/batchloaders/oneToOneBatchLoader.d.mts.map +1 -1
  86. package/build/batchloaders/oneToOneBatchLoader.js +1 -1
  87. package/build/batchloaders/populateBatchLoader.d.cts +2 -3
  88. package/build/batchloaders/populateBatchLoader.d.cts.map +1 -1
  89. package/build/batchloaders/populateBatchLoader.d.mts +2 -3
  90. package/build/batchloaders/populateBatchLoader.d.mts.map +1 -1
  91. package/build/batchloaders/recursiveChildrenBatchLoader.cjs +1 -1
  92. package/build/batchloaders/recursiveChildrenBatchLoader.d.cts +2 -3
  93. package/build/batchloaders/recursiveChildrenBatchLoader.d.cts.map +1 -1
  94. package/build/batchloaders/recursiveChildrenBatchLoader.d.mts +2 -3
  95. package/build/batchloaders/recursiveChildrenBatchLoader.d.mts.map +1 -1
  96. package/build/batchloaders/recursiveChildrenBatchLoader.js +1 -1
  97. package/build/batchloaders/recursiveM2mBatchLoader.d.cts +2 -3
  98. package/build/batchloaders/recursiveM2mBatchLoader.d.cts.map +1 -1
  99. package/build/batchloaders/recursiveM2mBatchLoader.d.mts +2 -3
  100. package/build/batchloaders/recursiveM2mBatchLoader.d.mts.map +1 -1
  101. package/build/batchloaders/recursiveParentsBatchLoader.cjs +1 -1
  102. package/build/batchloaders/recursiveParentsBatchLoader.d.cts +2 -3
  103. package/build/batchloaders/recursiveParentsBatchLoader.d.cts.map +1 -1
  104. package/build/batchloaders/recursiveParentsBatchLoader.d.mts +2 -3
  105. package/build/batchloaders/recursiveParentsBatchLoader.d.mts.map +1 -1
  106. package/build/batchloaders/recursiveParentsBatchLoader.js +1 -1
  107. package/build/changes.cjs +1 -1
  108. package/build/changes.cjs.map +1 -1
  109. package/build/changes.d.cts +9 -10
  110. package/build/changes.d.cts.map +1 -1
  111. package/build/changes.d.mts +9 -10
  112. package/build/changes.d.mts.map +1 -1
  113. package/build/changes.js +1 -1
  114. package/build/changes.js.map +1 -1
  115. package/build/config.cjs +165 -26
  116. package/build/config.cjs.map +1 -1
  117. package/build/config.d.cts +111 -19
  118. package/build/config.d.cts.map +1 -1
  119. package/build/config.d.mts +111 -19
  120. package/build/config.d.mts.map +1 -1
  121. package/build/config.js +165 -26
  122. package/build/config.js.map +1 -1
  123. package/build/configure.cjs +32 -2
  124. package/build/configure.cjs.map +1 -1
  125. package/build/configure.d.cts +8 -9
  126. package/build/configure.d.cts.map +1 -1
  127. package/build/configure.d.mts +8 -9
  128. package/build/configure.d.mts.map +1 -1
  129. package/build/configure.js +32 -2
  130. package/build/configure.js.map +1 -1
  131. package/build/dataloaders/fastWhereFilterHash.d.cts +1 -2
  132. package/build/dataloaders/fastWhereFilterHash.d.cts.map +1 -1
  133. package/build/dataloaders/fastWhereFilterHash.d.mts +1 -2
  134. package/build/dataloaders/fastWhereFilterHash.d.mts.map +1 -1
  135. package/build/dataloaders/findByUniqueDataLoader.d.cts +2 -3
  136. package/build/dataloaders/findByUniqueDataLoader.d.cts.map +1 -1
  137. package/build/dataloaders/findByUniqueDataLoader.d.mts +2 -3
  138. package/build/dataloaders/findByUniqueDataLoader.d.mts.map +1 -1
  139. package/build/dataloaders/findCountDataLoader.d.cts +4 -5
  140. package/build/dataloaders/findCountDataLoader.d.cts.map +1 -1
  141. package/build/dataloaders/findCountDataLoader.d.mts +4 -5
  142. package/build/dataloaders/findCountDataLoader.d.mts.map +1 -1
  143. package/build/dataloaders/findDataLoader.cjs +1 -1
  144. package/build/dataloaders/findDataLoader.d.cts +11 -12
  145. package/build/dataloaders/findDataLoader.d.cts.map +1 -1
  146. package/build/dataloaders/findDataLoader.d.mts +11 -12
  147. package/build/dataloaders/findDataLoader.d.mts.map +1 -1
  148. package/build/dataloaders/findDataLoader.js +1 -1
  149. package/build/dataloaders/findIdsDataLoader.d.cts +2 -3
  150. package/build/dataloaders/findIdsDataLoader.d.cts.map +1 -1
  151. package/build/dataloaders/findIdsDataLoader.d.mts +2 -3
  152. package/build/dataloaders/findIdsDataLoader.d.mts.map +1 -1
  153. package/build/dataloaders/findOrCreateDataLoader.cjs +6 -2
  154. package/build/dataloaders/findOrCreateDataLoader.cjs.map +1 -1
  155. package/build/dataloaders/findOrCreateDataLoader.d.cts +3 -3
  156. package/build/dataloaders/findOrCreateDataLoader.d.cts.map +1 -1
  157. package/build/dataloaders/findOrCreateDataLoader.d.mts +3 -3
  158. package/build/dataloaders/findOrCreateDataLoader.d.mts.map +1 -1
  159. package/build/dataloaders/findOrCreateDataLoader.js +7 -3
  160. package/build/dataloaders/findOrCreateDataLoader.js.map +1 -1
  161. package/build/dataloaders/findPaginatedDataLoader.cjs +10 -12
  162. package/build/dataloaders/findPaginatedDataLoader.cjs.map +1 -1
  163. package/build/dataloaders/findPaginatedDataLoader.d.cts +1 -2
  164. package/build/dataloaders/findPaginatedDataLoader.d.cts.map +1 -1
  165. package/build/dataloaders/findPaginatedDataLoader.d.mts +1 -2
  166. package/build/dataloaders/findPaginatedDataLoader.d.mts.map +1 -1
  167. package/build/dataloaders/findPaginatedDataLoader.js +10 -12
  168. package/build/dataloaders/findPaginatedDataLoader.js.map +1 -1
  169. package/build/dataloaders/lensDataLoader.d.cts +2 -3
  170. package/build/dataloaders/lensDataLoader.d.cts.map +1 -1
  171. package/build/dataloaders/lensDataLoader.d.mts +2 -3
  172. package/build/dataloaders/lensDataLoader.d.mts.map +1 -1
  173. package/build/dataloaders/manyToManyFindDataLoader.d.cts +2 -3
  174. package/build/dataloaders/manyToManyFindDataLoader.d.cts.map +1 -1
  175. package/build/dataloaders/manyToManyFindDataLoader.d.mts +2 -3
  176. package/build/dataloaders/manyToManyFindDataLoader.d.mts.map +1 -1
  177. package/build/dataloaders/oneToManyFindDataLoader.d.cts +2 -3
  178. package/build/dataloaders/oneToManyFindDataLoader.d.cts.map +1 -1
  179. package/build/dataloaders/oneToManyFindDataLoader.d.mts +2 -3
  180. package/build/dataloaders/oneToManyFindDataLoader.d.mts.map +1 -1
  181. package/build/defaults.cjs +1 -1
  182. package/build/defaults.cjs.map +1 -1
  183. package/build/defaults.d.cts +7 -7
  184. package/build/defaults.d.cts.map +1 -1
  185. package/build/defaults.d.mts +7 -7
  186. package/build/defaults.d.mts.map +1 -1
  187. package/build/defaults.js +1 -1
  188. package/build/defaults.js.map +1 -1
  189. package/build/drivers/Driver.d.cts +2 -3
  190. package/build/drivers/Driver.d.cts.map +1 -1
  191. package/build/drivers/Driver.d.mts +2 -3
  192. package/build/drivers/Driver.d.mts.map +1 -1
  193. package/build/drivers/EntityWriter.cjs +4 -3
  194. package/build/drivers/EntityWriter.cjs.map +1 -1
  195. package/build/drivers/EntityWriter.d.cts +19 -7
  196. package/build/drivers/EntityWriter.d.cts.map +1 -1
  197. package/build/drivers/EntityWriter.d.mts +19 -7
  198. package/build/drivers/EntityWriter.d.mts.map +1 -1
  199. package/build/drivers/EntityWriter.js +5 -4
  200. package/build/drivers/EntityWriter.js.map +1 -1
  201. package/build/drivers/IdAssigner.cjs.map +1 -1
  202. package/build/drivers/IdAssigner.d.cts +5 -5
  203. package/build/drivers/IdAssigner.d.cts.map +1 -1
  204. package/build/drivers/IdAssigner.d.mts +5 -5
  205. package/build/drivers/IdAssigner.d.mts.map +1 -1
  206. package/build/drivers/IdAssigner.js.map +1 -1
  207. package/build/drivers/driverApi.d.cts +2 -3
  208. package/build/drivers/driverApi.d.cts.map +1 -1
  209. package/build/drivers/driverApi.d.mts +2 -3
  210. package/build/drivers/driverApi.d.mts.map +1 -1
  211. package/build/fields.cjs +12 -9
  212. package/build/fields.cjs.map +1 -1
  213. package/build/fields.d.cts +10 -11
  214. package/build/fields.d.cts.map +1 -1
  215. package/build/fields.d.mts +10 -11
  216. package/build/fields.d.mts.map +1 -1
  217. package/build/fields.js +12 -9
  218. package/build/fields.js.map +1 -1
  219. package/build/flush/FlushLock.cjs.map +1 -1
  220. package/build/flush/FlushLock.d.cts +1 -2
  221. package/build/flush/FlushLock.d.cts.map +1 -1
  222. package/build/flush/FlushLock.d.mts +1 -2
  223. package/build/flush/FlushLock.d.mts.map +1 -1
  224. package/build/flush/FlushLock.js.map +1 -1
  225. package/build/flush/JoinRows.cjs.map +1 -1
  226. package/build/flush/JoinRows.d.cts +5 -6
  227. package/build/flush/JoinRows.d.cts.map +1 -1
  228. package/build/flush/JoinRows.d.mts +5 -6
  229. package/build/flush/JoinRows.d.mts.map +1 -1
  230. package/build/flush/JoinRows.js.map +1 -1
  231. package/build/flush/PendingChanges.d.cts +5 -6
  232. package/build/flush/PendingChanges.d.cts.map +1 -1
  233. package/build/flush/PendingChanges.d.mts +5 -6
  234. package/build/flush/PendingChanges.d.mts.map +1 -1
  235. package/build/flush/ReadDrift.cjs +90 -0
  236. package/build/flush/ReadDrift.cjs.map +1 -0
  237. package/build/flush/ReadDrift.d.cts +25 -0
  238. package/build/flush/ReadDrift.d.cts.map +1 -0
  239. package/build/flush/ReadDrift.d.mts +25 -0
  240. package/build/flush/ReadDrift.d.mts.map +1 -0
  241. package/build/flush/ReadDrift.js +87 -0
  242. package/build/flush/ReadDrift.js.map +1 -0
  243. package/build/flush/Todo.d.cts +5 -6
  244. package/build/flush/Todo.d.cts.map +1 -1
  245. package/build/flush/Todo.d.mts +5 -6
  246. package/build/flush/Todo.d.mts.map +1 -1
  247. package/build/getProperties.cjs +1 -1
  248. package/build/getProperties.d.cts +3 -4
  249. package/build/getProperties.d.cts.map +1 -1
  250. package/build/getProperties.d.mts +3 -4
  251. package/build/getProperties.d.mts.map +1 -1
  252. package/build/getProperties.js +1 -1
  253. package/build/index.cjs +20 -7
  254. package/build/index.cjs.map +1 -1
  255. package/build/index.d.cts +23 -19
  256. package/build/index.d.cts.map +1 -1
  257. package/build/index.d.mts +23 -19
  258. package/build/index.d.mts.map +1 -1
  259. package/build/index.js +17 -10
  260. package/build/index.js.map +1 -1
  261. package/build/json.d.cts +11 -11
  262. package/build/json.d.cts.map +1 -1
  263. package/build/json.d.mts +11 -11
  264. package/build/json.d.mts.map +1 -1
  265. package/build/keys.d.cts +27 -27
  266. package/build/keys.d.cts.map +1 -1
  267. package/build/keys.d.mts +27 -27
  268. package/build/keys.d.mts.map +1 -1
  269. package/build/loading/HintTree.d.cts +3 -4
  270. package/build/loading/HintTree.d.cts.map +1 -1
  271. package/build/loading/HintTree.d.mts +3 -4
  272. package/build/loading/HintTree.d.mts.map +1 -1
  273. package/build/loading/IsLoadedCache.cjs +2 -2
  274. package/build/loading/IsLoadedCache.cjs.map +1 -1
  275. package/build/loading/IsLoadedCache.d.cts +3 -4
  276. package/build/loading/IsLoadedCache.d.cts.map +1 -1
  277. package/build/loading/IsLoadedCache.d.mts +3 -4
  278. package/build/loading/IsLoadedCache.d.mts.map +1 -1
  279. package/build/loading/IsLoadedCache.js +2 -2
  280. package/build/loading/IsLoadedCache.js.map +1 -1
  281. package/build/loading/loadHints.d.cts +17 -17
  282. package/build/loading/loadHints.d.cts.map +1 -1
  283. package/build/loading/loadHints.d.mts +17 -17
  284. package/build/loading/loadHints.d.mts.map +1 -1
  285. package/build/loading/loadLens.d.cts +13 -13
  286. package/build/loading/loadLens.d.cts.map +1 -1
  287. package/build/loading/loadLens.d.mts +13 -13
  288. package/build/loading/loadLens.d.mts.map +1 -1
  289. package/build/loading/withLoaded.d.cts +5 -6
  290. package/build/loading/withLoaded.d.cts.map +1 -1
  291. package/build/loading/withLoaded.d.mts +5 -6
  292. package/build/loading/withLoaded.d.mts.map +1 -1
  293. package/build/logging/FactoryLogger.cjs +1 -1
  294. package/build/logging/FactoryLogger.cjs.map +1 -1
  295. package/build/logging/FactoryLogger.d.cts +3 -4
  296. package/build/logging/FactoryLogger.d.cts.map +1 -1
  297. package/build/logging/FactoryLogger.d.mts +3 -4
  298. package/build/logging/FactoryLogger.d.mts.map +1 -1
  299. package/build/logging/FactoryLogger.js +2 -2
  300. package/build/logging/FactoryLogger.js.map +1 -1
  301. package/build/logging/FieldLogger.cjs.map +1 -1
  302. package/build/logging/FieldLogger.d.cts +4 -5
  303. package/build/logging/FieldLogger.d.cts.map +1 -1
  304. package/build/logging/FieldLogger.d.mts +4 -5
  305. package/build/logging/FieldLogger.d.mts.map +1 -1
  306. package/build/logging/FieldLogger.js.map +1 -1
  307. package/build/logging/ReactionLogger.d.cts +7 -7
  308. package/build/logging/ReactionLogger.d.cts.map +1 -1
  309. package/build/logging/ReactionLogger.d.mts +7 -7
  310. package/build/logging/ReactionLogger.d.mts.map +1 -1
  311. package/build/metrics/EntityMetrics.cjs +81 -0
  312. package/build/metrics/EntityMetrics.cjs.map +1 -0
  313. package/build/metrics/EntityMetrics.d.cts +55 -0
  314. package/build/metrics/EntityMetrics.d.cts.map +1 -0
  315. package/build/metrics/EntityMetrics.d.mts +55 -0
  316. package/build/metrics/EntityMetrics.d.mts.map +1 -0
  317. package/build/metrics/EntityMetrics.js +79 -0
  318. package/build/metrics/EntityMetrics.js.map +1 -0
  319. package/build/newEntity.cjs +1 -1
  320. package/build/newEntity.cjs.map +1 -1
  321. package/build/newEntity.d.cts +4 -5
  322. package/build/newEntity.d.cts.map +1 -1
  323. package/build/newEntity.d.mts +4 -5
  324. package/build/newEntity.d.mts.map +1 -1
  325. package/build/newEntity.js +1 -1
  326. package/build/newEntity.js.map +1 -1
  327. package/build/newTestInstance.cjs +1 -0
  328. package/build/newTestInstance.cjs.map +1 -1
  329. package/build/newTestInstance.d.cts +21 -21
  330. package/build/newTestInstance.d.cts.map +1 -1
  331. package/build/newTestInstance.d.mts +21 -21
  332. package/build/newTestInstance.d.mts.map +1 -1
  333. package/build/newTestInstance.js +1 -0
  334. package/build/newTestInstance.js.map +1 -1
  335. package/build/normalizeHints.d.cts +7 -8
  336. package/build/normalizeHints.d.cts.map +1 -1
  337. package/build/normalizeHints.d.mts +7 -8
  338. package/build/normalizeHints.d.mts.map +1 -1
  339. package/build/nowUTC.d.cts +4 -5
  340. package/build/nowUTC.d.cts.map +1 -1
  341. package/build/nowUTC.d.mts +4 -5
  342. package/build/nowUTC.d.mts.map +1 -1
  343. package/build/plugins/ImmutableEntitiesPlugin.d.cts +1 -2
  344. package/build/plugins/ImmutableEntitiesPlugin.d.cts.map +1 -1
  345. package/build/plugins/ImmutableEntitiesPlugin.d.mts +1 -2
  346. package/build/plugins/ImmutableEntitiesPlugin.d.mts.map +1 -1
  347. package/build/plugins/PreloadPlugin.d.cts +3 -4
  348. package/build/plugins/PreloadPlugin.d.cts.map +1 -1
  349. package/build/plugins/PreloadPlugin.d.mts +3 -4
  350. package/build/plugins/PreloadPlugin.d.mts.map +1 -1
  351. package/build/preloading/JsonAggregatePreloader.d.cts +1 -2
  352. package/build/preloading/JsonAggregatePreloader.d.cts.map +1 -1
  353. package/build/preloading/JsonAggregatePreloader.d.mts +1 -2
  354. package/build/preloading/JsonAggregatePreloader.d.mts.map +1 -1
  355. package/build/preloading/canPreload.d.cts +1 -2
  356. package/build/preloading/canPreload.d.cts.map +1 -1
  357. package/build/preloading/canPreload.d.mts +1 -2
  358. package/build/preloading/canPreload.d.mts.map +1 -1
  359. package/build/preloading/partitionHint.cjs +1 -1
  360. package/build/preloading/partitionHint.d.cts +1 -2
  361. package/build/preloading/partitionHint.d.cts.map +1 -1
  362. package/build/preloading/partitionHint.d.mts +1 -2
  363. package/build/preloading/partitionHint.d.mts.map +1 -1
  364. package/build/preloading/partitionHint.js +1 -1
  365. package/build/queries/ConditionBuilder.d.cts +2 -2
  366. package/build/queries/ConditionBuilder.d.cts.map +1 -1
  367. package/build/queries/ConditionBuilder.d.mts +2 -2
  368. package/build/queries/ConditionBuilder.d.mts.map +1 -1
  369. package/build/queries/conditions.d.cts +11 -12
  370. package/build/queries/conditions.d.cts.map +1 -1
  371. package/build/queries/conditions.d.mts +11 -12
  372. package/build/queries/conditions.d.mts.map +1 -1
  373. package/build/queries/entityQueryUtils.d.cts +4 -5
  374. package/build/queries/entityQueryUtils.d.cts.map +1 -1
  375. package/build/queries/entityQueryUtils.d.mts +4 -5
  376. package/build/queries/entityQueryUtils.d.mts.map +1 -1
  377. package/build/queries/find/Aliases.d.cts +16 -16
  378. package/build/queries/find/Aliases.d.cts.map +1 -1
  379. package/build/queries/find/Aliases.d.mts +16 -16
  380. package/build/queries/find/Aliases.d.mts.map +1 -1
  381. package/build/queries/find/DeferredAlias.d.cts +5 -6
  382. package/build/queries/find/DeferredAlias.d.cts.map +1 -1
  383. package/build/queries/find/DeferredAlias.d.mts +5 -6
  384. package/build/queries/find/DeferredAlias.d.mts.map +1 -1
  385. package/build/queries/find/EntityFilter.d.cts +12 -13
  386. package/build/queries/find/EntityFilter.d.cts.map +1 -1
  387. package/build/queries/find/EntityFilter.d.mts +12 -13
  388. package/build/queries/find/EntityFilter.d.mts.map +1 -1
  389. package/build/queries/find/EntityGraphQLFilter.d.cts +8 -9
  390. package/build/queries/find/EntityGraphQLFilter.d.cts.map +1 -1
  391. package/build/queries/find/EntityGraphQLFilter.d.mts +8 -9
  392. package/build/queries/find/EntityGraphQLFilter.d.mts.map +1 -1
  393. package/build/queries/find/QueryParser.cjs +18 -7
  394. package/build/queries/find/QueryParser.cjs.map +1 -1
  395. package/build/queries/find/QueryParser.collectionJoins.cjs +2 -1
  396. package/build/queries/find/QueryParser.collectionJoins.cjs.map +1 -1
  397. package/build/queries/find/QueryParser.collectionJoins.d.cts +1 -2
  398. package/build/queries/find/QueryParser.collectionJoins.d.cts.map +1 -1
  399. package/build/queries/find/QueryParser.collectionJoins.d.mts +1 -2
  400. package/build/queries/find/QueryParser.collectionJoins.d.mts.map +1 -1
  401. package/build/queries/find/QueryParser.collectionJoins.js +2 -1
  402. package/build/queries/find/QueryParser.collectionJoins.js.map +1 -1
  403. package/build/queries/find/QueryParser.d.cts +39 -18
  404. package/build/queries/find/QueryParser.d.cts.map +1 -1
  405. package/build/queries/find/QueryParser.d.mts +39 -18
  406. package/build/queries/find/QueryParser.d.mts.map +1 -1
  407. package/build/queries/find/QueryParser.js +18 -7
  408. package/build/queries/find/QueryParser.js.map +1 -1
  409. package/build/queries/find/QueryParser.pruning.cjs +50 -1
  410. package/build/queries/find/QueryParser.pruning.cjs.map +1 -1
  411. package/build/queries/find/QueryParser.pruning.d.cts +15 -3
  412. package/build/queries/find/QueryParser.pruning.d.cts.map +1 -1
  413. package/build/queries/find/QueryParser.pruning.d.mts +15 -3
  414. package/build/queries/find/QueryParser.pruning.d.mts.map +1 -1
  415. package/build/queries/find/QueryParser.pruning.js +50 -1
  416. package/build/queries/find/QueryParser.pruning.js.map +1 -1
  417. package/build/queries/find/QueryVisitor.d.cts +4 -4
  418. package/build/queries/find/QueryVisitor.d.cts.map +1 -1
  419. package/build/queries/find/QueryVisitor.d.mts +4 -4
  420. package/build/queries/find/QueryVisitor.d.mts.map +1 -1
  421. package/build/queries/find/buildFindQuery.d.cts +3 -3
  422. package/build/queries/find/buildFindQuery.d.cts.map +1 -1
  423. package/build/queries/find/buildFindQuery.d.mts +3 -3
  424. package/build/queries/find/buildFindQuery.d.mts.map +1 -1
  425. package/build/queries/find/scopes.cjs.map +1 -1
  426. package/build/queries/find/scopes.d.cts +12 -13
  427. package/build/queries/find/scopes.d.cts.map +1 -1
  428. package/build/queries/find/scopes.d.mts +12 -13
  429. package/build/queries/find/scopes.d.mts.map +1 -1
  430. package/build/queries/find/scopes.js.map +1 -1
  431. package/build/queries/parsedConditions.d.cts +7 -8
  432. package/build/queries/parsedConditions.d.cts.map +1 -1
  433. package/build/queries/parsedConditions.d.mts +7 -8
  434. package/build/queries/parsedConditions.d.mts.map +1 -1
  435. package/build/queries/renderConditions.d.cts +3 -4
  436. package/build/queries/renderConditions.d.cts.map +1 -1
  437. package/build/queries/renderConditions.d.mts +3 -4
  438. package/build/queries/renderConditions.d.mts.map +1 -1
  439. package/build/queries/skipCondition.d.cts +1 -2
  440. package/build/queries/skipCondition.d.cts.map +1 -1
  441. package/build/queries/skipCondition.d.mts +1 -2
  442. package/build/queries/skipCondition.d.mts.map +1 -1
  443. package/build/queries/sql/AliasAssigner.cjs.map +1 -1
  444. package/build/queries/sql/AliasAssigner.d.cts +1 -2
  445. package/build/queries/sql/AliasAssigner.d.cts.map +1 -1
  446. package/build/queries/sql/AliasAssigner.d.mts +1 -2
  447. package/build/queries/sql/AliasAssigner.d.mts.map +1 -1
  448. package/build/queries/sql/AliasAssigner.js.map +1 -1
  449. package/build/queries/sql/Expr.cjs +38 -0
  450. package/build/queries/sql/Expr.cjs.map +1 -1
  451. package/build/queries/sql/Expr.d.cts +45 -27
  452. package/build/queries/sql/Expr.d.cts.map +1 -1
  453. package/build/queries/sql/Expr.d.mts +45 -27
  454. package/build/queries/sql/Expr.d.mts.map +1 -1
  455. package/build/queries/sql/Expr.js +38 -1
  456. package/build/queries/sql/Expr.js.map +1 -1
  457. package/build/queries/sql/JoinTree.d.cts +5 -5
  458. package/build/queries/sql/JoinTree.d.cts.map +1 -1
  459. package/build/queries/sql/JoinTree.d.mts +5 -5
  460. package/build/queries/sql/JoinTree.d.mts.map +1 -1
  461. package/build/queries/sql/Tables.cjs +9 -0
  462. package/build/queries/sql/Tables.cjs.map +1 -1
  463. package/build/queries/sql/Tables.d.cts +46 -39
  464. package/build/queries/sql/Tables.d.cts.map +1 -1
  465. package/build/queries/sql/Tables.d.mts +46 -39
  466. package/build/queries/sql/Tables.d.mts.map +1 -1
  467. package/build/queries/sql/Tables.js +10 -1
  468. package/build/queries/sql/Tables.js.map +1 -1
  469. package/build/queries/sql/custom.d.cts +14 -14
  470. package/build/queries/sql/custom.d.cts.map +1 -1
  471. package/build/queries/sql/custom.d.mts +14 -14
  472. package/build/queries/sql/custom.d.mts.map +1 -1
  473. package/build/queries/sql/execute.cjs +68 -89
  474. package/build/queries/sql/execute.cjs.map +1 -1
  475. package/build/queries/sql/execute.d.cts +49 -32
  476. package/build/queries/sql/execute.d.cts.map +1 -1
  477. package/build/queries/sql/execute.d.mts +49 -32
  478. package/build/queries/sql/execute.d.mts.map +1 -1
  479. package/build/queries/sql/execute.js +70 -91
  480. package/build/queries/sql/execute.js.map +1 -1
  481. package/build/queries/sql/expressions/arrayAgg.d.cts +5 -6
  482. package/build/queries/sql/expressions/arrayAgg.d.cts.map +1 -1
  483. package/build/queries/sql/expressions/arrayAgg.d.mts +5 -6
  484. package/build/queries/sql/expressions/arrayAgg.d.mts.map +1 -1
  485. package/build/queries/sql/expressions/case.d.cts +10 -10
  486. package/build/queries/sql/expressions/case.d.cts.map +1 -1
  487. package/build/queries/sql/expressions/case.d.mts +10 -10
  488. package/build/queries/sql/expressions/case.d.mts.map +1 -1
  489. package/build/queries/sql/expressions/coalesce.d.cts +5 -6
  490. package/build/queries/sql/expressions/coalesce.d.cts.map +1 -1
  491. package/build/queries/sql/expressions/coalesce.d.mts +5 -6
  492. package/build/queries/sql/expressions/coalesce.d.mts.map +1 -1
  493. package/build/queries/sql/expressions/codecs.d.cts +1 -2
  494. package/build/queries/sql/expressions/codecs.d.cts.map +1 -1
  495. package/build/queries/sql/expressions/codecs.d.mts +1 -2
  496. package/build/queries/sql/expressions/codecs.d.mts.map +1 -1
  497. package/build/queries/sql/expressions/expression.d.cts +6 -6
  498. package/build/queries/sql/expressions/expression.d.cts.map +1 -1
  499. package/build/queries/sql/expressions/expression.d.mts +6 -6
  500. package/build/queries/sql/expressions/expression.d.mts.map +1 -1
  501. package/build/queries/sql/expressions/greatest.d.cts +5 -6
  502. package/build/queries/sql/expressions/greatest.d.cts.map +1 -1
  503. package/build/queries/sql/expressions/greatest.d.mts +5 -6
  504. package/build/queries/sql/expressions/greatest.d.mts.map +1 -1
  505. package/build/queries/sql/expressions/least.d.cts +5 -6
  506. package/build/queries/sql/expressions/least.d.cts.map +1 -1
  507. package/build/queries/sql/expressions/least.d.mts +5 -6
  508. package/build/queries/sql/expressions/least.d.mts.map +1 -1
  509. package/build/queries/sql/expressions/nullIf.d.cts +5 -6
  510. package/build/queries/sql/expressions/nullIf.d.cts.map +1 -1
  511. package/build/queries/sql/expressions/nullIf.d.mts +5 -6
  512. package/build/queries/sql/expressions/nullIf.d.mts.map +1 -1
  513. package/build/queries/sql/expressions/parseExpression.d.cts +5 -6
  514. package/build/queries/sql/expressions/parseExpression.d.cts.map +1 -1
  515. package/build/queries/sql/expressions/parseExpression.d.mts +5 -6
  516. package/build/queries/sql/expressions/parseExpression.d.mts.map +1 -1
  517. package/build/queries/sql/expressions/types.d.cts +11 -11
  518. package/build/queries/sql/expressions/types.d.cts.map +1 -1
  519. package/build/queries/sql/expressions/types.d.mts +11 -11
  520. package/build/queries/sql/expressions/types.d.mts.map +1 -1
  521. package/build/queries/sql/keywords.d.cts +4 -5
  522. package/build/queries/sql/keywords.d.cts.map +1 -1
  523. package/build/queries/sql/keywords.d.mts +4 -5
  524. package/build/queries/sql/keywords.d.mts.map +1 -1
  525. package/build/queries/sql/query.cjs +77 -30
  526. package/build/queries/sql/query.cjs.map +1 -1
  527. package/build/queries/sql/query.d.cts +119 -76
  528. package/build/queries/sql/query.d.cts.map +1 -1
  529. package/build/queries/sql/query.d.mts +119 -76
  530. package/build/queries/sql/query.d.mts.map +1 -1
  531. package/build/queries/sql/query.js +75 -30
  532. package/build/queries/sql/query.js.map +1 -1
  533. package/build/queries/unnest.cjs +4 -5
  534. package/build/queries/unnest.cjs.map +1 -1
  535. package/build/queries/unnest.d.cts +2 -3
  536. package/build/queries/unnest.d.cts.map +1 -1
  537. package/build/queries/unnest.d.mts +2 -3
  538. package/build/queries/unnest.d.mts.map +1 -1
  539. package/build/queries/unnest.js +4 -5
  540. package/build/queries/unnest.js.map +1 -1
  541. package/build/queries/valueFilters.d.cts +5 -6
  542. package/build/queries/valueFilters.d.cts.map +1 -1
  543. package/build/queries/valueFilters.d.mts +5 -6
  544. package/build/queries/valueFilters.d.mts.map +1 -1
  545. package/build/reactivity/ReactionsManager.cjs +171 -2
  546. package/build/reactivity/ReactionsManager.cjs.map +1 -1
  547. package/build/reactivity/ReactionsManager.d.cts +56 -4
  548. package/build/reactivity/ReactionsManager.d.cts.map +1 -1
  549. package/build/reactivity/ReactionsManager.d.mts +56 -4
  550. package/build/reactivity/ReactionsManager.d.mts.map +1 -1
  551. package/build/reactivity/ReactionsManager.js +172 -3
  552. package/build/reactivity/ReactionsManager.js.map +1 -1
  553. package/build/reactivity/reactiveHints.cjs +9 -3
  554. package/build/reactivity/reactiveHints.cjs.map +1 -1
  555. package/build/reactivity/reactiveHints.d.cts +19 -18
  556. package/build/reactivity/reactiveHints.d.cts.map +1 -1
  557. package/build/reactivity/reactiveHints.d.mts +19 -18
  558. package/build/reactivity/reactiveHints.d.mts.map +1 -1
  559. package/build/reactivity/reactiveHints.js +9 -3
  560. package/build/reactivity/reactiveHints.js.map +1 -1
  561. package/build/relations/AbstractPropertyImpl.cjs.map +1 -1
  562. package/build/relations/AbstractPropertyImpl.d.cts +1 -2
  563. package/build/relations/AbstractPropertyImpl.d.cts.map +1 -1
  564. package/build/relations/AbstractPropertyImpl.d.mts +1 -2
  565. package/build/relations/AbstractPropertyImpl.d.mts.map +1 -1
  566. package/build/relations/AbstractPropertyImpl.js.map +1 -1
  567. package/build/relations/AbstractRelationImpl.d.cts +1 -2
  568. package/build/relations/AbstractRelationImpl.d.cts.map +1 -1
  569. package/build/relations/AbstractRelationImpl.d.mts +1 -2
  570. package/build/relations/AbstractRelationImpl.d.mts.map +1 -1
  571. package/build/relations/AsyncProperty.cjs +1 -1
  572. package/build/relations/AsyncProperty.cjs.map +1 -1
  573. package/build/relations/AsyncProperty.d.cts +5 -6
  574. package/build/relations/AsyncProperty.d.cts.map +1 -1
  575. package/build/relations/AsyncProperty.d.mts +5 -6
  576. package/build/relations/AsyncProperty.d.mts.map +1 -1
  577. package/build/relations/AsyncProperty.js +1 -1
  578. package/build/relations/AsyncProperty.js.map +1 -1
  579. package/build/relations/AsyncReactiveField.cjs +23 -5
  580. package/build/relations/AsyncReactiveField.cjs.map +1 -1
  581. package/build/relations/AsyncReactiveField.d.cts +7 -6
  582. package/build/relations/AsyncReactiveField.d.cts.map +1 -1
  583. package/build/relations/AsyncReactiveField.d.mts +7 -6
  584. package/build/relations/AsyncReactiveField.d.mts.map +1 -1
  585. package/build/relations/AsyncReactiveField.js +23 -5
  586. package/build/relations/AsyncReactiveField.js.map +1 -1
  587. package/build/relations/Collection.d.cts +4 -5
  588. package/build/relations/Collection.d.cts.map +1 -1
  589. package/build/relations/Collection.d.mts +4 -5
  590. package/build/relations/Collection.d.mts.map +1 -1
  591. package/build/relations/CustomCollection.cjs +1 -1
  592. package/build/relations/CustomCollection.cjs.map +1 -1
  593. package/build/relations/CustomCollection.d.cts +3 -4
  594. package/build/relations/CustomCollection.d.cts.map +1 -1
  595. package/build/relations/CustomCollection.d.mts +3 -4
  596. package/build/relations/CustomCollection.d.mts.map +1 -1
  597. package/build/relations/CustomCollection.js +1 -1
  598. package/build/relations/CustomCollection.js.map +1 -1
  599. package/build/relations/CustomReference.cjs +2 -2
  600. package/build/relations/CustomReference.cjs.map +1 -1
  601. package/build/relations/CustomReference.d.cts +3 -4
  602. package/build/relations/CustomReference.d.cts.map +1 -1
  603. package/build/relations/CustomReference.d.mts +3 -4
  604. package/build/relations/CustomReference.d.mts.map +1 -1
  605. package/build/relations/CustomReference.js +2 -2
  606. package/build/relations/CustomReference.js.map +1 -1
  607. package/build/relations/EnumCollection.cjs +1 -1
  608. package/build/relations/EnumCollection.cjs.map +1 -1
  609. package/build/relations/EnumCollection.d.cts +5 -5
  610. package/build/relations/EnumCollection.d.cts.map +1 -1
  611. package/build/relations/EnumCollection.d.mts +5 -5
  612. package/build/relations/EnumCollection.d.mts.map +1 -1
  613. package/build/relations/EnumCollection.js +1 -1
  614. package/build/relations/EnumCollection.js.map +1 -1
  615. package/build/relations/LargeCollection.d.cts +1 -2
  616. package/build/relations/LargeCollection.d.cts.map +1 -1
  617. package/build/relations/LargeCollection.d.mts +1 -2
  618. package/build/relations/LargeCollection.d.mts.map +1 -1
  619. package/build/relations/LazyField.cjs +16 -2
  620. package/build/relations/LazyField.cjs.map +1 -1
  621. package/build/relations/LazyField.d.cts +13 -8
  622. package/build/relations/LazyField.d.cts.map +1 -1
  623. package/build/relations/LazyField.d.mts +13 -8
  624. package/build/relations/LazyField.d.mts.map +1 -1
  625. package/build/relations/LazyField.js +16 -2
  626. package/build/relations/LazyField.js.map +1 -1
  627. package/build/relations/ManyToManyCollection.cjs +1 -1
  628. package/build/relations/ManyToManyCollection.cjs.map +1 -1
  629. package/build/relations/ManyToManyCollection.d.cts +2 -3
  630. package/build/relations/ManyToManyCollection.d.cts.map +1 -1
  631. package/build/relations/ManyToManyCollection.d.mts +2 -3
  632. package/build/relations/ManyToManyCollection.d.mts.map +1 -1
  633. package/build/relations/ManyToManyCollection.js +1 -1
  634. package/build/relations/ManyToManyCollection.js.map +1 -1
  635. package/build/relations/ManyToManyLargeCollection.cjs +1 -1
  636. package/build/relations/ManyToManyLargeCollection.d.cts +2 -3
  637. package/build/relations/ManyToManyLargeCollection.d.cts.map +1 -1
  638. package/build/relations/ManyToManyLargeCollection.d.mts +2 -3
  639. package/build/relations/ManyToManyLargeCollection.d.mts.map +1 -1
  640. package/build/relations/ManyToManyLargeCollection.js +1 -1
  641. package/build/relations/ManyToOneReference.cjs +2 -2
  642. package/build/relations/ManyToOneReference.cjs.map +1 -1
  643. package/build/relations/ManyToOneReference.d.cts +6 -7
  644. package/build/relations/ManyToOneReference.d.cts.map +1 -1
  645. package/build/relations/ManyToOneReference.d.mts +6 -7
  646. package/build/relations/ManyToOneReference.d.mts.map +1 -1
  647. package/build/relations/ManyToOneReference.js +2 -2
  648. package/build/relations/ManyToOneReference.js.map +1 -1
  649. package/build/relations/OneToManyCollection.cjs +1 -1
  650. package/build/relations/OneToManyCollection.cjs.map +1 -1
  651. package/build/relations/OneToManyCollection.d.cts +2 -3
  652. package/build/relations/OneToManyCollection.d.cts.map +1 -1
  653. package/build/relations/OneToManyCollection.d.mts +2 -3
  654. package/build/relations/OneToManyCollection.d.mts.map +1 -1
  655. package/build/relations/OneToManyCollection.js +1 -1
  656. package/build/relations/OneToManyCollection.js.map +1 -1
  657. package/build/relations/OneToManyLargeCollection.cjs +1 -1
  658. package/build/relations/OneToManyLargeCollection.cjs.map +1 -1
  659. package/build/relations/OneToManyLargeCollection.d.cts +2 -3
  660. package/build/relations/OneToManyLargeCollection.d.cts.map +1 -1
  661. package/build/relations/OneToManyLargeCollection.d.mts +2 -3
  662. package/build/relations/OneToManyLargeCollection.d.mts.map +1 -1
  663. package/build/relations/OneToManyLargeCollection.js +1 -1
  664. package/build/relations/OneToManyLargeCollection.js.map +1 -1
  665. package/build/relations/OneToOneReference.cjs +2 -2
  666. package/build/relations/OneToOneReference.cjs.map +1 -1
  667. package/build/relations/OneToOneReference.d.cts +7 -7
  668. package/build/relations/OneToOneReference.d.cts.map +1 -1
  669. package/build/relations/OneToOneReference.d.mts +7 -7
  670. package/build/relations/OneToOneReference.d.mts.map +1 -1
  671. package/build/relations/OneToOneReference.js +2 -2
  672. package/build/relations/OneToOneReference.js.map +1 -1
  673. package/build/relations/PolymorphicReference.cjs +2 -2
  674. package/build/relations/PolymorphicReference.cjs.map +1 -1
  675. package/build/relations/PolymorphicReference.d.cts +4 -5
  676. package/build/relations/PolymorphicReference.d.cts.map +1 -1
  677. package/build/relations/PolymorphicReference.d.mts +4 -5
  678. package/build/relations/PolymorphicReference.d.mts.map +1 -1
  679. package/build/relations/PolymorphicReference.js +2 -2
  680. package/build/relations/PolymorphicReference.js.map +1 -1
  681. package/build/relations/PropertySymbols.d.cts +1 -2
  682. package/build/relations/PropertySymbols.d.cts.map +1 -1
  683. package/build/relations/PropertySymbols.d.mts +1 -2
  684. package/build/relations/PropertySymbols.d.mts.map +1 -1
  685. package/build/relations/ReactiveField.cjs +27 -6
  686. package/build/relations/ReactiveField.cjs.map +1 -1
  687. package/build/relations/ReactiveField.d.cts +11 -7
  688. package/build/relations/ReactiveField.d.cts.map +1 -1
  689. package/build/relations/ReactiveField.d.mts +11 -7
  690. package/build/relations/ReactiveField.d.mts.map +1 -1
  691. package/build/relations/ReactiveField.js +27 -6
  692. package/build/relations/ReactiveField.js.map +1 -1
  693. package/build/relations/ReactiveGetter.cjs +1 -1
  694. package/build/relations/ReactiveGetter.cjs.map +1 -1
  695. package/build/relations/ReactiveGetter.d.cts +4 -5
  696. package/build/relations/ReactiveGetter.d.cts.map +1 -1
  697. package/build/relations/ReactiveGetter.d.mts +4 -5
  698. package/build/relations/ReactiveGetter.d.mts.map +1 -1
  699. package/build/relations/ReactiveGetter.js +1 -1
  700. package/build/relations/ReactiveGetter.js.map +1 -1
  701. package/build/relations/ReactiveManyToMany.cjs +1 -1
  702. package/build/relations/ReactiveManyToMany.cjs.map +1 -1
  703. package/build/relations/ReactiveManyToMany.d.cts +4 -5
  704. package/build/relations/ReactiveManyToMany.d.cts.map +1 -1
  705. package/build/relations/ReactiveManyToMany.d.mts +4 -5
  706. package/build/relations/ReactiveManyToMany.d.mts.map +1 -1
  707. package/build/relations/ReactiveManyToMany.js +1 -1
  708. package/build/relations/ReactiveManyToMany.js.map +1 -1
  709. package/build/relations/ReactiveManyToManyOtherSide.cjs +1 -1
  710. package/build/relations/ReactiveManyToManyOtherSide.cjs.map +1 -1
  711. package/build/relations/ReactiveManyToManyOtherSide.d.cts +4 -5
  712. package/build/relations/ReactiveManyToManyOtherSide.d.cts.map +1 -1
  713. package/build/relations/ReactiveManyToManyOtherSide.d.mts +4 -5
  714. package/build/relations/ReactiveManyToManyOtherSide.d.mts.map +1 -1
  715. package/build/relations/ReactiveManyToManyOtherSide.js +1 -1
  716. package/build/relations/ReactiveManyToManyOtherSide.js.map +1 -1
  717. package/build/relations/ReactiveReference.cjs +2 -2
  718. package/build/relations/ReactiveReference.cjs.map +1 -1
  719. package/build/relations/ReactiveReference.d.cts +6 -7
  720. package/build/relations/ReactiveReference.d.cts.map +1 -1
  721. package/build/relations/ReactiveReference.d.mts +6 -7
  722. package/build/relations/ReactiveReference.d.mts.map +1 -1
  723. package/build/relations/ReactiveReference.js +2 -2
  724. package/build/relations/ReactiveReference.js.map +1 -1
  725. package/build/relations/ReadOnlyCollection.d.cts +4 -5
  726. package/build/relations/ReadOnlyCollection.d.cts.map +1 -1
  727. package/build/relations/ReadOnlyCollection.d.mts +4 -5
  728. package/build/relations/ReadOnlyCollection.d.mts.map +1 -1
  729. package/build/relations/RecursiveCollection.cjs +1 -1
  730. package/build/relations/RecursiveCollection.cjs.map +1 -1
  731. package/build/relations/RecursiveCollection.d.cts +10 -10
  732. package/build/relations/RecursiveCollection.d.cts.map +1 -1
  733. package/build/relations/RecursiveCollection.d.mts +10 -10
  734. package/build/relations/RecursiveCollection.d.mts.map +1 -1
  735. package/build/relations/RecursiveCollection.js +1 -1
  736. package/build/relations/RecursiveCollection.js.map +1 -1
  737. package/build/relations/RecursiveCycleError.d.cts +2 -2
  738. package/build/relations/RecursiveCycleError.d.cts.map +1 -1
  739. package/build/relations/RecursiveCycleError.d.mts +2 -2
  740. package/build/relations/RecursiveCycleError.d.mts.map +1 -1
  741. package/build/relations/Reference.d.cts +5 -5
  742. package/build/relations/Reference.d.cts.map +1 -1
  743. package/build/relations/Reference.d.mts +5 -5
  744. package/build/relations/Reference.d.mts.map +1 -1
  745. package/build/relations/ReferenceSymbols.d.cts +1 -2
  746. package/build/relations/ReferenceSymbols.d.cts.map +1 -1
  747. package/build/relations/ReferenceSymbols.d.mts +1 -2
  748. package/build/relations/ReferenceSymbols.d.mts.map +1 -1
  749. package/build/relations/Relation.d.cts +3 -3
  750. package/build/relations/Relation.d.cts.map +1 -1
  751. package/build/relations/Relation.d.mts +3 -3
  752. package/build/relations/Relation.d.mts.map +1 -1
  753. package/build/relations/RelationSymbols.d.cts +2 -3
  754. package/build/relations/RelationSymbols.d.cts.map +1 -1
  755. package/build/relations/RelationSymbols.d.mts +2 -3
  756. package/build/relations/RelationSymbols.d.mts.map +1 -1
  757. package/build/relations/hasAsyncMethod.cjs +24 -5
  758. package/build/relations/hasAsyncMethod.cjs.map +1 -1
  759. package/build/relations/hasAsyncMethod.d.cts +9 -8
  760. package/build/relations/hasAsyncMethod.d.cts.map +1 -1
  761. package/build/relations/hasAsyncMethod.d.mts +9 -8
  762. package/build/relations/hasAsyncMethod.d.mts.map +1 -1
  763. package/build/relations/hasAsyncMethod.js +24 -6
  764. package/build/relations/hasAsyncMethod.js.map +1 -1
  765. package/build/relations/hasManyDerived.cjs +1 -1
  766. package/build/relations/hasManyDerived.d.cts +2 -2
  767. package/build/relations/hasManyDerived.d.cts.map +1 -1
  768. package/build/relations/hasManyDerived.d.mts +2 -2
  769. package/build/relations/hasManyDerived.d.mts.map +1 -1
  770. package/build/relations/hasManyDerived.js +1 -1
  771. package/build/relations/hasManyThrough.cjs +1 -1
  772. package/build/relations/hasManyThrough.d.cts +1 -2
  773. package/build/relations/hasManyThrough.d.cts.map +1 -1
  774. package/build/relations/hasManyThrough.d.mts +1 -2
  775. package/build/relations/hasManyThrough.d.mts.map +1 -1
  776. package/build/relations/hasManyThrough.js +1 -1
  777. package/build/relations/hasOneDerived.cjs +1 -1
  778. package/build/relations/hasOneDerived.d.cts +1 -2
  779. package/build/relations/hasOneDerived.d.cts.map +1 -1
  780. package/build/relations/hasOneDerived.d.mts +1 -2
  781. package/build/relations/hasOneDerived.d.mts.map +1 -1
  782. package/build/relations/hasOneDerived.js +1 -1
  783. package/build/relations/hasOneThrough.cjs +1 -1
  784. package/build/relations/hasOneThrough.d.cts +1 -2
  785. package/build/relations/hasOneThrough.d.cts.map +1 -1
  786. package/build/relations/hasOneThrough.d.mts +1 -2
  787. package/build/relations/hasOneThrough.d.mts.map +1 -1
  788. package/build/relations/hasOneThrough.js +1 -1
  789. package/build/relations/hasProperty.cjs +1 -1
  790. package/build/relations/hasProperty.cjs.map +1 -1
  791. package/build/relations/hasProperty.d.cts +8 -8
  792. package/build/relations/hasProperty.d.cts.map +1 -1
  793. package/build/relations/hasProperty.d.mts +8 -8
  794. package/build/relations/hasProperty.d.mts.map +1 -1
  795. package/build/relations/hasProperty.js +1 -1
  796. package/build/relations/hasProperty.js.map +1 -1
  797. package/build/relations/hasReactiveAsyncMethod.cjs +87 -0
  798. package/build/relations/hasReactiveAsyncMethod.cjs.map +1 -0
  799. package/build/relations/hasReactiveAsyncMethod.d.cts +32 -0
  800. package/build/relations/hasReactiveAsyncMethod.d.cts.map +1 -0
  801. package/build/relations/hasReactiveAsyncMethod.d.mts +32 -0
  802. package/build/relations/hasReactiveAsyncMethod.d.mts.map +1 -0
  803. package/build/relations/hasReactiveAsyncMethod.js +85 -0
  804. package/build/relations/hasReactiveAsyncMethod.js.map +1 -0
  805. package/build/relations/index.cjs +2 -0
  806. package/build/relations/index.d.cts +2 -1
  807. package/build/relations/index.d.mts +2 -1
  808. package/build/relations/index.js +2 -1
  809. package/build/relations/isCascadeDelete.d.cts +1 -2
  810. package/build/relations/isCascadeDelete.d.cts.map +1 -1
  811. package/build/relations/isCascadeDelete.d.mts +1 -2
  812. package/build/relations/isCascadeDelete.d.mts.map +1 -1
  813. package/build/resurrection.cjs +11 -1
  814. package/build/resurrection.cjs.map +1 -1
  815. package/build/resurrection.d.cts +5 -3
  816. package/build/resurrection.d.cts.map +1 -1
  817. package/build/resurrection.d.mts +5 -3
  818. package/build/resurrection.d.mts.map +1 -1
  819. package/build/resurrection.js +11 -2
  820. package/build/resurrection.js.map +1 -1
  821. package/build/rules.cjs +1 -1
  822. package/build/rules.cjs.map +1 -1
  823. package/build/rules.d.cts +25 -20
  824. package/build/rules.d.cts.map +1 -1
  825. package/build/rules.d.mts +25 -20
  826. package/build/rules.d.mts.map +1 -1
  827. package/build/rules.js +1 -1
  828. package/build/rules.js.map +1 -1
  829. package/build/runtimeConfig.d.cts +4 -5
  830. package/build/runtimeConfig.d.cts.map +1 -1
  831. package/build/runtimeConfig.d.mts +4 -5
  832. package/build/runtimeConfig.d.mts.map +1 -1
  833. package/build/serde/TypeInfo.d.cts +3 -4
  834. package/build/serde/TypeInfo.d.cts.map +1 -1
  835. package/build/serde/TypeInfo.d.mts +3 -4
  836. package/build/serde/TypeInfo.d.mts.map +1 -1
  837. package/build/serde/columns.cjs +3 -0
  838. package/build/serde/columns.cjs.map +1 -1
  839. package/build/serde/columns.d.cts +3 -3
  840. package/build/serde/columns.d.cts.map +1 -1
  841. package/build/serde/columns.d.mts +3 -3
  842. package/build/serde/columns.d.mts.map +1 -1
  843. package/build/serde/columns.js +3 -0
  844. package/build/serde/columns.js.map +1 -1
  845. package/build/serde/fieldSerde.cjs +3 -0
  846. package/build/serde/fieldSerde.cjs.map +1 -1
  847. package/build/serde/fieldSerde.d.cts +10 -9
  848. package/build/serde/fieldSerde.d.cts.map +1 -1
  849. package/build/serde/fieldSerde.d.mts +10 -9
  850. package/build/serde/fieldSerde.d.mts.map +1 -1
  851. package/build/serde/fieldSerde.js +3 -0
  852. package/build/serde/fieldSerde.js.map +1 -1
  853. package/build/serde/serde.cjs +60 -0
  854. package/build/serde/serde.cjs.map +1 -1
  855. package/build/serde/serde.d.cts +58 -19
  856. package/build/serde/serde.d.cts.map +1 -1
  857. package/build/serde/serde.d.mts +58 -19
  858. package/build/serde/serde.d.mts.map +1 -1
  859. package/build/serde/serde.js +60 -1
  860. package/build/serde/serde.js.map +1 -1
  861. package/build/serde/temporal.cjs +7 -12
  862. package/build/serde/temporal.cjs.map +1 -1
  863. package/build/serde/temporal.d.cts +6 -6
  864. package/build/serde/temporal.d.cts.map +1 -1
  865. package/build/serde/temporal.d.mts +6 -6
  866. package/build/serde/temporal.d.mts.map +1 -1
  867. package/build/serde/temporal.js +7 -12
  868. package/build/serde/temporal.js.map +1 -1
  869. package/build/serde/temporalMappers.cjs +8 -4
  870. package/build/serde/temporalMappers.cjs.map +1 -1
  871. package/build/serde/temporalMappers.d.cts +4 -5
  872. package/build/serde/temporalMappers.d.cts.map +1 -1
  873. package/build/serde/temporalMappers.d.mts +4 -5
  874. package/build/serde/temporalMappers.d.mts.map +1 -1
  875. package/build/serde/temporalMappers.js +8 -4
  876. package/build/serde/temporalMappers.js.map +1 -1
  877. package/build/transitions.cjs +91 -0
  878. package/build/transitions.cjs.map +1 -0
  879. package/build/transitions.d.cts +115 -0
  880. package/build/transitions.d.cts.map +1 -0
  881. package/build/transitions.d.mts +115 -0
  882. package/build/transitions.d.mts.map +1 -0
  883. package/build/transitions.js +86 -0
  884. package/build/transitions.js.map +1 -0
  885. package/build/trusted.d.cts +2 -3
  886. package/build/trusted.d.cts.map +1 -1
  887. package/build/trusted.d.mts +2 -3
  888. package/build/trusted.d.mts.map +1 -1
  889. package/build/typeMap.d.cts +17 -17
  890. package/build/typeMap.d.cts.map +1 -1
  891. package/build/typeMap.d.mts +17 -17
  892. package/build/typeMap.d.mts.map +1 -1
  893. package/build/upsert.cjs +1 -1
  894. package/build/upsert.d.cts +4 -4
  895. package/build/upsert.d.cts.map +1 -1
  896. package/build/upsert.d.mts +4 -4
  897. package/build/upsert.d.mts.map +1 -1
  898. package/build/upsert.js +1 -1
  899. package/build/utils.d.cts +27 -28
  900. package/build/utils.d.cts.map +1 -1
  901. package/build/utils.d.mts +27 -28
  902. package/build/utils.d.mts.map +1 -1
  903. package/package.json +6 -6
@@ -43,11 +43,11 @@ import { Entity } from "../../Entity.cjs";
43
43
  *
44
44
  * User documentation: `docs/src/content/docs/features/queries-raw.md`.
45
45
  */
46
- declare const subqueryBrand: unique symbol;
47
- declare const entityQueryBrand: unique symbol;
48
- declare const scalarQueryBrand: unique symbol;
46
+ export declare const subqueryBrand: unique symbol;
47
+ export declare const entityQueryBrand: unique symbol;
48
+ export declare const scalarQueryBrand: unique symbol;
49
49
  /** A query(...) value with any projection, for EXISTS and NOT EXISTS predicates. */
50
- type ExistsQuery = Subquery<unknown, string> | EntityQuery<Entity> | {
50
+ export type ExistsQuery = QueryTable<unknown, string> | EntityQuery<Entity> | {
51
51
  readonly [scalarQueryBrand]: true;
52
52
  };
53
53
  /**
@@ -57,7 +57,7 @@ type ExistsQuery = Subquery<unknown, string> | EntityQuery<Entity> | {
57
57
  * I.e. `{ and: [a.age.gte(18), { exists: booksForAuthor }] }` selects adult Authors with Books,
58
58
  * where `booksForAuthor` is `query({ from: b, where: b.author_id.eq(a.id), select: b.id })`.
59
59
  */
60
- type QueryCondition = SqlPredicate | UnbrandedPredicate | (({
60
+ export type QueryCondition = SqlPredicate | UnbrandedPredicate | (({
61
61
  and: readonly (QueryCondition | undefined)[];
62
62
  or?: never;
63
63
  exists?: never;
@@ -80,58 +80,60 @@ type QueryCondition = SqlPredicate | UnbrandedPredicate | (({
80
80
  and?: never;
81
81
  or?: never;
82
82
  };
83
- /** Phantom type information carried by a table-shaped subquery. */
84
- interface SubqueryBrand<R, Name extends string> {
83
+ /** Phantom type information carried by a table-shaped `query(...)` value. */
84
+ export interface QueryTableBrand<R, Name extends string> {
85
85
  readonly __row: R;
86
86
  readonly __name: Name;
87
87
  }
88
+ /** @deprecated Renamed to `QueryTableBrand`; a `query(...)` value is a table shape, not only a subquery. */
89
+ export type SubqueryBrand<R, Name extends string> = QueryTableBrand<R, Name>;
88
90
  /** Anything that can be a source or be joined: an entity table or a table-shaped subquery. */
89
- type QuerySource = {
91
+ export type QuerySource = {
90
92
  readonly [tableMgmt]: TableSourceBrand<string>;
91
93
  } | {
92
- readonly [subqueryBrand]: SubqueryBrand<any, string>;
94
+ readonly [subqueryBrand]: QueryTableBrand<any, string>;
93
95
  };
94
96
  /** A generated entity table or table-shaped subquery that supports `select: source`. */
95
97
  type SelectableQuerySource = {
96
98
  readonly [tableMgmt]: TableBrand<any, string>;
97
99
  } | {
98
- readonly [subqueryBrand]: SubqueryBrand<any, string>;
100
+ readonly [subqueryBrand]: QueryTableBrand<any, string>;
99
101
  };
100
102
  /**
101
103
  * A join entry (see `InnerJoin`/`LeftJoin` in `Expr.ts`): the expanded `{ inner: b, on }` form, or the
102
104
  * entry a relation join factory returns (`a.books.as(b)`); joins to a subquery are always the expanded
103
105
  * form, since a subquery has no FK metadata.
104
106
  */
105
- type QueryJoin = InnerJoin<QuerySource, QueryCondition> | LeftJoin<QuerySource, QueryCondition>;
106
- type QueryJoinList = readonly (QueryJoin | undefined)[];
107
+ export type QueryJoin = InnerJoin<QuerySource, QueryCondition> | LeftJoin<QuerySource, QueryCondition>;
108
+ export type QueryJoinList = readonly (QueryJoin | undefined)[];
107
109
  /** A flat SQL join list or a domain relationship tree rooted at from. */
108
- type QueryJoinInput = QueryJoinList | Readonly<Record<string, unknown>>;
110
+ export type QueryJoinInput = QueryJoinList | Readonly<Record<string, unknown>>;
109
111
  /**
110
112
  * Resolves tree bindings to join types for scope and result nullability.
111
113
  * Deferring the extracted entry union avoids expanding recursive constraints in generic query signatures.
112
114
  */
113
- type ResolvedJoins<F, J> = J extends QueryJoinList ? J : F extends TableFor<infer T extends Entity> ? TreeEntries<T, J> extends (infer E) ? readonly Extract<E, QueryJoin>[] : never : [];
115
+ export type ResolvedJoins<F, J> = J extends QueryJoinList ? J : F extends TableFor<infer T extends Entity> ? TreeEntries<T, J> extends (infer E) ? readonly Extract<E, QueryJoin>[] : never : [];
114
116
  /**
115
117
  * A CTE declaration: a `query(...)` value with named columns, i.e. a POJO or set-operation select.
116
118
  *
117
119
  * Entity-mode and scalar `query(...)` shapes are excluded: a CTE must be a table shape, so it needs
118
120
  * columns.
119
121
  */
120
- type WithSource = Subquery<unknown, string>;
122
+ export type WithSource = QueryTable<unknown, string>;
121
123
  /** One CTE or an array of them; an `undefined` entry prunes, like any other clause. */
122
- type WithInput = WithSource | readonly (WithSource | undefined)[];
124
+ export type WithInput = WithSource | readonly (WithSource | undefined)[];
123
125
  /** How a recursive CTE combines its two terms: `UNION ALL` keeps every row, `UNION` drops duplicates. */
124
- interface RecursiveOptions {
126
+ export interface RecursiveOptions {
125
127
  /** Defaults to `"all"`. `"distinct"` emits UNION, which stops a cyclic graph from looping forever. */
126
128
  union?: "all" | "distinct";
127
129
  }
128
130
  /** An expression order-by entry, also returned by `expr.asc()` and `expr.desc()`. An undefined order prunes it. */
129
- type ExpressionOrderBy = {
131
+ export type ExpressionOrderBy = {
130
132
  readonly sort: ExprLike<unknown>;
131
133
  readonly order: "ASC" | "DESC" | undefined;
132
134
  readonly nulls?: "first" | "last";
133
135
  };
134
- type OrderByDirection = "ASC" | "DESC" | "ASC NULLS FIRST" | "ASC NULLS LAST" | "DESC NULLS FIRST" | "DESC NULLS LAST";
136
+ export type OrderByDirection = "ASC" | "DESC" | "ASC NULLS FIRST" | "ASC NULLS LAST" | "DESC NULLS FIRST" | "DESC NULLS LAST";
135
137
  /**
136
138
  * A keyed `orderBy` entry, used alone or in an array, like `em.find`'s `orderBy: [{ firstName: "ASC" }]`.
137
139
  *
@@ -140,7 +142,7 @@ type OrderByDirection = "ASC" | "DESC" | "ASC NULLS FIRST" | "ASC NULLS LAST" |
140
142
  * An `undefined` direction prunes the entry, like any other condition. For expressions that are not
141
143
  * in `select`, mix in `expr.asc()`/`expr.desc()` or `{ sort, order }` entries in the array form.
142
144
  */
143
- type OrderByKeys<S> = S extends readonly NamedSelectExpression[] ? { readonly [K in SelectKey<S[number]>]?: OrderByDirection | undefined; } : S extends {
145
+ export type OrderByKeys<S> = S extends readonly NamedSelectExpression[] ? { readonly [K in SelectKey<S[number]>]?: OrderByDirection | undefined; } : S extends {
144
146
  readonly [tableMgmt]: {
145
147
  readonly __entity: infer T;
146
148
  };
@@ -152,11 +154,11 @@ type CheckedExpressionOrderBy<S> = ExpressionOrderBy & (string extends OrderByKe
152
154
  readonly [tableMgmt]: unknown;
153
155
  }] ? unknown : { readonly [K in Exclude<OrderByKey<S>, keyof ExpressionOrderBy>]?: never; });
154
156
  /** The select shapes: a source, scalar expression, named column array, or POJO naming result columns. */
155
- type QuerySelect = SelectableQuerySource | ExprLike<unknown> | readonly NamedSelectExpression[] | Record<string, SelectExpression>;
157
+ export type QuerySelect = SelectableQuerySource | ExprLike<unknown> | readonly NamedSelectExpression[] | Record<string, SelectExpression>;
156
158
  /** A named projection value may be an existing expression or an inline expression literal. */
157
- type SelectExpression = ExprLike<unknown> | ExprInput;
159
+ export type SelectExpression = ExprLike<unknown> | ExprInput;
158
160
  /** A physical or subquery column that retains the field name used for array-select result rows. */
159
- type NamedSelectExpression = ExprLike<unknown> & {
161
+ export type NamedSelectExpression = ExprLike<unknown> & {
160
162
  readonly [selectKeyBrand]: string;
161
163
  };
162
164
  /** Extracts the table property name carried by a column expression for array selects. */
@@ -172,7 +174,7 @@ type CheckSelect<S> = S extends QuerySource | ExprLike<unknown> | readonly Named
172
174
  * `S` and `J` are generic so callers keep the literal shape of `select` and `join`; the defaults let
173
175
  * a standalone object use `satisfies Query` (or `satisfies Clauses` for a source-less fragment).
174
176
  */
175
- interface Clauses<S extends QuerySelect = QuerySelect, J extends QueryJoinInput = QueryJoinInput> {
177
+ export interface Clauses<S extends QuerySelect = QuerySelect, J extends QueryJoinInput = QueryJoinInput> {
176
178
  /**
177
179
  * CTEs to include in a `WITH` clause, declared as `query(...)` values; either a single value or an array.
178
180
  *
@@ -208,7 +210,7 @@ interface Clauses<S extends QuerySelect = QuerySelect, J extends QueryJoinInput
208
210
  softDeletes?: "include" | "exclude";
209
211
  }
210
212
  /** A whole query: `Clauses` plus its source. `query(q)` turns it into a value; `em.query(q)` runs it. */
211
- interface Query<S extends QuerySelect = QuerySelect, J extends QueryJoinInput = QueryJoinInput> extends Clauses<S, J>, Partial<Record<SetOperation | MutationKey | "ctes", never>> {
213
+ export interface Query<S extends QuerySelect = QuerySelect, J extends QueryJoinInput = QueryJoinInput> extends Clauses<S, J>, Partial<Record<SetOperation | MutationKey | "ctes", never>> {
212
214
  from: QuerySource;
213
215
  }
214
216
  /**
@@ -216,7 +218,7 @@ interface Query<S extends QuerySelect = QuerySelect, J extends QueryJoinInput =
216
218
  *
217
219
  * I.e. `union` removes duplicate projected Author names; `unionAll` keeps every copy.
218
220
  */
219
- type SetOperation = "union" | "unionAll" | "intersect" | "intersectAll" | "except" | "exceptAll";
221
+ export type SetOperation = "union" | "unionAll" | "intersect" | "intersectAll" | "except" | "exceptAll";
220
222
  /** Mutation clauses are forbidden even on nonliteral read inputs. */
221
223
  type MutationKey = "insert" | "update" | "delete" | "values" | "set" | "returning" | "allowAll";
222
224
  /**
@@ -227,7 +229,7 @@ type MutationKey = "insert" | "update" | "delete" | "values" | "set" | "returnin
227
229
  * I.e. `{ from: a, select: { id: a.id } }` and its `query(...)` value can contribute Author IDs to a
228
230
  * union. `{ from: a, select: a.id }` cannot: even one-column set operands must give that column a name.
229
231
  */
230
- type SetOperand = Query<Record<string, SelectExpression> | Subquery<unknown, string>> | Subquery<unknown, string> | SetQuery<readonly SetOperand[]>;
232
+ export type SetOperand = Query<Record<string, SelectExpression> | QueryTable<unknown, string>> | QueryTable<unknown, string> | SetQuery<readonly SetOperand[]>;
231
233
  /**
232
234
  * SQL-shaped compound input; use `satisfies SetQuery` to retain the operands' literal row types.
233
235
  *
@@ -246,7 +248,7 @@ type SetOperand = Query<Record<string, SelectExpression> | Subquery<unknown, str
246
248
  * sized arrays; `CheckSetQuery` validates their row types, and runtime validation checks their length.
247
249
  * This input shape checks direction values; `CheckSetQuery` checks the inferred output keys in orderBy.
248
250
  */
249
- 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] & {
251
+ export 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] & {
250
252
  /** CTEs for the combined query, declared once and in scope for every operand; see `Clauses.with`. */
251
253
  readonly with?: WithInput;
252
254
  readonly orderBy?: Readonly<Record<string, OrderByDirection | undefined>> | readonly (Readonly<Record<string, OrderByDirection | undefined>> | undefined)[];
@@ -276,7 +278,7 @@ type FirstOperand<Q> = OperandsOf<Q>[0];
276
278
  * `{ title: string | undefined }`, even though Book.title is required. A reusable `query(...)` value already
277
279
  * stores that row type in its brand; a nested compound combines its own operands recursively.
278
280
  */
279
- type ReadQueryRow<Q> = SetOperand extends Q ? unknown : Q extends {
281
+ export type ReadQueryRow<Q> = SetOperand extends Q ? unknown : Q extends {
280
282
  readonly [subqueryBrand]: {
281
283
  readonly __row: infer R;
282
284
  };
@@ -293,7 +295,7 @@ type ReadQueryRow<Q> = SetOperand extends Q ? unknown : Q extends {
293
295
  * The outer conditional distributes over a TypeScript union of alternative queries. I.e. a runtime
294
296
  * choice between an Author-name UNION and a Book-order EXCEPT must retain `{ name: string } | { order: number }`.
295
297
  */
296
- type SetQueryRow<Q> = Q extends unknown ? { -readonly [K in keyof ReadQueryRow<FirstOperand<Q>>]: ColumnValue<Q extends {
298
+ export type SetQueryRow<Q> = Q extends unknown ? { -readonly [K in keyof ReadQueryRow<FirstOperand<Q>>]: ColumnValue<Q extends {
297
299
  union: readonly SetOperand[];
298
300
  } | {
299
301
  unionAll: readonly SetOperand[];
@@ -312,7 +314,7 @@ type ColumnValue<R, K extends PropertyKey> = R extends unknown ? (K extends keyo
312
314
  * This is only a TypeScript check: Author.age and Author.age.sum() both pass as numbers, but runtime
313
315
  * output-type checks must still reject their different int4/int8 representations.
314
316
  */
315
- type CompatibleValue<L, R> = [NonNullable<L>] extends [NonNullable<R>] ? true : [NonNullable<R>] extends [NonNullable<L>] ? true : false;
317
+ export type CompatibleValue<L, R> = [NonNullable<L>] extends [NonNullable<R>] ? true : [NonNullable<R>] extends [NonNullable<L>] ? true : false;
316
318
  /**
317
319
  * Requires exactly the same output keys and compatible TypeScript values for every column.
318
320
  *
@@ -355,7 +357,7 @@ type CheckSetOrder<O, Keys> = O extends readonly unknown[] ? { readonly [I in ke
355
357
  * The result is intersected with the inferred input Q. Unknown constraints leave its literal types
356
358
  * intact; error messages make the offending operands or ordering keys incompatible with that input.
357
359
  */
358
- 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> & {
360
+ export 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> & {
359
361
  readonly orderBy?: CheckSetOrder<Q["orderBy"], keyof ReadQueryRow<FirstOperand<Q>>>;
360
362
  } : never;
361
363
  /**
@@ -363,8 +365,8 @@ type CheckSetQuery<Q extends SetQuery<readonly SetOperand[]>> = Q extends unknow
363
365
  * Intersect this with an inferred Q; a widened annotation cannot reveal keys already erased from its type.
364
366
  * I.e. an INSERT source with `select: { title: b.title }` and `ctes: [...]` must not silently discard the CTEs.
365
367
  */
366
- type CheckReadQuery<Q> = SetOperand extends Q ? unknown : Q extends readonly unknown[] ? { readonly [I in keyof Q]: CheckReadQuery<Q[I]>; } : Q extends {
367
- readonly [subqueryBrand]: SubqueryBrand<infer R, string>;
368
+ export type CheckReadQuery<Q> = SetOperand extends Q ? unknown : Q extends readonly unknown[] ? { readonly [I in keyof Q]: CheckReadQuery<Q[I]>; } : Q extends {
369
+ readonly [subqueryBrand]: QueryTableBrand<infer R, string>;
368
370
  } ? { readonly [K in keyof Q]: K extends keyof R | typeof subqueryBrand ? unknown : never; } : Q extends {
369
371
  readonly [entityQueryBrand]: unknown;
370
372
  } ? { readonly [K in keyof Q]: K extends typeof entityQueryBrand ? unknown : never; } : Q extends {
@@ -372,7 +374,7 @@ type CheckReadQuery<Q> = SetOperand extends Q ? unknown : Q extends readonly unk
372
374
  readonly select: unknown;
373
375
  } ? CheckJoinInput<Q["from"], "join" extends keyof Q ? Exclude<Q[keyof Q & "join"], undefined> : []> & { 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; };
374
376
  /** The type-level name of a table or subquery, i.e. `"Author"` or `"book_stats"`. */
375
- type NameOf<A> = A extends {
377
+ export type NameOf<A> = A extends {
376
378
  readonly [tableMgmt]: {
377
379
  readonly __name: infer N;
378
380
  };
@@ -410,7 +412,7 @@ type NullableSources<X, Left = LeftJoined<X>> = [Exclude<InheritedLeft<X, Left>,
410
412
  * table named `string` would nullify every column in the query. That is why anonymous subqueries
411
413
  * share the literal sentinel `"?"` instead.
412
414
  */
413
- type MaybeNull<R, Src extends string, J extends QueryJoinList> = string extends Src ? [NullableSources<J[number]>] extends [never] ? R : R | null : [Extract<Src, NullableSources<J[number]>>] extends [never] ? R : R | null;
415
+ export type MaybeNull<R, Src extends string, J extends QueryJoinList> = string extends Src ? [NullableSources<J[number]>] extends [never] ? R : R | null : [Extract<Src, NullableSources<J[number]>>] extends [never] ? R : R | null;
414
416
  /**
415
417
  * The result row for a query with select `S` and joins `J`.
416
418
  *
@@ -420,7 +422,7 @@ type MaybeNull<R, Src extends string, J extends QueryJoinList> = string extends
420
422
  * - column array mode uses each column's field name as the result key
421
423
  * - POJO mode is a mapped type over the select keys, with left-join nullability applied
422
424
  */
423
- type QueryRow<S, J extends QueryJoinList = []> = S extends {
425
+ export type QueryRow<S, J extends QueryJoinList = []> = S extends {
424
426
  readonly [tableMgmt]: {
425
427
  readonly __entity: infer T;
426
428
  };
@@ -446,25 +448,29 @@ type QueryResultValue<V> = Exclude<V, null> | (null extends V ? undefined : neve
446
448
  * while predicates and reusable queries use Sql, avoiding this reverse conversion without making the
447
449
  * common expression declaration verbose.
448
450
  */
449
- type SqlExpressionValue<V> = Exclude<V, undefined> | (undefined extends V ? null : never);
451
+ export type SqlExpressionValue<V> = Exclude<V, undefined> | (undefined extends V ? null : never);
450
452
  /**
451
453
  * A table-shaped query: one `Expr` per select key, each tagged with the table's name as its `Src`,
452
454
  * plus a brand carrying the row type. This is the direct analog of `Table<T>`: `Table<T>` maps physical
453
- * columns to expressions, `Subquery<Row, Name>` maps the inner query's select keys to expressions.
455
+ * columns to expressions, `QueryTable<Row, Name>` maps the inner query's select keys to expressions.
456
+ *
457
+ * It is a table, not only a subquery: the same value can be the `from`, be joined, or be a `with` entry.
454
458
  */
455
- type Subquery<R, Name extends string> = {
456
- readonly [subqueryBrand]: SubqueryBrand<R, Name>;
459
+ export type QueryTable<R, Name extends string> = {
460
+ readonly [subqueryBrand]: QueryTableBrand<R, Name>;
457
461
  } & { readonly [K in keyof R]: Expr<SqlExpressionValue<R[K]>, Name> & {
458
462
  readonly [selectKeyBrand]: Extract<K, string>;
459
463
  }; };
464
+ /** @deprecated Renamed to `QueryTable`; the value is a table shape, usable as a `with` entry too. */
465
+ export type Subquery<R, Name extends string> = QueryTable<R, Name>;
460
466
  /** An entity-mode query (`select: a`): runnable, but it has no columns to reference. */
461
- type EntityQuery<T extends Entity> = {
467
+ export type EntityQuery<T extends Entity> = {
462
468
  readonly [entityQueryBrand]: {
463
469
  readonly __row: T;
464
470
  };
465
471
  } & Partial<Record<MutationKey | "with" | "ctes", never>>;
466
472
  /** A scalar/list query that remains distinguishable from ordinary expressions for EXISTS. */
467
- type ScalarQuery<R> = Expr<SqlExpressionValue<R> | null, never> & {
473
+ export type ScalarQuery<R> = Expr<SqlExpressionValue<R> | null, never> & {
468
474
  readonly [scalarQueryBrand]: true;
469
475
  };
470
476
  /**
@@ -481,7 +487,7 @@ type ScalarQuery<R> = Expr<SqlExpressionValue<R> | null, never> & {
481
487
  * `em.query()` alike:
482
488
  *
483
489
  * const narrow = { from: a, select: { name: a.first_name } } satisfies Query;
484
- * query(narrow); // Subquery<{ name: string }, "?">
490
+ * query(narrow); // QueryTable<{ name: string }, "?">
485
491
  *
486
492
  * const widened: Query = { from: a, select: { name: a.first_name } };
487
493
  * query(widened);
@@ -491,15 +497,15 @@ type ScalarQuery<R> = Expr<SqlExpressionValue<R> | null, never> & {
491
497
  * `S` also defaults to `never`, so a *missing* `select` is reported as "Property 'select' is missing"
492
498
  * against `Query<never, []>` instead of tripping this guard.
493
499
  */
494
- type NotWidened<S> = QuerySelect extends S ? {
500
+ export type NotWidened<S> = QuerySelect extends S ? {
495
501
  select: "select was typed too generically; use `satisfies Query` instead of `: Query`";
496
502
  } : unknown;
497
503
  /** What `query()` returns, by select shape: an entity list, a scalar/list subquery, or a derived table. */
498
- type QueryValue<S, J extends QueryJoinList, Name extends string> = S extends {
504
+ export type QueryValue<S, J extends QueryJoinList, Name extends string> = S extends {
499
505
  readonly [tableMgmt]: {
500
506
  readonly __entity: infer T extends Entity;
501
507
  };
502
- } ? EntityQuery<T> : S extends ExprLike<unknown> ? ScalarQuery<QueryRow<S, J>> : Subquery<QueryRow<S, J>, Name>;
508
+ } ? EntityQuery<T> : S extends ExprLike<unknown> ? ScalarQuery<QueryRow<S, J>> : QueryTable<QueryRow<S, J>, Name>;
503
509
  /** The names of every alias in scope for a query: the source alias plus every joined alias. */
504
510
  type JoinedName<X> = X extends {
505
511
  readonly inner: infer A;
@@ -522,7 +528,7 @@ type InScope<F, J extends QueryJoinList> = NameOf<F> | JoinedName<J[number]>;
522
528
  * `S` to `never` when `select` is missing, and a distributive conditional over `never` would swallow the
523
529
  * whole parameter type.
524
530
  */
525
- type CheckScope<S, F, J extends QueryJoinInput> = [S] extends [never] ? unknown : [S] extends [QuerySource] ? NameOf<S> extends NameOf<F> ? unknown : {
531
+ export type CheckScope<S, F, J extends QueryJoinInput> = [S] extends [never] ? unknown : [S] extends [QuerySource] ? NameOf<S> extends NameOf<F> ? unknown : {
526
532
  select: `'${NameOf<S> & string}' is a joined source, not the from; select its columns individually`;
527
533
  } : [S] extends [readonly NamedSelectExpression[]] ? {
528
534
  select: { [K in keyof S]: CheckExpressionScope<S[K], InScope<F, ResolvedJoins<F, J>>>; };
@@ -532,7 +538,7 @@ type CheckScope<S, F, J extends QueryJoinInput> = [S] extends [never] ? unknown
532
538
  /** Includes columns nested in inline CASE values and fallbacks in the existing scope check. */
533
539
  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`;
534
540
  /** The one argument type `query()` and `em.query()` share: a `Query` POJO plus its source, name, and checks. */
535
- type QueryArg<F extends QuerySource, S extends QuerySelect, J extends QueryJoinInput, Name extends string> = Query<S, J> & {
541
+ export type QueryArg<F extends QuerySource, S extends QuerySelect, J extends QueryJoinInput, Name extends string> = Query<S, J> & {
536
542
  from: F;
537
543
  as?: Name;
538
544
  } & CheckScope<S, F, J> & NoInfer<CheckJoinInput<F, J>> & NotWidened<S> & {
@@ -556,10 +562,10 @@ type QueryArg<F extends QuerySource, S extends QuerySelect, J extends QueryJoinI
556
562
  * completions and cost 15-28% check time. The separate compound root has one additional signature;
557
563
  * `NotWidened` still rejects a SELECT widened by a `: Query` annotation.
558
564
  */
559
- declare function query<const Q extends SetQuery<readonly SetOperand[]>, Name extends string = "?">(q: Q & CheckSetQuery<Q> & {
565
+ export declare function query<const Q extends SetQuery<readonly SetOperand[]>, Name extends string = "?">(q: Q & CheckSetQuery<Q> & {
560
566
  as?: Name;
561
- }): Subquery<SetQueryRow<Q>, Name>;
562
- declare function query<F extends QuerySource, const S extends QuerySelect = never, J extends QueryJoinInput = [], Name extends string = "?">(q: QueryArg<F, S, J, Name>): QueryValue<S, ResolvedJoins<F, J>, Name>;
567
+ }): QueryTable<SetQueryRow<Q>, Name>;
568
+ export declare function query<F extends QuerySource, const S extends QuerySelect = never, J extends QueryJoinInput = [], Name extends string = "?">(q: QueryArg<F, S, J, Name>): QueryValue<S, ResolvedJoins<F, J>, Name>;
563
569
  /**
564
570
  * Builds a query value only when its user-supplied `where` or join-tree filters survive pruning.
565
571
  *
@@ -569,7 +575,7 @@ declare function query<F extends QuerySource, const S extends QuerySelect = neve
569
575
  * I.e. `queryMaybe({ from: b, where: b.authorId.eq(enabled ? a.id : undefined), select: b.id })`
570
576
  * returns `undefined` when `enabled` is false, so an enclosing `notExists` also prunes.
571
577
  */
572
- declare function queryMaybe<F extends QuerySource, const S extends QuerySelect = never, J extends QueryJoinInput = [], Name extends string = "?">(q: QueryArg<F, S, J, Name>): QueryValue<S, ResolvedJoins<F, J>, Name> | undefined;
578
+ export declare function queryMaybe<F extends QuerySource, const S extends QuerySelect = never, J extends QueryJoinInput = [], Name extends string = "?">(q: QueryArg<F, S, J, Name>): QueryValue<S, ResolvedJoins<F, J>, Name> | undefined;
573
579
  /**
574
580
  * Declares a `WITH RECURSIVE` CTE from its two terms, and returns the CTE as a readable value.
575
581
  *
@@ -594,7 +600,7 @@ declare function queryMaybe<F extends QuerySource, const S extends QuerySelect =
594
600
  *
595
601
  * Unlike `query()`, the name is required, because the step term must name it.
596
602
  */
597
- declare function recursiveQuery<Name extends string, F extends QuerySource, const S extends QuerySelect, J extends QueryJoinInput>(name: Name, base: QueryArg<F, S, J, Name>, step: (self: Subquery<QueryRow<S, ResolvedJoins<F, J>>, Name>) => SetOperand, opts?: RecursiveOptions): Subquery<QueryRow<S, ResolvedJoins<F, J>>, Name>;
603
+ export declare function recursiveQuery<Name extends string, F extends QuerySource, const S extends QuerySelect, J extends QueryJoinInput>(name: Name, base: QueryArg<F, S, J, Name>, step: (self: QueryTable<QueryRow<S, ResolvedJoins<F, J>>, Name>) => SetOperand, opts?: RecursiveOptions): QueryTable<QueryRow<S, ResolvedJoins<F, J>>, Name>;
598
604
  /**
599
605
  * Builds a SQL expression from a tagged template.
600
606
  *
@@ -613,8 +619,8 @@ declare function recursiveQuery<Name extends string, F extends QuerySource, cons
613
619
  * sql.condition`${a.column("ts_search")} @@ plainto_tsquery(${term})`
614
620
  * ```
615
621
  */
616
- declare function sql<R = unknown>(strings: TemplateStringsArray, ...values: unknown[]): Expr<R, never>;
617
- declare namespace sql {
622
+ export declare function sql<R = unknown>(strings: TemplateStringsArray, ...values: unknown[]): Expr<R, never>;
623
+ export declare namespace sql {
618
624
  var number: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<number, never>;
619
625
  var numberOrNull: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<number | null, never>;
620
626
  var numberArray: (strings: TemplateStringsArray, ...values: unknown[]) => Expr<number[], never>;
@@ -635,19 +641,19 @@ declare namespace sql {
635
641
  * `EntityManager.query` runs the plan; this module deliberately does not import `EntityManager` (see
636
642
  * `EntityHydrator`), so it parses and hands back `{ sql, bindings, decodeRows }` instead of executing.
637
643
  */
638
- declare function parseUserQuery(arg: unknown): Plan;
644
+ export declare function parseRootQuery(arg: unknown): Plan;
639
645
  /**
640
646
  * Parses a read that sits inside another statement, i.e. an INSERT's SELECT source, so it resolves that
641
647
  * statement's CTEs and shares its alias space instead of generating names that could collide with them.
642
648
  */
643
- declare function parseNestedQuery(arg: unknown, parent: Ctx, assigner: AliasAssigner): Plan;
649
+ export declare function parseNestedQuery(arg: unknown, parent: Ctx, assigner: AliasAssigner): Plan;
644
650
  /** Recognizes read brands, including malformed hybrids that must reach read validation rather than mutation execution. */
645
- declare function isReadQueryValue(arg: unknown): boolean;
651
+ export declare function isReadQueryValue(arg: unknown): boolean;
646
652
  /**
647
653
  * Compiles scalar or nonempty named expression projections, shared by SELECT and mutation RETURNING.
648
654
  * Source-shaped values need read hydration/source rules and are deliberately excluded here.
649
655
  */
650
- declare function projectionToSql(select: unknown, ctx: Ctx, joins?: QueryJoinList): {
656
+ export declare function projectionToSql(select: unknown, ctx: Ctx, joins?: QueryJoinList): {
651
657
  selects: SqlFragment[];
652
658
  decodeRows: Plan["decodeRows"];
653
659
  output: QueryOutput;
@@ -660,10 +666,10 @@ declare function projectionToSql(select: unknown, ctx: Ctx, joins?: QueryJoinLis
660
666
  * incremental-build bug: after tsdown rewrites `build/`, `tsc --build` sporadically reports thousands
661
667
  * of phantom "Module 'joist-orm' has no exported member ..." errors and caches them in `.tsbuildinfo`.
662
668
  */
663
- interface EntityHydrator {
669
+ export interface EntityHydrator {
664
670
  hydrate(cstr: any, rows: readonly any[]): any[];
665
671
  }
666
- interface Plan {
672
+ export interface Plan {
667
673
  sql: string;
668
674
  bindings: any[];
669
675
  /** Aliases of enclosing queries this (sub)query referenced. */
@@ -677,21 +683,24 @@ type AnyQuery = Query<any, any> & {
677
683
  };
678
684
  type AnyReadQuery = AnyQuery | SetQuery<readonly SetOperand[]>;
679
685
  /** Only POJO outputs can be set operands; ordinary scalar reads also expose an ordered output column. */
680
- interface QueryOutput {
686
+ export interface QueryOutput {
681
687
  kind: "entity" | "scalar" | "pojo";
682
688
  /** Expressions retain codecs and physical nullability after LEFT joins and set operations. */
683
689
  columns: readonly (readonly [string, BaseExpr])[];
684
690
  }
685
691
  /** The runtime identity of a `query(...)` value; `Ctx.aliasFor` keys on it, like a table's `TableMgmt`. */
686
- declare class SubqueryHandle {
692
+ export declare class SubqueryHandle {
687
693
  #private;
688
694
  readonly recursive: boolean;
689
695
  constructor(q: AnyReadQuery, recursive?: boolean);
690
696
  get q(): AnyReadQuery;
691
697
  /**
692
- * Gives a recursive CTE its finished body. `recursiveQuery` starts the handle on its base term, so
693
- * the step term can read the CTE's columns while the body that will hold that step is still being
694
- * built. The base term supplies the CTE's columns either way, PostgreSQL's rule for a recursive WITH.
698
+ * Gives a recursive CTE its finished body.
699
+ *
700
+ * `recursiveQuery(name, base, step)` cannot hand us the real body up front: it has to call `step` to
701
+ * get it, and `step` needs this handle first, because the recursive half of the query references the
702
+ * CTE's own columns. So the handle starts out holding `base` alone, and the real body, `base UNION
703
+ * step`, arrives here afterwards. Either way PostgreSQL takes the CTE's column names from `base`.
695
704
  */
696
705
  setBody(q: AnyReadQuery): void;
697
706
  get name(): string | undefined;
@@ -699,7 +708,19 @@ declare class SubqueryHandle {
699
708
  columnKeys(): string[];
700
709
  /** The inner expression behind `key`, for its decoder/encoder. */
701
710
  columnExpr(key: string): BaseExpr;
702
- /** Resolve output metadata without parsing SQL or caching aliases from an enclosing query. */
711
+ /**
712
+ * The output columns, in order, with the codec for each; worked out without generating any SQL.
713
+ *
714
+ * Cached, because the answer is expensive to work out and gets asked for a lot:
715
+ *
716
+ * - `queryOutput` re-checks the whole query, converts a `join: { books: ... }` relationship tree
717
+ * back into a flat list of joins, and repeats all of that for every operand of a set query.
718
+ * - A `query(...)` value has no real properties. `bookStats.n` runs a `Proxy` get that builds a new
719
+ * column expression, and building one needs this method's answer to find `n`. So selecting two of
720
+ * a value's columns asked for the whole shape twice, before parsing then asked a third time.
721
+ *
722
+ * `setBody` is the only thing that changes the shape, so it is the only thing that clears this.
723
+ */
703
724
  output(): QueryOutput;
704
725
  column(key: string): SubqueryColumnExpr;
705
726
  describe(): string;
@@ -725,7 +746,7 @@ declare class SubqueryColumnExpr extends BaseExpr {
725
746
  * records the hit in `outerRefs`, which is how a correlated subquery reports the outer aliases it
726
747
  * depends on (the way `ExistsCondition.outerAliases` does), so join pruning keeps them.
727
748
  */
728
- declare class Ctx implements ExprContext {
749
+ export declare class Ctx implements ExprContext {
729
750
  readonly assigner: AliasAssigner;
730
751
  private parent;
731
752
  private aliases;
@@ -787,7 +808,7 @@ declare class Ctx implements ExprContext {
787
808
  conditionToSql(cond: QueryCondition): SqlFragment | undefined;
788
809
  }
789
810
  /** A parsed `with` entry: the CTE's name and its body, ready to render into the WITH clause. */
790
- interface ParsedCte {
811
+ export interface ParsedCte {
791
812
  alias: string;
792
813
  plan: Plan;
793
814
  /** A recursive CTE reads itself, and makes the whole clause `WITH RECURSIVE`. */
@@ -801,7 +822,7 @@ interface ParsedCte {
801
822
  * The conditions go into the from's WHERE or the join's ON, and never keep an otherwise unreferenced
802
823
  * join alive, which is what `pruneable: true` means on em.find's side.
803
824
  */
804
- declare function injectedConditions(source: {
825
+ export declare function injectedConditions(source: {
805
826
  meta: EntityMetadata | undefined;
806
827
  alias: string;
807
828
  }, softDeletes: "include" | "exclude"): ColumnCondition[];
@@ -811,7 +832,19 @@ declare function injectedConditions(source: {
811
832
  * `pruneIfUndefined` applies unchanged. Deferred SQL expression conditions are resolved
812
833
  * against the context first.
813
834
  */
814
- declare function conditionToSql(cond: QueryCondition | undefined, ctx: Ctx, topLevel: boolean): SqlFragment | undefined;
835
+ export declare function conditionToSql(cond: QueryCondition | undefined, ctx: Ctx, topLevel: boolean): SqlFragment | undefined;
836
+ /**
837
+ * Accepts only own enumerable POJO fields, so nothing a caller supplied can be silently ignored: the
838
+ * compilers read these POJOs back with `Object.entries`/`Object.keys`, which skip inherited,
839
+ * non-enumerable, and symbol keys, so a field hidden behind one of those would never reach the SQL.
840
+ * I.e. an UPDATE whose `set` carries `title` on a prototype would leave `title` unchanged and still
841
+ * report success.
842
+ *
843
+ * Conditions, mutation clauses, and assignment POJOs all share this rule; `allowed` may include symbol
844
+ * keys, i.e. a condition's predicate brand and SQL resolver. Read-query clauses instead use
845
+ * `validateQueryKeys`, which walks the prototype chain and reports mutation clauses by name.
846
+ */
847
+ export declare function checkPojoKeys(value: object, allowed: readonly PropertyKey[], description: string): void;
815
848
  /**
816
849
  * Names and parses each `with` entry, in declaration order.
817
850
  *
@@ -821,9 +854,19 @@ declare function conditionToSql(cond: QueryCondition | undefined, ctx: Ctx, topL
821
854
  *
822
855
  * I.e. `with: [totals, ranked]` parses `totals` first, so `ranked` can join it, but not the reverse.
823
856
  */
824
- declare function registerCtes(q: {
857
+ export declare function registerCtes(q: {
825
858
  with?: WithInput;
826
859
  }, ctx: Ctx, assigner: AliasAssigner): ParsedCte[];
860
+ /**
861
+ * Puts a statement's surviving `with` entries in front of it, dropping the ones nothing reads.
862
+ *
863
+ * `referenced` is the aliases the rest of the statement used. The WITH clause leads the statement, so
864
+ * its bindings lead the statement's bindings too.
865
+ */
866
+ export declare function prependCtes(ctes: ParsedCte[], referenced: Set<string>, sql: string, bindings: any[]): {
867
+ sql: string;
868
+ bindings: any[];
869
+ };
827
870
  /**
828
871
  * Drops the CTEs that nothing reads, given the aliases the rest of the statement referenced.
829
872
  *
@@ -831,14 +874,14 @@ declare function registerCtes(q: {
831
874
  * was already visited, and its own reads are already in `referenced`. That makes one pass enough; first
832
875
  * to last would have to repeat until the set stopped growing. `unshift` restores WITH order.
833
876
  */
834
- declare function pruneCtes(ctes: ParsedCte[], referenced: Set<string>): ParsedCte[];
877
+ export declare function pruneCtes(ctes: ParsedCte[], referenced: Set<string>): ParsedCte[];
835
878
  /**
836
879
  * Renders `WITH a AS (...), b AS (...) `, whose bindings lead the statement, as their SQL does.
837
880
  *
838
881
  * One recursive CTE makes the whole clause `WITH RECURSIVE`, PostgreSQL's rule: the keyword is on the
839
882
  * clause, not on the entry that needs it, and it does not force the other entries to be recursive.
840
883
  */
841
- declare function withFragment(ctes: ParsedCte[]): SqlFragment;
884
+ export declare function withFragment(ctes: ParsedCte[]): SqlFragment;
842
885
  //#endregion
843
- export { CheckReadQuery, CheckScope, CheckSetQuery, Clauses, CompatibleValue, Ctx, EntityHydrator, EntityQuery, ExistsQuery, ExpressionOrderBy, MaybeNull, NameOf, NamedSelectExpression, NotWidened, OrderByDirection, OrderByKeys, ParsedCte, Plan, Query, QueryArg, QueryCondition, QueryJoin, QueryJoinInput, QueryJoinList, QueryOutput, QueryRow, QuerySelect, QuerySource, QueryValue, ReadQueryRow, RecursiveOptions, ResolvedJoins, ScalarQuery, SelectExpression, SetOperand, SetOperation, SetQuery, SetQueryRow, SqlExpressionValue, Subquery, SubqueryBrand, SubqueryHandle, WithInput, WithSource, conditionToSql, entityQueryBrand, injectedConditions, isReadQueryValue, parseNestedQuery, parseUserQuery, projectionToSql, pruneCtes, query, queryMaybe, recursiveQuery, registerCtes, scalarQueryBrand, sql, subqueryBrand, withFragment };
886
+ export {};
844
887
  //# sourceMappingURL=query.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.cts","names":[],"sources":["../../../src/queries/sql/query.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2Ga;cACA;cACA;;KAGD,cAAc,4BAA4B,YAAY;YAAsB;;;;;;;;;KAS5E,iBACR,eACA;EAEM,eAAe;EAA+B;EAAY;EAAgB;;EAC1E,cAAc;EAA+B;EAAa;EAAgB;;EAC1E;;EACJ,QAAQ;EAAyB;EAAmB;EAAa;;EACjE,WAAW;EAAyB;EAAgB;EAAa;;;UAGtD,cAAc,GAAG;WACvB,OAAO;WACP,QAAQ;;;KAIP;YACI,YAAY;;YACZ,gBAAgB;;;KAG3B;YACW,YAAY;;YACZ,gBAAgB;;;;;;;KAOpB,YAAY,UAAU,aAAa,kBAAkB,SAAS,aAAa;KAC3E,0BAA0B;;KAG1B,iBAAiB,gBAAgB,SAAS;;;;;KAM1C,cAAc,GAAG,KAAK,UAAU,gBACxC,IACA,UAAU,eAAe,UAAU,UACjC,YAAY,GAAG,kBAAiB,cACrB,QAAQ,GAAG;;;;;;;KAUhB,aAAa;;KAGb,YAAY,uBAAuB;;UAG9B;;EAEf;;;KAIU;WACD,MAAM;WACN;WACA;;KAGC;;;;;;;;;KAgBA,YAAY,KAEtB,mBAAmB,sCACH,KAAK,UAAU,cAAc,kCAEzC;YAAsB;aAAuB,gBAAgB;;IAC3D,UAAU,qBAEI,WAAW,MAAM,MAAM,MAAM,GAAG,WAAW,gBAAgB,aACjE,0CAKR,UAAU,wCAGI,WAAW,cA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