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
package/build/index.cjs CHANGED
@@ -1,10 +1,15 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_serde_temporal = require("./serde/temporal.cjs");
2
3
  const require_relations_Collection = require("./relations/Collection.cjs");
4
+ const require_getProperties = require("./getProperties.cjs");
5
+ const require_newEntity = require("./newEntity.cjs");
3
6
  const require_relations_AbstractRelationImpl = require("./relations/AbstractRelationImpl.cjs");
4
7
  const require_relations_CustomCollection = require("./relations/CustomCollection.cjs");
5
8
  const require_relations_EnumCollection = require("./relations/EnumCollection.cjs");
6
9
  const require_relations_CustomReference = require("./relations/CustomReference.cjs");
7
10
  const require_normalizeHints = require("./normalizeHints.cjs");
11
+ const require_metrics_EntityMetrics = require("./metrics/EntityMetrics.cjs");
12
+ const require_relations_hasReactiveAsyncMethod = require("./relations/hasReactiveAsyncMethod.cjs");
8
13
  const require_relations_ReactiveGetter = require("./relations/ReactiveGetter.cjs");
9
14
  const require_relations_Relation = require("./relations/Relation.cjs");
10
15
  const require_relations_ReadOnlyCollection = require("./relations/ReadOnlyCollection.cjs");
@@ -15,8 +20,6 @@ const require_loading_loadHints = require("./loading/loadHints.cjs");
15
20
  const require_relations_hasAsyncMethod = require("./relations/hasAsyncMethod.cjs");
16
21
  const require_relations_hasProperty = require("./relations/hasProperty.cjs");
17
22
  const require_relations_AsyncProperty = require("./relations/AsyncProperty.cjs");
18
- const require_serde_temporal = require("./serde/temporal.cjs");
19
- const require_fields = require("./fields.cjs");
20
23
  const require_keys = require("./keys.cjs");
21
24
  const require_queries_sql_keywords = require("./queries/sql/keywords.cjs");
22
25
  const require_RowData = require("./RowData.cjs");
@@ -49,15 +52,15 @@ const require_relations_ReactiveManyToManyOtherSide = require("./relations/React
49
52
  const require_relations_AsyncReactiveField = require("./relations/AsyncReactiveField.cjs");
50
53
  require("./relations/index.cjs");
51
54
  const require_utils = require("./utils.cjs");
52
- const require_newEntity = require("./newEntity.cjs");
53
- const require_getProperties = require("./getProperties.cjs");
55
+ const require_fields = require("./fields.cjs");
56
+ const require_flush_ReadDrift = require("./flush/ReadDrift.cjs");
54
57
  require("./typeMap.cjs");
55
58
  const require_changes = require("./changes.cjs");
56
59
  const require_rules = require("./rules.cjs");
60
+ const require_config = require("./config.cjs");
57
61
  const require_runtimeConfig = require("./runtimeConfig.cjs");
58
62
  const require_serde_fieldSerde = require("./serde/fieldSerde.cjs");
59
63
  const require_configure = require("./configure.cjs");
60
- const require_config = require("./config.cjs");
61
64
  const require_EntityMetadata = require("./EntityMetadata.cjs");
62
65
  const require_trusted = require("./trusted.cjs");
63
66
  const require_defaults = require("./defaults.cjs");
@@ -135,13 +138,14 @@ function setOpts(entity, values, opts) {
135
138
  * - We handle FactoryInitialValues
136
139
  */
137
140
  function setOpt(meta, entity, key, _value, partial = false, calledFromConstructor = false) {
138
- if (!meta.allFields[key]) {
141
+ const field = meta.allFields[key];
142
+ if (!field) {
139
143
  if (!require_getProperties.getProperties(meta)[key]) throw new Error(`Unknown field ${key}`);
140
144
  }
141
145
  if (partial && _value === void 0) return;
142
146
  if (meta.inheritanceType === "sti" && require_EntityMetadata.getBaseMeta(meta).stiDiscriminatorField === key) return;
143
147
  const value = _value === null ? void 0 : _value;
144
- const current = key === "id" ? require_fields.getField(entity, key) : entity[key];
148
+ const current = key === "id" || field?.assertUnchanged ? require_fields.getField(entity, key, true) : entity[key];
145
149
  if (current instanceof require_relations_AbstractRelationImpl.AbstractRelationImpl) {
146
150
  if (calledFromConstructor) current.setFromOpts(value);
147
151
  else current.set(value);
@@ -153,6 +157,9 @@ function setOpt(meta, entity, key, _value, partial = false, calledFromConstructo
153
157
  else if (current instanceof require_relations_AsyncReactiveField.AsyncReactiveFieldImpl) current.setFactoryValue(value.value);
154
158
  else throw new Error(`Unhandled case ${current.constructor.name}`);
155
159
  } else throw new Error(`Invalid argument, cannot set over ${key} ${current.constructor.name}`);
160
+ } else if (value instanceof require_newTestInstance.FactoryInitialValue) {
161
+ entity[key] = value.value;
162
+ require_EntityManager.getEmInternalApi(entity.em).rm.forgetCreationTransition(entity, key);
156
163
  } else if (key === "id" && entity.isNewEntity) require_fields.setField(entity, key, value);
157
164
  else entity[key] = value;
158
165
  }
@@ -206,9 +213,11 @@ exports.CustomSerdeAdapter = require_serde_serde.CustomSerdeAdapter;
206
213
  exports.DateSerde = require_serde_serde.DateSerde;
207
214
  exports.DecimalToNumberSerde = require_serde_serde.DecimalToNumberSerde;
208
215
  exports.EntityManager = require_EntityManager.EntityManager;
216
+ exports.EntityMetrics = require_metrics_EntityMetrics.EntityMetrics;
209
217
  exports.EnumArrayFieldSerde = require_serde_serde.EnumArrayFieldSerde;
210
218
  exports.EnumCollectionImpl = require_relations_EnumCollection.EnumCollectionImpl;
211
219
  exports.EnumFieldSerde = require_serde_serde.EnumFieldSerde;
220
+ exports.FailedFlushError = require_EntityManager.FailedFlushError;
212
221
  exports.FieldColumn = require_serde_fieldSerde.FieldColumn;
213
222
  exports.FieldLogger = require_logging_FieldLogger.FieldLogger;
214
223
  exports.ImmutableEntitiesPlugin = require_plugins_ImmutableEntitiesPlugin.ImmutableEntitiesPlugin;
@@ -241,6 +250,7 @@ exports.ReactionLogger = require_logging_ReactionLogger.ReactionLogger;
241
250
  exports.ReactiveManyToManyImpl = require_relations_ReactiveManyToMany.ReactiveManyToManyImpl;
242
251
  exports.ReactiveManyToManyOtherSideImpl = require_relations_ReactiveManyToManyOtherSide.ReactiveManyToManyOtherSideImpl;
243
252
  exports.ReactiveReferenceImpl = require_relations_ReactiveReference.ReactiveReferenceImpl;
253
+ exports.ReadDriftError = require_flush_ReadDrift.ReadDriftError;
244
254
  exports.ReadOnlyError = require_EntityManager.ReadOnlyError;
245
255
  exports.RecursiveCycleError = require_relations_RecursiveCycleError.RecursiveCycleError;
246
256
  exports.SequenceIdAssigner = require_drivers_IdAssigner.SequenceIdAssigner;
@@ -254,6 +264,7 @@ exports.TooManyError = require_EntityManager.TooManyError;
254
264
  exports.UnknownProperty = require_getProperties.UnknownProperty;
255
265
  exports.ValidationCode = require_rules.ValidationCode;
256
266
  exports.ValidationErrors = require_rules.ValidationErrors;
267
+ exports.VectorSerde = require_serde_serde.VectorSerde;
257
268
  exports.ZodSerde = require_serde_serde.ZodSerde;
258
269
  exports.ZonedDateTimeSerde = require_serde_serde.ZonedDateTimeSerde;
259
270
  exports.abbreviation = require_utils.abbreviation;
@@ -352,6 +363,7 @@ exports.hasOnePolymorphic = require_relations_PolymorphicReference.hasOnePolymor
352
363
  exports.hasOneThrough = require_relations_hasOneThrough.hasOneThrough;
353
364
  exports.hasOneToOne = require_relations_OneToOneReference.hasOneToOne;
354
365
  exports.hasProperty = require_relations_hasProperty.hasProperty;
366
+ exports.hasReactiveAsyncMethod = require_relations_hasReactiveAsyncMethod.hasReactiveAsyncMethod;
355
367
  exports.hasReactiveField = require_relations_ReactiveField.hasReactiveField;
356
368
  exports.hasReactiveGetter = require_relations_ReactiveGetter.hasReactiveGetter;
357
369
  exports.hasReactiveManyToMany = require_relations_ReactiveManyToMany.hasReactiveManyToMany;
@@ -364,6 +376,7 @@ exports.hasRecursiveParents = require_relations_RecursiveCollection.hasRecursive
364
376
  exports.hasSerde = require_serde_fieldSerde.hasSerde;
365
377
  exports.indexBy = require_utils.indexBy;
366
378
  exports.internals = internals;
379
+ exports.invokeRule = require_EntityManager.invokeRule;
367
380
  exports.isAlias = require_queries_find_Aliases.isAlias;
368
381
  exports.isAllSqlPaths = require_loading_loadLens.isAllSqlPaths;
369
382
  exports.isAsyncProperty = require_relations_AsyncProperty.isAsyncProperty;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["getMetadata","getProperties","getBaseMeta","getField","AbstractRelationImpl","isLazyField","isProperty","isAsyncProperty","isReactiveGetter","isReactiveField","isAsyncReactiveField","FactoryInitialValue","ReactiveFieldImpl","AsyncReactiveFieldImpl","getInstanceData"],"sources":["../src/index.ts"],"sourcesContent":["import { getInstanceData } from \"src/BaseEntity.ts\";\nimport { getDefaultDependencies } from \"src/defaults.ts\";\nimport { type Entity } from \"src/Entity.ts\";\nimport { type EntityConstructor, type MaybeAbstractEntityConstructor } from \"src/EntityManager.ts\";\nimport { type EntityMetadata, getBaseMeta, getMetadata } from \"src/EntityMetadata.ts\";\nimport { getField, setField } from \"src/fields.ts\";\nimport { getProperties } from \"src/getProperties.ts\";\nimport type { New } from \"src/loading/loadHints.ts\";\nimport { isAllSqlPaths } from \"src/loading/loadLens.ts\";\nimport { FactoryInitialValue } from \"src/newTestInstance.ts\";\nimport { partitionHint } from \"src/preloading/partitionHint.ts\";\nimport { buildWhereClause } from \"src/queries/renderConditions.ts\";\nimport { AbstractRelationImpl } from \"src/relations/AbstractRelationImpl.ts\";\nimport { AsyncReactiveFieldImpl } from \"src/relations/AsyncReactiveField.ts\";\nimport {\n isAsyncProperty,\n isAsyncReactiveField,\n isLazyField,\n isProperty,\n isReactiveField,\n isReactiveGetter,\n} from \"src/relations/index.ts\";\nimport { ReactiveFieldImpl } from \"src/relations/ReactiveField.ts\";\nimport { type OptsOf } from \"src/typeMap.ts\";\nimport { fail } from \"src/utils.ts\";\n\nexport const testing = { isAllSqlPaths, getDefaultDependencies, partitionHint };\nexport const internals = { buildWhereClause };\nexport { newPgConnectionConfig } from \"joist-utils\";\nexport { AliasAssigner } from \"src/queries/sql/AliasAssigner.ts\";\nexport type { JoinTree } from \"src/queries/sql/JoinTree.ts\";\nexport {\n type AndCondition,\n type ConditionGroup,\n type DomainPredicate,\n type OrCondition,\n type PredicateBrand,\n type SqlCondition,\n type SqlPredicate,\n} from \"src/queries/conditions.ts\";\n// Domain aliases belong to em.find; physical table expressions belong to em.query/em.execute.\nexport {\n alias,\n aliases,\n getAliasMetadata,\n getAliasMgmt,\n getMaybeCtiAlias,\n isAlias,\n newAliasProxy,\n type Alias,\n type AliasBrand,\n type AliasMgmt,\n type AliasColumn,\n type EntityAlias,\n type PolyAlias,\n type PrimitiveAlias,\n} from \"src/queries/find/Aliases.ts\";\nexport {\n table,\n tables,\n tableMgmt,\n getTableMetadata,\n getTableMgmt,\n isTable,\n newTableProxy,\n type Table,\n type TableFilter,\n type TableBrand,\n type TableSourceBrand,\n type TableFor,\n type TableMgmt,\n type TableSourceMgmt,\n type ReferenceJoin,\n type PrimitiveColumn,\n type EntityColumn,\n type ReferenceColumn,\n type CollectionJoin,\n type PolyReference,\n} from \"src/queries/sql/Tables.ts\";\nexport {\n declareTable,\n type CustomColumnConfig,\n type CustomColumnInput,\n type CustomColumnInputs,\n type CustomColumnType,\n type CustomTable,\n type CustomTableDefinition,\n type CustomTableFor,\n} from \"src/queries/sql/custom.ts\";\nexport { BaseEntity, getInstanceData } from \"src/BaseEntity.ts\";\nexport { ConditionBuilder } from \"src/queries/ConditionBuilder.ts\";\nexport { type Entity, type IdType, isEntity } from \"src/Entity.ts\";\nexport type * from \"src/EntityFields.ts\";\nexport * from \"src/queries/find/EntityFilter.ts\";\nexport * from \"src/queries/find/EntityGraphQLFilter.ts\";\nexport * from \"src/EntityManager.ts\";\nexport * from \"src/EntityMetadata.ts\";\nexport type {\n DeleteStatement,\n ExecuteResult,\n InsertStatement,\n InsertValues,\n MutationReturning,\n MutationStatement,\n UpdateStatement,\n UpdateValues,\n} from \"src/queries/sql/execute.ts\";\nexport type { EnumMetadata } from \"src/EnumMetadata.ts\";\n// `em.query`'s expression surface. Only the user-facing types are re-exported: the runtime half\n// (BaseExpr, asNode, deferredCondition, the FnExpr/TemplateExpr node classes) stays internal to\n// joist-core, so `toSql`/`decode`/`encode` never show up as something a user could call.\nexport {\n type ArrayAggOptions,\n type Expr,\n type ExprBrand,\n exprBrand,\n type ExprLike,\n type InnerJoin,\n type LeftJoin,\n} from \"src/queries/sql/Expr.ts\";\nexport {\n expr,\n type CaseElse,\n type CaseWhen,\n type ExprFromInput,\n type ExprInput,\n} from \"src/queries/sql/expressions/expression.ts\";\nexport { skipCondition } from \"src/queries/skipCondition.ts\";\nexport type { EntityOrId, HintNode } from \"src/loading/HintTree.ts\";\nexport { InstanceData } from \"src/InstanceData.ts\";\nexport { type JoinColumnValue, type JoinRow, JoinRowOperation, type ManyToManyLike } from \"src/flush/JoinRows.ts\";\nexport type * from \"src/flush/PendingChanges.ts\";\nexport { Plugin } from \"src/PluginManager.ts\";\nexport * from \"src/queries/find/QueryParser.ts\";\nexport * from \"src/queries/find/buildFindQuery.ts\";\nexport * from \"src/queries/renderConditions.ts\";\nexport type {\n ColumnCondition,\n ExistsCondition,\n ParsedExpressionCondition,\n ParsedExpressionFilter,\n ParsedValueFilter,\n RawCondition,\n} from \"src/queries/parsedConditions.ts\";\nexport {\n type ParsedEntityFilter,\n makeLike,\n mapToDb,\n parseEntityFilter,\n parseValueFilter,\n} from \"src/queries/valueFilters.ts\";\nexport {\n filterSoftDeletes,\n lazyExcludedSelects,\n maybeAddNotSoftDeleted,\n stiSubtypeFilter,\n} from \"src/queries/entityQueryUtils.ts\";\nexport * from \"src/queries/find/QueryParser.collectionJoins.ts\";\nexport { visitConditions } from \"src/queries/find/QueryVisitor.ts\";\nexport * from \"src/RowData.ts\";\nexport { type JoinRowTodo, Todo } from \"src/flush/Todo.ts\";\nexport * from \"src/changes.ts\";\nexport { ConfigApi, type EntityHook, resetBootFlag } from \"src/config.ts\";\nexport {\n configureMetadata,\n getConstructorFromTaggedId,\n getMetadataForTable,\n getMetadataForType,\n maybeGetConstructorFromReference,\n} from \"src/configure.ts\";\nexport { driverApi } from \"src/drivers/driverApi.ts\";\nexport * from \"src/drivers/index.ts\";\nexport { getField, isChangeableField, isFieldSet, setField } from \"src/fields.ts\";\nexport * from \"src/getProperties.ts\";\nexport * from \"src/json.ts\";\nexport * from \"src/keys.ts\";\nexport { kq, kqDot, kqStar } from \"src/queries/sql/keywords.ts\";\nexport {\n assertLoaded,\n type DeepNew,\n ensureLoaded,\n isLoaded,\n isNew,\n type Loadable,\n type Loaded,\n type LoadHint,\n type MarkLoaded,\n maybePopulateThen,\n type NestedLoadHint,\n type New,\n type RelationsIn,\n unsafeLoaded,\n} from \"src/loading/loadHints.ts\";\nexport * from \"src/loading/loadLens.ts\";\nexport { setFactoryWriter } from \"src/logging/FactoryLogger.ts\";\nexport * from \"src/logging/FieldLogger.ts\";\nexport { ReactionLogger, setReactionLogging } from \"src/logging/ReactionLogger.ts\";\nexport { lazyField } from \"src/newEntity.ts\";\nexport {\n defaultValue,\n factories,\n type FactoryEntityOpt,\n type FactoryOpts,\n getTestIndex,\n isFactoryCreation,\n maybeBranchValue,\n maybeNew,\n maybeNewPoly,\n newTestInstance,\n noValue,\n setFactoryLogging,\n testIndex,\n} from \"src/newTestInstance.ts\";\nexport { deepNormalizeHint, normalizeHint } from \"src/normalizeHints.ts\";\nexport { ImmutableEntitiesPlugin } from \"src/plugins/ImmutableEntitiesPlugin.ts\";\nexport type { JoinResult, PreloadHydrator, PreloadPlugin } from \"src/plugins/PreloadPlugin.ts\";\nexport { JsonAggregatePreloader } from \"src/preloading/JsonAggregatePreloader.ts\";\n// `em.query`'s query surface; the parse pipeline (SubqueryHandle, parseUserQuery, Plan) stays internal\nexport {\n type CheckScope,\n type Clauses,\n type EntityQuery,\n type ExpressionOrderBy,\n type ExistsQuery,\n entityQueryBrand,\n type MaybeNull,\n type NameOf,\n type NotWidened,\n type OrderByDirection,\n type OrderByKeys,\n type Query,\n type QueryArg,\n type QueryCondition,\n type QueryJoin,\n type QueryJoinInput,\n type QueryJoinList,\n type QueryRow,\n type QuerySelect,\n type QuerySource,\n type QueryValue,\n recursiveQuery,\n type RecursiveOptions,\n type ResolvedJoins,\n type ScalarQuery,\n type SetQuery,\n query,\n queryMaybe,\n sql,\n type Subquery,\n type SubqueryBrand,\n subqueryBrand,\n type WithInput,\n type WithSource,\n} from \"src/queries/sql/query.ts\";\nexport {\n convertToLoadHint,\n isTypeOrSubType,\n type Reactable,\n type Reacted,\n type ReactiveHint,\n type ReactiveTarget,\n reverseReactiveHint,\n} from \"src/reactivity/reactiveHints.ts\";\nexport * from \"src/relations/index.ts\";\nexport {\n cannotBeChanged,\n cannotBeUpdated,\n type GenericError,\n maxValueRule,\n minValueRule,\n mustBeSubType,\n newRequiredLazyFieldRule,\n newRequiredRule,\n rangeValueRule,\n ValidationCode,\n type ValidationError,\n ValidationErrors,\n type ValidationRule,\n type ValidationRuleInternal,\n type ValidationRuleResult,\n} from \"src/rules.ts\";\nexport { getRuntimeConfig, setRuntimeConfig, type RuntimeConfig } from \"src/runtimeConfig.ts\";\nexport { nowUTC } from \"src/nowUTC.ts\";\nexport * from \"src/serde/serde.ts\";\nexport * from \"src/serde/columns.ts\";\nexport * from \"src/serde/fieldSerde.ts\";\nexport * from \"src/queries/find/scopes.ts\";\nexport { maybeRequireTemporal, requireTemporal, Temporal } from \"src/serde/temporal.ts\";\nexport * from \"src/serde/temporalMappers.ts\";\nexport { isInTrustedContext, runInTrustedContext } from \"src/trusted.ts\";\nexport type * from \"src/typeMap.ts\";\nexport { buildUnnestCte, ensureRectangularArraySizes } from \"src/queries/unnest.ts\";\nexport { type DeepPartialOrNull, updatePartial, upsert } from \"src/upsert.ts\";\nexport {\n abbreviation,\n asNew,\n assertNever,\n cleanSql,\n cleanStringValue,\n fail,\n failIfAnyRejected,\n indexBy,\n partition,\n zeroTo,\n} from \"src/utils.ts\";\nexport { ensureWithLoaded, StubbedRelation, type WithLoaded, withLoaded } from \"src/loading/withLoaded.ts\";\n\n// https://spin.atomicobject.com/2018/01/15/typescript-flexible-nominal-typing/\ninterface Flavoring<FlavorT> {\n _type?: FlavorT;\n}\n\nexport type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;\n\n/**\n * Sets each value in `values` on the current entity.\n *\n * The default behavior is that passing a value as either `null` or `undefined` will set\n * the field as `undefined`, i.e. automatic `null` to `undefined` conversion.\n *\n * However, if you pass `ignoreUndefined: true`, then any opt that is `undefined` will be treated\n * as \"do not set\", and `null` will still mean \"set to `undefined`\". This is useful for implementing\n * APIs were an input of `undefined` means \"do not set / noop\" and `null` means \"unset\".\n *\n * Note that constructors _always_ call this method, but if the call is coming from `em.hydrate`, we\n * use `values` being a primary key to short-circuit and let hydration callers assign the values\n * returned by the serde `fromRow` methods.\n */\nexport function setOpts<T extends Entity>(\n entity: T,\n values: Partial<OptsOf<T>> | undefined,\n opts?: { partial?: boolean; calledFromConstructor?: boolean },\n): void {\n const { calledFromConstructor = false, partial } = opts || {};\n // If `values` is undefined, we're being called by `createPartial` that will do its\n // own opt handling, but we still want the sync defaults applied after this opts handling.\n if (values !== undefined) {\n const meta = getMetadata(entity);\n for (const [key, _value] of Object.entries(values as {})) {\n setOpt(meta, entity, key, _value, partial, calledFromConstructor);\n }\n }\n}\n\n/**\n * Applies some standard behavior & protections to `entity[key] = value`. I.e.\n *\n * - We don't set over AsyncProperties/relations/etc., and instead call current.set(value)\n * - We catch missing/invalid field names\n * - We handle FactoryInitialValues\n */\nexport function setOpt<T extends Entity>(\n meta: EntityMetadata<T>,\n entity: T,\n key: string,\n _value: any,\n partial = false,\n calledFromConstructor = false,\n): void {\n const field = meta.allFields[key];\n if (!field) {\n // Allow setting non-field properties like fullName setters\n const prop = getProperties(meta)[key];\n if (!prop) {\n throw new Error(`Unknown field ${key}`);\n }\n }\n\n // If partial is set, we treat undefined as a noop\n if (partial && _value === undefined) return;\n // Ignore the STI discriminator, em.register will set this accordingly\n if (meta.inheritanceType === \"sti\" && getBaseMeta(meta).stiDiscriminatorField === key) return;\n\n // We let optional opts fields be `| null` for convenience, and convert to undefined.\n const value = _value === null ? undefined : _value;\n\n // Use `getField` to side-step `id` blowing up on new entities that are setting an\n // explicit id; otherwise use `entity[key]` to get back the relation.\n const current = key === \"id\" ? getField(entity, key) : (entity as any)[key];\n\n if (current instanceof AbstractRelationImpl) {\n if (calledFromConstructor) {\n current.setFromOpts(value);\n } else {\n current.set(value);\n }\n } else if (isLazyField(current)) {\n current.set(value);\n } else if (isProperty(current) || isAsyncProperty(current) || isReactiveGetter(current)) {\n throw new Error(`Invalid argument, cannot set over ${key} ${current.constructor.name}`);\n } else if (isReactiveField(current) || isAsyncReactiveField(current)) {\n if (value instanceof FactoryInitialValue) {\n if (current instanceof ReactiveFieldImpl) {\n current.setFactoryValue(value.value);\n } else if (current instanceof AsyncReactiveFieldImpl) {\n current.setFactoryValue(value.value);\n } else {\n throw new Error(`Unhandled case ${current.constructor.name}`);\n }\n } else {\n throw new Error(`Invalid argument, cannot set over ${key} ${current.constructor.name}`);\n }\n } else {\n // If setting an explicit id, go through setField, otherwise use\n // `entity[key]` to set the value directly to that we go through setters.\n if (key === \"id\" && entity.isNewEntity) {\n setField(entity, key, value);\n } else {\n (entity as any)[key] = value;\n }\n }\n}\n\nexport function ensureNotDeleted(entity: Entity, ignore?: \"pending\"): void {\n if (entity.isDeletedEntity && (ignore === undefined || getInstanceData(entity).isDeletedAndFlushed)) {\n fail(`${entity} is marked as deleted`);\n }\n}\n\n/** Adds `null` to every key in `T` to accept partial-update-style input. */\nexport type PartialOrNull<T> = {\n [P in keyof T]?: T[P] | null;\n};\n\nexport function getRequiredKeys<T extends Entity>(entity: T): string[];\nexport function getRequiredKeys<T extends Entity>(type: EntityConstructor<T>): string[];\nexport function getRequiredKeys<T extends Entity>(entityOrType: T | EntityConstructor<T>): string[] {\n return Object.values(getMetadata(entityOrType as any).fields)\n .filter((f) => f.required)\n .map((f) => f.fieldName);\n}\n\nexport function getRelations(entity: Entity): AbstractRelationImpl<any, any>[] {\n return Object.entries(getProperties(getMetadata(entity)))\n .filter(([, v]) => v instanceof AbstractRelationImpl)\n .map(([name]) => (entity as any)[name]);\n}\n\nexport function getRelationEntries(entity: Entity): [string, AbstractRelationImpl<any, any>][] {\n return Object.entries(getProperties(getMetadata(entity)))\n .filter(([, v]) => v instanceof AbstractRelationImpl)\n .map(([name]) => [name, (entity as any)[name]]);\n}\n\n/** Casts a \"maybe abstract\" cstr to a concrete cstr when the calling code knows it's safe. */\nexport function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): EntityConstructor<T> {\n return cstr as any;\n}\n\n/**\n * Thrown when `.id` is accessed on an entity that does not have an id yet.\n *\n * For Postgres, entities are actually allowed to have ids pre-INSERT, if you call\n * `em.assignNewIds()`. Other databases typically require INSERTs to trigger the auto\n * id assignment.\n */\nexport class NoIdError extends Error {}\n\n/** Throws a `NoIdError` for `entity`, i.e. because `id` was called before being saved. */\nexport function failNoIdYet(entity: string): never {\n throw new NoIdError(`${entity} has no id yet`);\n}\n\n/**\n * Add a static function since getters can't have type guards.\n *\n * See https://github.com/microsoft/TypeScript/issues/43368\n */\nexport function isNewEntity<T extends Entity>(entity: T): entity is New<T> {\n return entity.isNewEntity;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,UAAU;CAAE,eAAA,yBAAA;CAAe,wBAAA,iBAAA;CAAwB,eAAA,iCAAA;AAAc;AAC9E,MAAa,YAAY,EAAE,kBAAA,iCAAA,iBAAiB;;;;;;;;;;;;;;;AA6S5C,SAAgB,QACd,QACA,QACA,MACM;CACN,MAAM,EAAE,wBAAwB,OAAO,YAAY,QAAQ,CAAC;CAG5D,IAAI,WAAW,KAAA,GAAW;EACxB,MAAM,OAAOA,uBAAAA,YAAY,MAAM;EAC/B,KAAK,MAAM,CAAC,KAAK,WAAW,OAAO,QAAQ,MAAY,GACrD,OAAO,MAAM,QAAQ,KAAK,QAAQ,SAAS,qBAAqB;CAEpE;AACF;;;;;;;;AASA,SAAgB,OACd,MACA,QACA,KACA,QACA,UAAU,OACV,wBAAwB,OAClB;CAEN,IAAI,CADU,KAAK,UAAU,MAIvB;MAAA,CADSC,sBAAAA,cAAc,IAAI,CAAC,CAAC,MAE/B,MAAM,IAAI,MAAM,iBAAiB,KAAK;CAAA;CAK1C,IAAI,WAAW,WAAW,KAAA,GAAW;CAErC,IAAI,KAAK,oBAAoB,SAASC,uBAAAA,YAAY,IAAI,CAAC,CAAC,0BAA0B,KAAK;CAGvF,MAAM,QAAQ,WAAW,OAAO,KAAA,IAAY;CAI5C,MAAM,UAAU,QAAQ,OAAOC,eAAAA,SAAS,QAAQ,GAAG,IAAK,OAAe;CAEvE,IAAI,mBAAmBC,uCAAAA,sBAAsB;EAC3C,IAAI,uBACF,QAAQ,YAAY,KAAK;OAEzB,QAAQ,IAAI,KAAK;CAErB,OAAO,IAAIC,4BAAAA,YAAY,OAAO,GAC5B,QAAQ,IAAI,KAAK;MACZ,IAAIC,8BAAAA,WAAW,OAAO,KAAKC,gCAAAA,gBAAgB,OAAO,KAAKC,iCAAAA,iBAAiB,OAAO,GACpF,MAAM,IAAI,MAAM,qCAAqC,IAAI,GAAG,QAAQ,YAAY,MAAM;MACjF,IAAIC,gCAAAA,gBAAgB,OAAO,KAAKC,qCAAAA,qBAAqB,OAAO,GAAG;EACpE,IAAI,iBAAiBC,wBAAAA,qBAAqB;GACxC,IAAI,mBAAmBC,gCAAAA,mBACrB,QAAQ,gBAAgB,MAAM,KAAK;QAC9B,IAAI,mBAAmBC,qCAAAA,wBAC5B,QAAQ,gBAAgB,MAAM,KAAK;QAEnC,MAAM,IAAI,MAAM,kBAAkB,QAAQ,YAAY,MAAM;EAEhE,OACE,MAAM,IAAI,MAAM,qCAAqC,IAAI,GAAG,QAAQ,YAAY,MAAM;CAE1F,OAGE,IAAI,QAAQ,QAAQ,OAAO,aACzB,eAAA,SAAS,QAAQ,KAAK,KAAK;MAE3B,OAAgB,OAAO;AAG7B;AAEA,SAAgB,iBAAiB,QAAgB,QAA0B;CACzE,IAAI,OAAO,oBAAoB,WAAW,KAAA,KAAaC,mBAAAA,gBAAgB,MAAM,CAAC,CAAC,sBAC7E,cAAA,KAAK,GAAG,OAAO,sBAAsB;AAEzC;AASA,SAAgB,gBAAkC,cAAkD;CAClG,OAAO,OAAO,OAAOd,uBAAAA,YAAY,YAAmB,CAAC,CAAC,MAAM,CAAC,CAC1D,QAAQ,MAAM,EAAE,QAAQ,CAAC,CACzB,KAAK,MAAM,EAAE,SAAS;AAC3B;AAEA,SAAgB,aAAa,QAAkD;CAC7E,OAAO,OAAO,QAAQC,sBAAAA,cAAcD,uBAAAA,YAAY,MAAM,CAAC,CAAC,CAAC,CACtD,QAAQ,GAAG,OAAO,aAAaI,uCAAAA,oBAAoB,CAAC,CACpD,KAAK,CAAC,UAAW,OAAe,KAAK;AAC1C;AAEA,SAAgB,mBAAmB,QAA4D;CAC7F,OAAO,OAAO,QAAQH,sBAAAA,cAAcD,uBAAAA,YAAY,MAAM,CAAC,CAAC,CAAC,CACtD,QAAQ,GAAG,OAAO,aAAaI,uCAAAA,oBAAoB,CAAC,CACpD,KAAK,CAAC,UAAU,CAAC,MAAO,OAAe,KAAK,CAAC;AAClD;;AAGA,SAAgB,eAAiC,MAA+D;CAC9G,OAAO;AACT;;;;;;;;AASA,IAAa,YAAb,cAA+B,MAAM,CAAC;;AAGtC,SAAgB,YAAY,QAAuB;CACjD,MAAM,IAAI,UAAU,GAAG,OAAO,eAAe;AAC/C;;;;;;AAOA,SAAgB,YAA8B,QAA6B;CACzE,OAAO,OAAO;AAChB"}
1
+ {"version":3,"file":"index.cjs","names":["getMetadata","getProperties","getBaseMeta","getField","AbstractRelationImpl","isLazyField","isProperty","isAsyncProperty","isReactiveGetter","isReactiveField","isAsyncReactiveField","FactoryInitialValue","ReactiveFieldImpl","AsyncReactiveFieldImpl","getInstanceData"],"sources":["../src/index.ts"],"sourcesContent":["import { getInstanceData } from \"src/BaseEntity.ts\";\nimport { getDefaultDependencies } from \"src/defaults.ts\";\nimport { type Entity } from \"src/Entity.ts\";\nimport { type EntityConstructor, type MaybeAbstractEntityConstructor, getEmInternalApi } from \"src/EntityManager.ts\";\nimport { type EntityMetadata, getBaseMeta, getMetadata } from \"src/EntityMetadata.ts\";\nimport { getField, setField } from \"src/fields.ts\";\nimport { getProperties } from \"src/getProperties.ts\";\nimport type { New } from \"src/loading/loadHints.ts\";\nimport { isAllSqlPaths } from \"src/loading/loadLens.ts\";\nimport { FactoryInitialValue } from \"src/newTestInstance.ts\";\nimport { partitionHint } from \"src/preloading/partitionHint.ts\";\nimport { buildWhereClause } from \"src/queries/renderConditions.ts\";\nimport { AbstractRelationImpl } from \"src/relations/AbstractRelationImpl.ts\";\nimport { AsyncReactiveFieldImpl } from \"src/relations/AsyncReactiveField.ts\";\nimport {\n isAsyncProperty,\n isAsyncReactiveField,\n isLazyField,\n isProperty,\n isReactiveField,\n isReactiveGetter,\n} from \"src/relations/index.ts\";\nimport { ReactiveFieldImpl } from \"src/relations/ReactiveField.ts\";\nimport { type OptsOf } from \"src/typeMap.ts\";\nimport { fail } from \"src/utils.ts\";\n\nexport const testing = { isAllSqlPaths, getDefaultDependencies, partitionHint };\nexport const internals = { buildWhereClause };\nexport { newPgConnectionConfig } from \"joist-utils\";\nexport { AliasAssigner } from \"src/queries/sql/AliasAssigner.ts\";\nexport type { JoinTree } from \"src/queries/sql/JoinTree.ts\";\nexport {\n type AndCondition,\n type ConditionGroup,\n type DomainPredicate,\n type OrCondition,\n type PredicateBrand,\n type SqlCondition,\n type SqlPredicate,\n} from \"src/queries/conditions.ts\";\n// Domain aliases belong to em.find; physical table expressions belong to em.query/em.execute.\nexport {\n alias,\n aliases,\n getAliasMetadata,\n getAliasMgmt,\n getMaybeCtiAlias,\n isAlias,\n newAliasProxy,\n type Alias,\n type AliasBrand,\n type AliasMgmt,\n type AliasColumn,\n type EntityAlias,\n type PolyAlias,\n type PrimitiveAlias,\n} from \"src/queries/find/Aliases.ts\";\nexport {\n table,\n tables,\n tableMgmt,\n getTableMetadata,\n getTableMgmt,\n isTable,\n newTableProxy,\n type Table,\n type TableFilter,\n type TableBrand,\n type TableSourceBrand,\n type TableFor,\n type TableMgmt,\n type TableSourceMgmt,\n type ReferenceJoin,\n type PrimitiveColumn,\n type EntityColumn,\n type ReferenceColumn,\n type CollectionJoin,\n type PolyReference,\n} from \"src/queries/sql/Tables.ts\";\nexport {\n declareTable,\n type CustomColumnConfig,\n type CustomColumnInput,\n type CustomColumnInputs,\n type CustomColumnType,\n type CustomTable,\n type CustomTableDefinition,\n type CustomTableFor,\n} from \"src/queries/sql/custom.ts\";\nexport { BaseEntity, getInstanceData } from \"src/BaseEntity.ts\";\nexport { ConditionBuilder } from \"src/queries/ConditionBuilder.ts\";\nexport { type Entity, type IdType, isEntity } from \"src/Entity.ts\";\nexport type * from \"src/EntityFields.ts\";\nexport * from \"src/queries/find/EntityFilter.ts\";\nexport * from \"src/queries/find/EntityGraphQLFilter.ts\";\nexport * from \"src/EntityManager.ts\";\nexport { ReadDriftError, type ReadDrift } from \"src/flush/ReadDrift.ts\";\nexport { EntityMetrics, type EntityMetricsSnapshot, type EvaluationStats } from \"src/metrics/EntityMetrics.ts\";\nexport * from \"src/EntityMetadata.ts\";\nexport type {\n DeleteStatement,\n ExecuteResult,\n InsertStatement,\n InsertValues,\n MutationReturning,\n MutationStatement,\n UpdateStatement,\n UpdateValues,\n} from \"src/queries/sql/execute.ts\";\nexport type { EnumMetadata } from \"src/EnumMetadata.ts\";\n// `em.query`'s expression surface. Only the user-facing types are re-exported: the runtime half\n// (BaseExpr, asNode, deferredCondition, the FnExpr/TemplateExpr node classes) stays internal to\n// joist-core, so `toSql`/`decode`/`encode` never show up as something a user could call.\nexport {\n type ArrayAggOptions,\n type Expr,\n type ExprBrand,\n exprBrand,\n type ExprLike,\n type InnerJoin,\n type LeftJoin,\n} from \"src/queries/sql/Expr.ts\";\nexport {\n expr,\n type CaseElse,\n type CaseWhen,\n type ExprFromInput,\n type ExprInput,\n} from \"src/queries/sql/expressions/expression.ts\";\nexport { skipCondition } from \"src/queries/skipCondition.ts\";\nexport type { EntityOrId, HintNode } from \"src/loading/HintTree.ts\";\nexport { InstanceData } from \"src/InstanceData.ts\";\nexport { type JoinColumnValue, type JoinRow, JoinRowOperation, type ManyToManyLike } from \"src/flush/JoinRows.ts\";\nexport type * from \"src/flush/PendingChanges.ts\";\nexport { Plugin } from \"src/PluginManager.ts\";\nexport * from \"src/queries/find/QueryParser.ts\";\nexport * from \"src/queries/find/buildFindQuery.ts\";\nexport * from \"src/queries/renderConditions.ts\";\nexport type {\n ColumnCondition,\n ExistsCondition,\n ParsedExpressionCondition,\n ParsedExpressionFilter,\n ParsedValueFilter,\n RawCondition,\n} from \"src/queries/parsedConditions.ts\";\nexport {\n type ParsedEntityFilter,\n makeLike,\n mapToDb,\n parseEntityFilter,\n parseValueFilter,\n} from \"src/queries/valueFilters.ts\";\nexport {\n filterSoftDeletes,\n lazyExcludedSelects,\n maybeAddNotSoftDeleted,\n stiSubtypeFilter,\n} from \"src/queries/entityQueryUtils.ts\";\nexport * from \"src/queries/find/QueryParser.collectionJoins.ts\";\nexport { visitConditions } from \"src/queries/find/QueryVisitor.ts\";\nexport * from \"src/RowData.ts\";\nexport { type JoinRowTodo, Todo } from \"src/flush/Todo.ts\";\nexport * from \"src/changes.ts\";\nexport { ConfigApi, type EntityHook, resetBootFlag } from \"src/config.ts\";\nexport { type GuardTransitionMatch, type OnTransitionMatch, type TransitionTable } from \"src/transitions.ts\";\nexport {\n configureMetadata,\n getConstructorFromTaggedId,\n getMetadataForTable,\n getMetadataForType,\n maybeGetConstructorFromReference,\n} from \"src/configure.ts\";\nexport { driverApi } from \"src/drivers/driverApi.ts\";\nexport * from \"src/drivers/index.ts\";\nexport { getField, isChangeableField, isFieldSet, setField } from \"src/fields.ts\";\nexport * from \"src/getProperties.ts\";\nexport * from \"src/json.ts\";\nexport * from \"src/keys.ts\";\nexport { kq, kqDot, kqStar } from \"src/queries/sql/keywords.ts\";\nexport {\n assertLoaded,\n type DeepNew,\n ensureLoaded,\n isLoaded,\n isNew,\n type Loadable,\n type Loaded,\n type LoadHint,\n type MarkLoaded,\n maybePopulateThen,\n type NestedLoadHint,\n type New,\n type RelationsIn,\n unsafeLoaded,\n} from \"src/loading/loadHints.ts\";\nexport * from \"src/loading/loadLens.ts\";\nexport { setFactoryWriter } from \"src/logging/FactoryLogger.ts\";\nexport * from \"src/logging/FieldLogger.ts\";\nexport { ReactionLogger, setReactionLogging } from \"src/logging/ReactionLogger.ts\";\nexport { lazyField } from \"src/newEntity.ts\";\nexport {\n defaultValue,\n factories,\n type FactoryEntityOpt,\n type FactoryOpts,\n getTestIndex,\n isFactoryCreation,\n maybeBranchValue,\n maybeNew,\n maybeNewPoly,\n newTestInstance,\n noValue,\n setFactoryLogging,\n testIndex,\n} from \"src/newTestInstance.ts\";\nexport { deepNormalizeHint, normalizeHint } from \"src/normalizeHints.ts\";\nexport { ImmutableEntitiesPlugin } from \"src/plugins/ImmutableEntitiesPlugin.ts\";\nexport type { JoinResult, PreloadHydrator, PreloadPlugin } from \"src/plugins/PreloadPlugin.ts\";\nexport { JsonAggregatePreloader } from \"src/preloading/JsonAggregatePreloader.ts\";\n// `em.query`'s query surface; the parse pipeline (SubqueryHandle, parseRootQuery, Plan) stays internal\nexport {\n type CheckScope,\n type Clauses,\n type EntityQuery,\n type ExpressionOrderBy,\n type ExistsQuery,\n entityQueryBrand,\n type MaybeNull,\n type NameOf,\n type NotWidened,\n type OrderByDirection,\n type OrderByKeys,\n type Query,\n type QueryArg,\n type QueryCondition,\n type QueryJoin,\n type QueryJoinInput,\n type QueryJoinList,\n type QueryRow,\n type QuerySelect,\n type QuerySource,\n type QueryValue,\n recursiveQuery,\n type RecursiveOptions,\n type ResolvedJoins,\n type ScalarQuery,\n type SetQuery,\n query,\n queryMaybe,\n sql,\n type QueryTable,\n type QueryTableBrand,\n type Subquery,\n type SubqueryBrand,\n subqueryBrand,\n type WithInput,\n type WithSource,\n} from \"src/queries/sql/query.ts\";\nexport {\n convertToLoadHint,\n isTypeOrSubType,\n type Reactable,\n type Reacted,\n type ReactiveHint,\n type ReactiveTarget,\n reverseReactiveHint,\n} from \"src/reactivity/reactiveHints.ts\";\nexport * from \"src/relations/index.ts\";\nexport {\n cannotBeChanged,\n cannotBeUpdated,\n type GenericError,\n maxValueRule,\n minValueRule,\n mustBeSubType,\n newRequiredLazyFieldRule,\n newRequiredRule,\n rangeValueRule,\n ValidationCode,\n type ValidationError,\n ValidationErrors,\n type ValidationRule,\n type ValidationRuleInternal,\n type ValidationRuleResult,\n} from \"src/rules.ts\";\nexport { getRuntimeConfig, setRuntimeConfig, type RuntimeConfig } from \"src/runtimeConfig.ts\";\nexport { nowUTC } from \"src/nowUTC.ts\";\nexport * from \"src/serde/serde.ts\";\nexport * from \"src/serde/columns.ts\";\nexport * from \"src/serde/fieldSerde.ts\";\nexport * from \"src/queries/find/scopes.ts\";\nexport { maybeRequireTemporal, requireTemporal, Temporal } from \"src/serde/temporal.ts\";\nexport * from \"src/serde/temporalMappers.ts\";\nexport { isInTrustedContext, runInTrustedContext } from \"src/trusted.ts\";\nexport type * from \"src/typeMap.ts\";\nexport { buildUnnestCte, ensureRectangularArraySizes } from \"src/queries/unnest.ts\";\nexport { type DeepPartialOrNull, updatePartial, upsert } from \"src/upsert.ts\";\nexport {\n abbreviation,\n asNew,\n assertNever,\n cleanSql,\n cleanStringValue,\n fail,\n failIfAnyRejected,\n indexBy,\n partition,\n zeroTo,\n} from \"src/utils.ts\";\nexport { ensureWithLoaded, StubbedRelation, type WithLoaded, withLoaded } from \"src/loading/withLoaded.ts\";\n\n// https://spin.atomicobject.com/2018/01/15/typescript-flexible-nominal-typing/\ninterface Flavoring<FlavorT> {\n _type?: FlavorT;\n}\n\nexport type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;\n\n/**\n * Sets each value in `values` on the current entity.\n *\n * The default behavior is that passing a value as either `null` or `undefined` will set\n * the field as `undefined`, i.e. automatic `null` to `undefined` conversion.\n *\n * However, if you pass `ignoreUndefined: true`, then any opt that is `undefined` will be treated\n * as \"do not set\", and `null` will still mean \"set to `undefined`\". This is useful for implementing\n * APIs were an input of `undefined` means \"do not set / noop\" and `null` means \"unset\".\n *\n * Note that constructors _always_ call this method, but if the call is coming from `em.hydrate`, we\n * use `values` being a primary key to short-circuit and let hydration callers assign the values\n * returned by the serde `fromRow` methods.\n */\nexport function setOpts<T extends Entity>(\n entity: T,\n values: Partial<OptsOf<T>> | undefined,\n opts?: { partial?: boolean; calledFromConstructor?: boolean },\n): void {\n const { calledFromConstructor = false, partial } = opts || {};\n // If `values` is undefined, we're being called by `createPartial` that will do its\n // own opt handling, but we still want the sync defaults applied after this opts handling.\n if (values !== undefined) {\n const meta = getMetadata(entity);\n for (const [key, _value] of Object.entries(values as {})) {\n setOpt(meta, entity, key, _value, partial, calledFromConstructor);\n }\n }\n}\n\n/**\n * Applies some standard behavior & protections to `entity[key] = value`. I.e.\n *\n * - We don't set over AsyncProperties/relations/etc., and instead call current.set(value)\n * - We catch missing/invalid field names\n * - We handle FactoryInitialValues\n */\nexport function setOpt<T extends Entity>(\n meta: EntityMetadata<T>,\n entity: T,\n key: string,\n _value: any,\n partial = false,\n calledFromConstructor = false,\n): void {\n const field = meta.allFields[key];\n if (!field) {\n // Allow setting non-field properties like fullName setters\n const prop = getProperties(meta)[key];\n if (!prop) {\n throw new Error(`Unknown field ${key}`);\n }\n }\n\n // If partial is set, we treat undefined as a noop\n if (partial && _value === undefined) return;\n // Ignore the STI discriminator, em.register will set this accordingly\n if (meta.inheritanceType === \"sti\" && getBaseMeta(meta).stiDiscriminatorField === key) return;\n\n // We let optional opts fields be `| null` for convenience, and convert to undefined.\n const value = _value === null ? undefined : _value;\n\n // Use `getField` to side-step `id` blowing up on new entities that are setting an\n // explicit id. Read configured fields as internal so applying opts does not mark the entity for read locking.\n // Otherwise use `entity[key]` to get back the relation.\n const current = key === \"id\" || field?.assertUnchanged ? getField(entity, key, true) : (entity as any)[key];\n\n if (current instanceof AbstractRelationImpl) {\n if (calledFromConstructor) {\n current.setFromOpts(value);\n } else {\n current.set(value);\n }\n } else if (isLazyField(current)) {\n current.set(value);\n } else if (isProperty(current) || isAsyncProperty(current) || isReactiveGetter(current)) {\n throw new Error(`Invalid argument, cannot set over ${key} ${current.constructor.name}`);\n } else if (isReactiveField(current) || isAsyncReactiveField(current)) {\n if (value instanceof FactoryInitialValue) {\n if (current instanceof ReactiveFieldImpl) {\n current.setFactoryValue(value.value);\n } else if (current instanceof AsyncReactiveFieldImpl) {\n current.setFactoryValue(value.value);\n } else {\n throw new Error(`Unhandled case ${current.constructor.name}`);\n }\n } else {\n throw new Error(`Invalid argument, cannot set over ${key} ${current.constructor.name}`);\n }\n } else if (value instanceof FactoryInitialValue) {\n // A factory's `withStatus`-style opt: trust the created value, so its `addTransitionReaction`s don't fire\n (entity as any)[key] = value.value;\n getEmInternalApi(entity.em).rm.forgetCreationTransition(entity, key);\n } else {\n // If setting an explicit id, go through setField, otherwise use\n // `entity[key]` to set the value directly to that we go through setters.\n if (key === \"id\" && entity.isNewEntity) {\n setField(entity, key, value);\n } else {\n (entity as any)[key] = value;\n }\n }\n}\n\nexport function ensureNotDeleted(entity: Entity, ignore?: \"pending\"): void {\n if (entity.isDeletedEntity && (ignore === undefined || getInstanceData(entity).isDeletedAndFlushed)) {\n fail(`${entity} is marked as deleted`);\n }\n}\n\n/** Adds `null` to every key in `T` to accept partial-update-style input. */\nexport type PartialOrNull<T> = {\n [P in keyof T]?: T[P] | null;\n};\n\nexport function getRequiredKeys<T extends Entity>(entity: T): string[];\nexport function getRequiredKeys<T extends Entity>(type: EntityConstructor<T>): string[];\nexport function getRequiredKeys<T extends Entity>(entityOrType: T | EntityConstructor<T>): string[] {\n return Object.values(getMetadata(entityOrType as any).fields)\n .filter((f) => f.required)\n .map((f) => f.fieldName);\n}\n\nexport function getRelations(entity: Entity): AbstractRelationImpl<any, any>[] {\n return Object.entries(getProperties(getMetadata(entity)))\n .filter(([, v]) => v instanceof AbstractRelationImpl)\n .map(([name]) => (entity as any)[name]);\n}\n\nexport function getRelationEntries(entity: Entity): [string, AbstractRelationImpl<any, any>][] {\n return Object.entries(getProperties(getMetadata(entity)))\n .filter(([, v]) => v instanceof AbstractRelationImpl)\n .map(([name]) => [name, (entity as any)[name]]);\n}\n\n/** Casts a \"maybe abstract\" cstr to a concrete cstr when the calling code knows it's safe. */\nexport function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): EntityConstructor<T> {\n return cstr as any;\n}\n\n/**\n * Thrown when `.id` is accessed on an entity that does not have an id yet.\n *\n * For Postgres, entities are actually allowed to have ids pre-INSERT, if you call\n * `em.assignNewIds()`. Other databases typically require INSERTs to trigger the auto\n * id assignment.\n */\nexport class NoIdError extends Error {}\n\n/** Throws a `NoIdError` for `entity`, i.e. because `id` was called before being saved. */\nexport function failNoIdYet(entity: string): never {\n throw new NoIdError(`${entity} has no id yet`);\n}\n\n/**\n * Add a static function since getters can't have type guards.\n *\n * See https://github.com/microsoft/TypeScript/issues/43368\n */\nexport function isNewEntity<T extends Entity>(entity: T): entity is New<T> {\n return entity.isNewEntity;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,UAAU;CAAE,eAAA,yBAAA;CAAe,wBAAA,iBAAA;CAAwB,eAAA,iCAAA;AAAc;AAC9E,MAAa,YAAY,EAAE,kBAAA,iCAAA,iBAAiB;;;;;;;;;;;;;;;AAkT5C,SAAgB,QACd,QACA,QACA,MACM;CACN,MAAM,EAAE,wBAAwB,OAAO,YAAY,QAAQ,CAAC;CAG5D,IAAI,WAAW,KAAA,GAAW;EACxB,MAAM,OAAOA,uBAAAA,YAAY,MAAM;EAC/B,KAAK,MAAM,CAAC,KAAK,WAAW,OAAO,QAAQ,MAAY,GACrD,OAAO,MAAM,QAAQ,KAAK,QAAQ,SAAS,qBAAqB;CAEpE;AACF;;;;;;;;AASA,SAAgB,OACd,MACA,QACA,KACA,QACA,UAAU,OACV,wBAAwB,OAClB;CACN,MAAM,QAAQ,KAAK,UAAU;CAC7B,IAAI,CAAC,OAGC;MAAA,CADSC,sBAAAA,cAAc,IAAI,CAAC,CAAC,MAE/B,MAAM,IAAI,MAAM,iBAAiB,KAAK;CAAA;CAK1C,IAAI,WAAW,WAAW,KAAA,GAAW;CAErC,IAAI,KAAK,oBAAoB,SAASC,uBAAAA,YAAY,IAAI,CAAC,CAAC,0BAA0B,KAAK;CAGvF,MAAM,QAAQ,WAAW,OAAO,KAAA,IAAY;CAK5C,MAAM,UAAU,QAAQ,QAAQ,OAAO,kBAAkBC,eAAAA,SAAS,QAAQ,KAAK,IAAI,IAAK,OAAe;CAEvG,IAAI,mBAAmBC,uCAAAA,sBAAsB;EAC3C,IAAI,uBACF,QAAQ,YAAY,KAAK;OAEzB,QAAQ,IAAI,KAAK;CAErB,OAAO,IAAIC,4BAAAA,YAAY,OAAO,GAC5B,QAAQ,IAAI,KAAK;MACZ,IAAIC,8BAAAA,WAAW,OAAO,KAAKC,gCAAAA,gBAAgB,OAAO,KAAKC,iCAAAA,iBAAiB,OAAO,GACpF,MAAM,IAAI,MAAM,qCAAqC,IAAI,GAAG,QAAQ,YAAY,MAAM;MACjF,IAAIC,gCAAAA,gBAAgB,OAAO,KAAKC,qCAAAA,qBAAqB,OAAO,GAAG;EACpE,IAAI,iBAAiBC,wBAAAA,qBAAqB;GACxC,IAAI,mBAAmBC,gCAAAA,mBACrB,QAAQ,gBAAgB,MAAM,KAAK;QAC9B,IAAI,mBAAmBC,qCAAAA,wBAC5B,QAAQ,gBAAgB,MAAM,KAAK;QAEnC,MAAM,IAAI,MAAM,kBAAkB,QAAQ,YAAY,MAAM;EAEhE,OACE,MAAM,IAAI,MAAM,qCAAqC,IAAI,GAAG,QAAQ,YAAY,MAAM;CAE1F,OAAO,IAAI,iBAAiBF,wBAAAA,qBAAqB;EAE/C,OAAgB,OAAO,MAAM;EAC7B,sBAAA,iBAAiB,OAAO,EAAE,CAAC,CAAC,GAAG,yBAAyB,QAAQ,GAAG;CACrE,OAGE,IAAI,QAAQ,QAAQ,OAAO,aACzB,eAAA,SAAS,QAAQ,KAAK,KAAK;MAE3B,OAAgB,OAAO;AAG7B;AAEA,SAAgB,iBAAiB,QAAgB,QAA0B;CACzE,IAAI,OAAO,oBAAoB,WAAW,KAAA,KAAaG,mBAAAA,gBAAgB,MAAM,CAAC,CAAC,sBAC7E,cAAA,KAAK,GAAG,OAAO,sBAAsB;AAEzC;AASA,SAAgB,gBAAkC,cAAkD;CAClG,OAAO,OAAO,OAAOd,uBAAAA,YAAY,YAAmB,CAAC,CAAC,MAAM,CAAC,CAC1D,QAAQ,MAAM,EAAE,QAAQ,CAAC,CACzB,KAAK,MAAM,EAAE,SAAS;AAC3B;AAEA,SAAgB,aAAa,QAAkD;CAC7E,OAAO,OAAO,QAAQC,sBAAAA,cAAcD,uBAAAA,YAAY,MAAM,CAAC,CAAC,CAAC,CACtD,QAAQ,GAAG,OAAO,aAAaI,uCAAAA,oBAAoB,CAAC,CACpD,KAAK,CAAC,UAAW,OAAe,KAAK;AAC1C;AAEA,SAAgB,mBAAmB,QAA4D;CAC7F,OAAO,OAAO,QAAQH,sBAAAA,cAAcD,uBAAAA,YAAY,MAAM,CAAC,CAAC,CAAC,CACtD,QAAQ,GAAG,OAAO,aAAaI,uCAAAA,oBAAoB,CAAC,CACpD,KAAK,CAAC,UAAU,CAAC,MAAO,OAAe,KAAK,CAAC;AAClD;;AAGA,SAAgB,eAAiC,MAA+D;CAC9G,OAAO;AACT;;;;;;;;AASA,IAAa,YAAb,cAA+B,MAAM,CAAC;;AAGtC,SAAgB,YAAY,QAAuB;CACjD,MAAM,IAAI,UAAU,GAAG,OAAO,eAAe;AAC/C;;;;;;AAOA,SAAgB,YAA8B,QAA6B;CACzE,OAAO,OAAO;AAChB"}
package/build/index.d.cts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ActualFactoryOpts, ColumnsOf, EntityOf, FactoryExtrasOf, FieldsOf, FilterOf, GraphQLFilterOf, InheritanceTypeOf, OptIdsOf, OptsOf, OrderOf, RelationsOf, RootTypeNameOf, TypeMap, TypeMapEntry, TypeNameOf } from "./typeMap.cjs";
2
2
  import { Changes, EntityChanges, EnumCollectionFieldStatus, FieldStatus, ManyToManyFieldStatus, ManyToOneFieldStatus, OneToManyFieldStatus, PrimitiveFieldStatus, newChangesProxy } from "./changes.cjs";
3
+ import { EntityMetrics, EntityMetricsSnapshot, EvaluationStats } from "./metrics/EntityMetrics.cjs";
3
4
  import { deepNormalizeHint, normalizeHint } from "./normalizeHints.cjs";
4
5
  import { Collection, LoadedCollection, isCollection, isLoadedCollection } from "./relations/Collection.cjs";
5
6
  import { AbstractRelationImpl } from "./relations/AbstractRelationImpl.cjs";
@@ -8,6 +9,7 @@ import { EnumMetadata } from "./EnumMetadata.cjs";
8
9
  import { EnumCollection, EnumCollectionImpl, LoadedEnumCollection, hasEnumCollection } from "./relations/EnumCollection.cjs";
9
10
  import { CustomReference, hasCustomReference } from "./relations/CustomReference.cjs";
10
11
  import { AsyncMethod, LoadedMethod, hasAsyncMethod } from "./relations/hasAsyncMethod.cjs";
12
+ import { hasReactiveAsyncMethod } from "./relations/hasReactiveAsyncMethod.cjs";
11
13
  import { LoadedProperty, Property, PropertyImpl, hasProperty, hasReactiveProperty, isLoadedProperty, isProperty } from "./relations/hasProperty.cjs";
12
14
  import { AsyncProperty, AsyncPropertyImpl, hasAsyncProperty, isAsyncProperty, isLoadedAsyncProperty } from "./relations/AsyncProperty.cjs";
13
15
  import { LazyField, LazyFieldImpl, hasLazyField, isLazyField, isLoadedLazyField } from "./relations/LazyField.cjs";
@@ -49,9 +51,10 @@ import { abbreviation, asNew, assertNever, cleanSql, cleanStringValue, fail, fai
49
51
  import { DeepNew, LoadHint, Loadable, Loaded, MarkLoaded, NestedLoadHint, New, RelationsIn, assertLoaded, ensureLoaded, isLoaded, isNew, maybePopulateThen, unsafeLoaded } from "./loading/loadHints.cjs";
50
52
  import { Reactable, Reacted, ReactiveHint, ReactiveTarget, convertToLoadHint, isTypeOrSubType, reverseReactiveHint } from "./reactivity/reactiveHints.cjs";
51
53
  import { GenericError, ValidationCode, ValidationError, ValidationErrors, ValidationRule, ValidationRuleInternal, ValidationRuleResult, cannotBeChanged, cannotBeUpdated, maxValueRule, minValueRule, mustBeSubType, newRequiredLazyFieldRule, newRequiredRule, rangeValueRule } from "./rules.cjs";
54
+ import { GuardTransitionMatch, OnTransitionMatch, TransitionTable } from "./transitions.cjs";
52
55
  import { ConfigApi, EntityHook, resetBootFlag } from "./config.cjs";
53
56
  import { Temporal, maybeRequireTemporal, requireTemporal } from "./serde/temporal.cjs";
54
- import { BigIntSerde, CustomSerde, CustomSerdeAdapter, DateSerde, DecimalToNumberSerde, EnumArrayFieldSerde, EnumFieldSerde, JsonSerde, KeySerde, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, PrimitiveSerde, ScalarCodec, SuperstructSerde, TimestampCodec, ZodSerde, ZonedDateTimeSerde } from "./serde/serde.cjs";
57
+ import { BigIntSerde, CustomSerde, CustomSerdeAdapter, DateSerde, DecimalToNumberSerde, EnumArrayFieldSerde, EnumFieldSerde, JsonSerde, KeySerde, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, PrimitiveSerde, ScalarCodec, SuperstructSerde, TimestampCodec, VectorSerde, ZodSerde, ZonedDateTimeSerde } from "./serde/serde.cjs";
55
58
  import { Column, ColumnDescriptors } from "./serde/columns.cjs";
56
59
  import { DeleteOp, InsertFixup, InsertOp, OpColumn, UpdateOp, generateOps } from "./drivers/EntityWriter.cjs";
57
60
  import { PojoRowData, RowData, emptyRowData } from "./RowData.cjs";
@@ -67,11 +70,12 @@ import { ExprFromInput, ExprInput } from "./queries/sql/expressions/types.cjs";
67
70
  import { expr } from "./queries/sql/expressions/expression.cjs";
68
71
  import { CustomColumnConfig, CustomColumnInput, CustomColumnInputs, CustomColumnType, CustomTable, CustomTableDefinition, CustomTableFor, declareTable } from "./queries/sql/custom.cjs";
69
72
  import { CollectionJoin, EntityColumn, PolyReference, PrimitiveColumn, ReferenceColumn, ReferenceJoin, Table, TableBrand, TableFilter, TableFor, TableMgmt, TableSourceBrand, TableSourceMgmt, getTableMetadata, getTableMgmt, isTable, newTableProxy, table, tableMgmt, tables } from "./queries/sql/Tables.cjs";
70
- import { CheckScope, Clauses, EntityQuery, ExistsQuery, ExpressionOrderBy, MaybeNull, NameOf, NotWidened, OrderByDirection, OrderByKeys, Query, QueryArg, QueryCondition, QueryJoin, QueryJoinInput, QueryJoinList, QueryRow, QuerySelect, QuerySource, QueryValue, RecursiveOptions, ResolvedJoins, ScalarQuery, SetQuery, Subquery, SubqueryBrand, WithInput, WithSource, entityQueryBrand, query, queryMaybe, recursiveQuery, sql, subqueryBrand } from "./queries/sql/query.cjs";
73
+ import { CheckScope, Clauses, EntityQuery, ExistsQuery, ExpressionOrderBy, MaybeNull, NameOf, NotWidened, OrderByDirection, OrderByKeys, Query, QueryArg, QueryCondition, QueryJoin, QueryJoinInput, QueryJoinList, QueryRow, QuerySelect, QuerySource, QueryTable, QueryTableBrand, QueryValue, RecursiveOptions, ResolvedJoins, ScalarQuery, SetQuery, Subquery, SubqueryBrand, WithInput, WithSource, entityQueryBrand, query, queryMaybe, recursiveQuery, sql, subqueryBrand } from "./queries/sql/query.cjs";
71
74
  import { ArrayAggOptions, Expr, ExprBrand, ExprLike, InnerJoin, LeftJoin, exprBrand } from "./queries/sql/Expr.cjs";
72
75
  import { JoinTree } from "./queries/sql/JoinTree.cjs";
73
76
  import { ConditionBuilder } from "./queries/ConditionBuilder.cjs";
74
77
  import { EntityField, EntityFields, SettableFields } from "./EntityFields.cjs";
78
+ import { ReadDrift, ReadDriftError } from "./flush/ReadDrift.cjs";
75
79
  import { EntityOrId, HintNode } from "./loading/HintTree.cjs";
76
80
  import { JoinResult, PreloadHydrator, PreloadPlugin } from "./plugins/PreloadPlugin.cjs";
77
81
  import { Driver, DriverQueryResult } from "./drivers/Driver.cjs";
@@ -107,23 +111,23 @@ import { isInTrustedContext, runInTrustedContext } from "./trusted.cjs";
107
111
  import { buildUnnestCte, ensureRectangularArraySizes } from "./queries/unnest.cjs";
108
112
  import { DeepPartialOrNull, updatePartial, upsert } from "./upsert.cjs";
109
113
  import { StubbedRelation, WithLoaded, ensureWithLoaded, withLoaded } from "./loading/withLoaded.cjs";
110
- import { EntityConstructor, EntityManager, EntityManagerHook, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, FindCountFilterOptions, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, IdOf, LoaderCache, MaybeAbstractEntityConstructor, NotFoundError, ReadOnlyError, TaggedId, TimestampFields, TooManyError, appendStack, createRowFromEntityData, driverAfterBegin, driverAfterCommit, driverBeforeBegin, driverBeforeCommit, getDefaultEntityLimit, getEmInternalApi, isDefined, isId, isKey, resetDefaultEntityLimit, sameEntity, sameReference, setDefaultEntityLimit, setLastNow } from "./EntityManager.cjs";
114
+ import { CloneOverrides, CloneOverridesCallback, ClonePostClone, CloneSkipIf, EntityConstructor, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, FailedFlushError, FindCountFilterOptions, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, IdOf, LoaderCache, MaybeAbstractEntityConstructor, NotFoundError, ReadOnlyError, TaggedId, TimestampFields, TooManyError, appendStack, createRowFromEntityData, driverAfterBegin, driverAfterCommit, driverBeforeBegin, driverBeforeCommit, getDefaultEntityLimit, getEmInternalApi, invokeRule, isDefined, isId, isKey, resetDefaultEntityLimit, sameEntity, sameReference, setDefaultEntityLimit, setLastNow } from "./EntityManager.cjs";
111
115
  import { Entity, IdType, isEntity } from "./Entity.cjs";
112
116
  import { BaseEntity, getInstanceData } from "./BaseEntity.cjs";
113
117
  import { newPgConnectionConfig } from "joist-utils";
114
118
  //#region src/index.d.ts
115
- declare const testing: {
119
+ export declare const testing: {
116
120
  isAllSqlPaths: typeof isAllSqlPaths;
117
121
  getDefaultDependencies: typeof getDefaultDependencies;
118
122
  partitionHint: typeof partitionHint;
119
123
  };
120
- declare const internals: {
124
+ export declare const internals: {
121
125
  buildWhereClause: typeof buildWhereClause;
122
126
  };
123
127
  interface Flavoring<FlavorT> {
124
128
  _type?: FlavorT;
125
129
  }
126
- type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
130
+ export type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
127
131
  /**
128
132
  * Sets each value in `values` on the current entity.
129
133
  *
@@ -138,7 +142,7 @@ type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
138
142
  * use `values` being a primary key to short-circuit and let hydration callers assign the values
139
143
  * returned by the serde `fromRow` methods.
140
144
  */
141
- declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>> | undefined, opts?: {
145
+ export declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>> | undefined, opts?: {
142
146
  partial?: boolean;
143
147
  calledFromConstructor?: boolean;
144
148
  }): void;
@@ -149,16 +153,16 @@ declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>>
149
153
  * - We catch missing/invalid field names
150
154
  * - We handle FactoryInitialValues
151
155
  */
152
- declare function setOpt<T extends Entity>(meta: EntityMetadata<T>, entity: T, key: string, _value: any, partial?: boolean, calledFromConstructor?: boolean): void;
153
- declare function ensureNotDeleted(entity: Entity, ignore?: "pending"): void;
156
+ export declare function setOpt<T extends Entity>(meta: EntityMetadata<T>, entity: T, key: string, _value: any, partial?: boolean, calledFromConstructor?: boolean): void;
157
+ export declare function ensureNotDeleted(entity: Entity, ignore?: "pending"): void;
154
158
  /** Adds `null` to every key in `T` to accept partial-update-style input. */
155
- type PartialOrNull<T> = { [P in keyof T]?: T[P] | null; };
156
- declare function getRequiredKeys<T extends Entity>(entity: T): string[];
157
- declare function getRequiredKeys<T extends Entity>(type: EntityConstructor<T>): string[];
158
- declare function getRelations(entity: Entity): AbstractRelationImpl<any, any>[];
159
- declare function getRelationEntries(entity: Entity): [string, AbstractRelationImpl<any, any>][];
159
+ export type PartialOrNull<T> = { [P in keyof T]?: T[P] | null; };
160
+ export declare function getRequiredKeys<T extends Entity>(entity: T): string[];
161
+ export declare function getRequiredKeys<T extends Entity>(type: EntityConstructor<T>): string[];
162
+ export declare function getRelations(entity: Entity): AbstractRelationImpl<any, any>[];
163
+ export declare function getRelationEntries(entity: Entity): [string, AbstractRelationImpl<any, any>][];
160
164
  /** Casts a "maybe abstract" cstr to a concrete cstr when the calling code knows it's safe. */
161
- declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): EntityConstructor<T>;
165
+ export declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): EntityConstructor<T>;
162
166
  /**
163
167
  * Thrown when `.id` is accessed on an entity that does not have an id yet.
164
168
  *
@@ -166,15 +170,15 @@ declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConst
166
170
  * `em.assignNewIds()`. Other databases typically require INSERTs to trigger the auto
167
171
  * id assignment.
168
172
  */
169
- declare class NoIdError extends Error {}
173
+ export declare class NoIdError extends Error {}
170
174
  /** Throws a `NoIdError` for `entity`, i.e. because `id` was called before being saved. */
171
- declare function failNoIdYet(entity: string): never;
175
+ export declare function failNoIdYet(entity: string): never;
172
176
  /**
173
177
  * Add a static function since getters can't have type guards.
174
178
  *
175
179
  * See https://github.com/microsoft/TypeScript/issues/43368
176
180
  */
177
- declare function isNewEntity<T extends Entity>(entity: T): entity is New<T>;
181
+ export declare function isNewEntity<T extends Entity>(entity: T): entity is New<T>;
178
182
  //#endregion
179
- export { type ActualFactoryOpts, type Alias, AliasAssigner, type AliasBrand, type AliasColumn, AliasFn, type AliasMgmt, type AndCondition, type ArrayAggOptions, type AsyncMethod, type AsyncProperty, AsyncPropertyImpl, BaseEntity, BigIntSerde, BooleanFilter, BooleanGraphQLFilter, type CaseElse, type CaseWhen, Changes, type CheckScope, type Clauses, type Collection, type CollectionJoin, Column, type ColumnCondition, ColumnDescriptors, type ColumnsOf, ConditionBuilder, type ConditionGroup, ConfigApi, CrossJoinTable, CustomCollection, type CustomColumnConfig, type CustomColumnInput, type CustomColumnInputs, type CustomColumnType, CustomJsonKeyHint, CustomReference, CustomSerde, CustomSerdeAdapter, type CustomTable, type CustomTableDefinition, type CustomTableFor, DateSerde, DecimalToNumberSerde, type DeepNew, type DeepPartialOrNull, DeleteOp, type DeleteStatement, type DomainPredicate, type Driver, type DriverQueryResult, type Entity, type EntityAlias, EntityChanges, type EntityColumn, EntityConstructor, type EntityField, type EntityFields, EntityFilter, EntityFilterObject, EntityGraphQLFilter, type EntityHook, EntityKeyJsonHint, EntityManager, EntityManagerHook, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, EntityMetadata, type EntityOf, type EntityOrId, type EntityQuery, EnumArrayFieldSerde, type EnumCollection, EnumCollectionFieldStatus, EnumCollectionImpl, EnumField, EnumFieldSerde, type EnumMetadata, type ExecuteResult, type ExistsCondition, type ExistsQuery, type Expr, type ExprBrand, type ExprFromInput, type ExprInput, type ExprLike, ExpressionCondition, ExpressionFilter, type ExpressionOrderBy, type FactoryEntityOpt, type FactoryExtrasOf, type FactoryOpts, Field, FieldColumn, FieldLogger, FieldLoggerWatch, FieldSerde, FieldStatus, type FieldsOf, FilterAndSettings, type FilterOf, FilterWithAlias, FindCountFilterOptions, FindFilter, FindFilterOptions, FindGqlFilterOptions, FindOperation, Flavor, FlushOptions, type GenericError, GraphQLFilterAndSettings, type GraphQLFilterOf, GraphQLFilterWithAlias, type HintNode, IdAssigner, IdOf, type IdType, ImmutableEntitiesPlugin, type InheritanceTypeOf, type InnerJoin, InsertFixup, InsertOp, type InsertStatement, type InsertValues, InstanceData, type JoinColumnValue, type JoinResult, type JoinRow, JoinRowOperation, type JoinRowTodo, JoinTable, type JoinTree, JsonAggregatePreloader, JsonHint, JsonPayload, JsonSerde, Jsonable, JsonableValue, KeySerde, type LargeCollection, LargeOneToManyField, LateralJoinTable, type LazyField, LazyFieldImpl, type LeftJoin, Lens, type LoadHint, type Loadable, type Loaded, type LoadedCollection, type LoadedEnumCollection, type LoadedMethod, type LoadedProperty, type LoadedReadOnlyCollection, type LoadedReference, LoaderCache, ManyToManyCollection, ManyToManyEnumField, ManyToManyField, ManyToManyFieldStatus, ManyToManyLargeCollection, type ManyToManyLike, ManyToOneField, ManyToOneFieldStatus, type ManyToOneReference, ManyToOneReferenceImpl, type MarkLoaded, MaybeAbstractEntityConstructor, type MaybeNull, type MutationReturning, type MutationStatement, type NameOf, NestedJsonHint, type NestedLoadHint, type New, NoIdError, NotFoundError, type NotWidened, OneToManyCollection, OneToManyField, OneToManyFieldStatus, OneToManyLargeCollection, OneToOneField, type OneToOneReference, OneToOneReferenceImpl, OpColumn, Operator, type OptIdsOf, type OptsOf, type OrCondition, OrderBy, type OrderByDirection, type OrderByKeys, type OrderOf, ParsedCteClause, type ParsedEntityFilter, type ParsedExpressionCondition, type ParsedExpressionFilter, ParsedFindQuery, ParsedGroupBy, ParsedOrderBy, ParsedSelect, ParsedTable, type ParsedValueFilter, PartialOrNull, type PendingChange, type PendingCreate, type PendingDelete, type PendingM2M, type PendingUpdate, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, Plugin, PojoRowData, type PolyAlias, PolyComponent, type PolyReference, PolymorphicField, PolymorphicFieldComponent, PolymorphicKeySerde, type PolymorphicReference, PolymorphicReferenceImpl, type PredicateBrand, type PreloadHydrator, type PreloadPlugin, PrimaryKeyField, PrimaryTable, type PrimitiveAlias, type PrimitiveColumn, PrimitiveField, PrimitiveFieldStatus, PrimitiveSerde, type Property, PropertyImpl, type Query, type QueryArg, type QueryCondition, type QueryJoin, type QueryJoinInput, type QueryJoinList, type QueryRow, type QuerySelect, type QuerySource, type QueryValue, RandomUuidAssigner, type RawCondition, type Reactable, type Reacted, ReactionLogger, type ReactiveField, type ReactiveGetter, type ReactiveHint, type ReactiveManyToMany, ReactiveManyToManyImpl, type ReactiveManyToManyOtherSide, ReactiveManyToManyOtherSideImpl, type ReactiveReference, ReactiveReferenceImpl, type ReactiveTarget, type ReadOnlyCollection, ReadOnlyError, RecursiveCycleError, type RecursiveOptions, type Reference, type ReferenceColumn, type ReferenceJoin, type Relation, type RelationsIn, type RelationsOf, type ResolvedJoins, ResolvedScope, type RootTypeNameOf, RowData, type RuntimeConfig, ScalarCodec, type ScalarQuery, Scope, ScopeFilterFragment, ScopeFn, ScopeJoinFilter, ScopeQuery, SequenceIdAssigner, SerdeField, type SetQuery, type SettableFields, SimpleFieldSerde, type SqlCondition, type SqlPredicate, StubbedRelation, type Subquery, type SubqueryBrand, SubqueryRenderer, SuperstructSerde, type Table, type TableBrand, type TableFilter, type TableFor, type TableMgmt, type TableSourceBrand, type TableSourceMgmt, TaggedId, Temporal, TestUuidAssigner, TimestampCodec, TimestampFields, TimestampSerde, ToJsonHint, Todo, TooManyError, type TypeMap, type TypeMapEntry, type TypeNameOf, UniqueFilter, UnknownProperty, UpdateOp, type UpdateStatement, type UpdateValues, ValidationCode, type ValidationError, ValidationErrors, type ValidationRule, type ValidationRuleInternal, type ValidationRuleResult, ValueFilter, ValueGraphQLFilter, type WithInput, type WithLoaded, type WithSource, WriteFn, ZodSerde, ZonedDateTimeSerde, abbreviation, addTablePerClassJoinsAndClassTag, alias, aliases, appendStack, asConcreteCstr, asNew, assertIdIsTagged, assertIdsAreTagged, assertLoaded, assertNever, buildCteSql, buildRawQuery, buildUnnestCte, buildValueCondition, buildWhereClause, cannotBeChanged, cannotBeUpdated, cleanSql, cleanStringValue, configureMetadata, convertToLoadHint, createRowFromEntityData, deTagId, deTagIds, declareTable, deepNormalizeHint, defaultValue, driverAfterBegin, driverAfterCommit, driverApi, driverBeforeBegin, driverBeforeCommit, emptyRowData, ensureLoaded, ensureNotDeleted, ensureRectangularArraySizes, ensureTagged, ensureWithLoaded, entityQueryBrand, expr, exprBrand, factories, fail, failIfAnyRejected, failNoIdYet, filterSoftDeletes, findFilterField, generateOps, getAliasMetadata, getAliasMgmt, getBaseAndSelfMetas, getBaseMeta, getBaseSelfAndSubMetas, getConstructorFromTaggedId, getDefaultEntityLimit, getEmInternalApi, getField, getInstanceData, getLazyFields, getLens, getLensPath, getMaybeCtiAlias, getMetadata, getMetadataForField, getMetadataForTable, getMetadataForType, getProperties, getRelationEntries, getRelations, getRequiredKeys, getRuntimeConfig, getSubMetas, getTableMetadata, getTableMgmt, getTables, getTestIndex, hasAsyncMethod, hasAsyncProperty, hasAsyncReactiveField, hasCustomCollection, hasCustomReference, hasEnumCollection, hasLargeMany, hasLargeManyToMany, hasLazyField, hasMany, hasManyDerived, hasManyThrough, hasManyToMany, hasOne, hasOneDerived, hasOnePolymorphic, hasOneThrough, hasOneToOne, hasProperty, hasReactiveField, hasReactiveGetter, hasReactiveManyToMany, hasReactiveManyToManyOtherSide, hasReactiveProperty, hasReactiveReference, hasRecursiveChildren, hasRecursiveM2m, hasRecursiveParents, hasSerde, indexBy, internals, isAlias, isAllSqlPaths, isAsyncProperty, isAsyncReactiveField, isChangeableField, isCollection, isCollectionField, isDefined, isEntity, isFactoryCreation, isFieldSet, isId, isInTrustedContext, isKey, isLazyField, isLensLoaded, isLensLoadedPath, isLoaded, isLoadedAsyncProperty, isLoadedCollection, isLoadedLazyField, isLoadedOneToOneReference, isLoadedProperty, isLoadedReadOnlyCollection, isLoadedReference, isManyToManyEnumField, isManyToManyField, isManyToOneField, isManyToOneReference, isNew, isNewEntity, isOneToManyField, isOneToOneField, isOneToOneReference, isPolymorphicField, isPolymorphicReference, isProperty, isReactiveField, isReactiveGetter, isReactiveManyToMany, isReactiveManyToManyOtherSide, isReactiveReference, isReadOnlyCollection, isReference, isReferenceField, isRelation, isScope, isScopeJoinFilter, isSelectAllFilter, isTable, isTaggedId, isTypeOrSubType, keyToNumber, keyToTaggedId, kq, kqDot, kqStar, lazyExcludedSelects, lazyField, lensPathToLoadHint, lensToLoadHint, lensToPath, loadLens, loadLensPath, makeLike, mapPathsToTarget, mapToDb, maxValueRule, maybeAddIdNotNulls, maybeAddNotSoftDeleted, maybeAddOrderBy, maybeBranchValue, maybeGetConstructorFromReference, maybeNew, maybeNewPoly, maybePopulateThen, maybeRequireTemporal, maybeResolveReferenceToId, mergeFindOptions, minValueRule, mustBeSubType, newAliasProxy, newChangesProxy, newPgConnectionConfig, newRequiredLazyFieldRule, newRequiredRule, newScopeFn, newTableProxy, newTestInstance, noValue, noopFieldLogger, normalizeHint, nowUTC, opToFn, operators, optimizeCollectionJoins, parseAlias, parseEntityFilter, parseFindQuery, parseValueFilter, partition, plainDateMapper, plainDateTimeMapper, plainTimeMapper, polymorphicField, query, queryMaybe, rangeValueRule, recursiveQuery, requireTemporal, resetBootFlag, resetDefaultEntityLimit, resolveScope, reverseReactiveHint, runInTrustedContext, sameEntity, sameReference, setDefaultEntityLimit, setFactoryLogging, setFactoryWriter, setField, setLastNow, setOpt, setOpts, setReactionLogging, setRuntimeConfig, setTaggedIdDelimiter, skipCondition, sql, stiSubtypeFilter, subqueryBrand, table, tableMgmt, tables, tagFromId, tagId, tagIds, taggedIdPrefix, testIndex, testing, toIdOf, toJSON, toTaggedId, unsafeDeTagIds, unsafeLoaded, updatePartial, upsert, visitConditions, withLoaded, zeroTo, zonedDateTimeMapper };
183
+ export { type ActualFactoryOpts, type Alias, AliasAssigner, type AliasBrand, type AliasColumn, AliasFn, type AliasMgmt, type AndCondition, type ArrayAggOptions, type AsyncMethod, type AsyncProperty, AsyncPropertyImpl, BaseEntity, BigIntSerde, BooleanFilter, BooleanGraphQLFilter, type CaseElse, type CaseWhen, Changes, type CheckScope, type Clauses, CloneOverrides, CloneOverridesCallback, ClonePostClone, CloneSkipIf, type Collection, type CollectionJoin, Column, type ColumnCondition, ColumnDescriptors, type ColumnsOf, ConditionBuilder, type ConditionGroup, ConfigApi, CrossJoinTable, CustomCollection, type CustomColumnConfig, type CustomColumnInput, type CustomColumnInputs, type CustomColumnType, CustomJsonKeyHint, CustomReference, CustomSerde, CustomSerdeAdapter, type CustomTable, type CustomTableDefinition, type CustomTableFor, DateSerde, DecimalToNumberSerde, type DeepNew, type DeepPartialOrNull, DeleteOp, type DeleteStatement, type DomainPredicate, type Driver, type DriverQueryResult, type Entity, type EntityAlias, EntityChanges, type EntityColumn, EntityConstructor, type EntityField, type EntityFields, EntityFilter, EntityFilterObject, EntityGraphQLFilter, type EntityHook, EntityKeyJsonHint, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, EntityMetadata, EntityMetrics, type EntityMetricsSnapshot, type EntityOf, type EntityOrId, type EntityQuery, EnumArrayFieldSerde, type EnumCollection, EnumCollectionFieldStatus, EnumCollectionImpl, EnumField, EnumFieldSerde, type EnumMetadata, type EvaluationStats, type ExecuteResult, type ExistsCondition, type ExistsQuery, type Expr, type ExprBrand, type ExprFromInput, type ExprInput, type ExprLike, ExpressionCondition, ExpressionFilter, type ExpressionOrderBy, type FactoryEntityOpt, type FactoryExtrasOf, type FactoryOpts, FailedFlushError, Field, FieldColumn, FieldLogger, FieldLoggerWatch, FieldSerde, FieldStatus, type FieldsOf, FilterAndSettings, type FilterOf, FilterWithAlias, FindCountFilterOptions, FindFilter, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, type GenericError, GraphQLFilterAndSettings, type GraphQLFilterOf, GraphQLFilterWithAlias, type GuardTransitionMatch, type HintNode, IdAssigner, IdOf, type IdType, ImmutableEntitiesPlugin, type InheritanceTypeOf, type InnerJoin, InsertFixup, InsertOp, type InsertStatement, type InsertValues, InstanceData, type JoinColumnValue, type JoinResult, type JoinRow, JoinRowOperation, type JoinRowTodo, JoinTable, type JoinTree, JsonAggregatePreloader, JsonHint, JsonPayload, JsonSerde, Jsonable, JsonableValue, KeySerde, type LargeCollection, LargeOneToManyField, LateralJoinTable, type LazyField, LazyFieldImpl, type LeftJoin, Lens, type LoadHint, type Loadable, type Loaded, type LoadedCollection, type LoadedEnumCollection, type LoadedMethod, type LoadedProperty, type LoadedReadOnlyCollection, type LoadedReference, LoaderCache, ManyToManyCollection, ManyToManyEnumField, ManyToManyField, ManyToManyFieldStatus, ManyToManyLargeCollection, type ManyToManyLike, ManyToOneField, ManyToOneFieldStatus, type ManyToOneReference, ManyToOneReferenceImpl, type MarkLoaded, MaybeAbstractEntityConstructor, type MaybeNull, type MutationReturning, type MutationStatement, type NameOf, NestedJsonHint, type NestedLoadHint, type New, NotFoundError, type NotWidened, type OnTransitionMatch, OneToManyCollection, OneToManyField, OneToManyFieldStatus, OneToManyLargeCollection, OneToOneField, type OneToOneReference, OneToOneReferenceImpl, OpColumn, Operator, type OptIdsOf, type OptsOf, type OrCondition, OrderBy, type OrderByDirection, type OrderByKeys, type OrderOf, ParsedCteClause, type ParsedEntityFilter, type ParsedExpressionCondition, type ParsedExpressionFilter, ParsedFindQuery, ParsedGroupBy, ParsedOrderBy, ParsedSelect, ParsedTable, type ParsedValueFilter, type PendingChange, type PendingCreate, type PendingDelete, type PendingM2M, type PendingUpdate, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, Plugin, PojoRowData, type PolyAlias, PolyComponent, type PolyReference, PolymorphicField, PolymorphicFieldComponent, PolymorphicKeySerde, type PolymorphicReference, PolymorphicReferenceImpl, type PredicateBrand, type PreloadHydrator, type PreloadPlugin, PrimaryKeyField, PrimaryTable, type PrimitiveAlias, type PrimitiveColumn, PrimitiveField, PrimitiveFieldStatus, PrimitiveSerde, type Property, PropertyImpl, type Query, type QueryArg, type QueryCondition, type QueryJoin, type QueryJoinInput, type QueryJoinList, type QueryRow, type QuerySelect, type QuerySource, type QueryTable, type QueryTableBrand, type QueryValue, RandomUuidAssigner, type RawCondition, type Reactable, type Reacted, ReactionLogger, type ReactiveField, type ReactiveGetter, type ReactiveHint, type ReactiveManyToMany, ReactiveManyToManyImpl, type ReactiveManyToManyOtherSide, ReactiveManyToManyOtherSideImpl, type ReactiveReference, ReactiveReferenceImpl, type ReactiveTarget, type ReadDrift, ReadDriftError, type ReadOnlyCollection, ReadOnlyError, RecursiveCycleError, type RecursiveOptions, type Reference, type ReferenceColumn, type ReferenceJoin, type Relation, type RelationsIn, type RelationsOf, type ResolvedJoins, ResolvedScope, type RootTypeNameOf, RowData, type RuntimeConfig, ScalarCodec, type ScalarQuery, Scope, ScopeFilterFragment, ScopeFn, ScopeJoinFilter, ScopeQuery, SequenceIdAssigner, SerdeField, type SetQuery, type SettableFields, SimpleFieldSerde, type SqlCondition, type SqlPredicate, StubbedRelation, type Subquery, type SubqueryBrand, SubqueryRenderer, SuperstructSerde, type Table, type TableBrand, type TableFilter, type TableFor, type TableMgmt, type TableSourceBrand, type TableSourceMgmt, TaggedId, Temporal, TestUuidAssigner, TimestampCodec, TimestampFields, TimestampSerde, ToJsonHint, Todo, TooManyError, type TransitionTable, type TypeMap, type TypeMapEntry, type TypeNameOf, UniqueFilter, UnknownProperty, UpdateOp, type UpdateStatement, type UpdateValues, ValidationCode, type ValidationError, ValidationErrors, type ValidationRule, type ValidationRuleInternal, type ValidationRuleResult, ValueFilter, ValueGraphQLFilter, VectorSerde, type WithInput, type WithLoaded, type WithSource, WriteFn, ZodSerde, ZonedDateTimeSerde, abbreviation, addTablePerClassJoinsAndClassTag, alias, aliases, appendStack, asNew, assertIdIsTagged, assertIdsAreTagged, assertLoaded, assertNever, buildCteSql, buildRawQuery, buildUnnestCte, buildValueCondition, buildWhereClause, cannotBeChanged, cannotBeUpdated, cleanSql, cleanStringValue, configureMetadata, convertToLoadHint, createRowFromEntityData, deTagId, deTagIds, declareTable, deepNormalizeHint, defaultValue, driverAfterBegin, driverAfterCommit, driverApi, driverBeforeBegin, driverBeforeCommit, emptyRowData, ensureLoaded, ensureRectangularArraySizes, ensureTagged, ensureWithLoaded, entityQueryBrand, expr, exprBrand, factories, fail, failIfAnyRejected, filterSoftDeletes, findFilterField, generateOps, getAliasMetadata, getAliasMgmt, getBaseAndSelfMetas, getBaseMeta, getBaseSelfAndSubMetas, getConstructorFromTaggedId, getDefaultEntityLimit, getEmInternalApi, getField, getInstanceData, getLazyFields, getLens, getLensPath, getMaybeCtiAlias, getMetadata, getMetadataForField, getMetadataForTable, getMetadataForType, getProperties, getRuntimeConfig, getSubMetas, getTableMetadata, getTableMgmt, getTables, getTestIndex, hasAsyncMethod, hasAsyncProperty, hasAsyncReactiveField, hasCustomCollection, hasCustomReference, hasEnumCollection, hasLargeMany, hasLargeManyToMany, hasLazyField, hasMany, hasManyDerived, hasManyThrough, hasManyToMany, hasOne, hasOneDerived, hasOnePolymorphic, hasOneThrough, hasOneToOne, hasProperty, hasReactiveAsyncMethod, hasReactiveField, hasReactiveGetter, hasReactiveManyToMany, hasReactiveManyToManyOtherSide, hasReactiveProperty, hasReactiveReference, hasRecursiveChildren, hasRecursiveM2m, hasRecursiveParents, hasSerde, indexBy, invokeRule, isAlias, isAllSqlPaths, isAsyncProperty, isAsyncReactiveField, isChangeableField, isCollection, isCollectionField, isDefined, isEntity, isFactoryCreation, isFieldSet, isId, isInTrustedContext, isKey, isLazyField, isLensLoaded, isLensLoadedPath, isLoaded, isLoadedAsyncProperty, isLoadedCollection, isLoadedLazyField, isLoadedOneToOneReference, isLoadedProperty, isLoadedReadOnlyCollection, isLoadedReference, isManyToManyEnumField, isManyToManyField, isManyToOneField, isManyToOneReference, isNew, isOneToManyField, isOneToOneField, isOneToOneReference, isPolymorphicField, isPolymorphicReference, isProperty, isReactiveField, isReactiveGetter, isReactiveManyToMany, isReactiveManyToManyOtherSide, isReactiveReference, isReadOnlyCollection, isReference, isReferenceField, isRelation, isScope, isScopeJoinFilter, isSelectAllFilter, isTable, isTaggedId, isTypeOrSubType, keyToNumber, keyToTaggedId, kq, kqDot, kqStar, lazyExcludedSelects, lazyField, lensPathToLoadHint, lensToLoadHint, lensToPath, loadLens, loadLensPath, makeLike, mapPathsToTarget, mapToDb, maxValueRule, maybeAddIdNotNulls, maybeAddNotSoftDeleted, maybeAddOrderBy, maybeBranchValue, maybeGetConstructorFromReference, maybeNew, maybeNewPoly, maybePopulateThen, maybeRequireTemporal, maybeResolveReferenceToId, mergeFindOptions, minValueRule, mustBeSubType, newAliasProxy, newChangesProxy, newPgConnectionConfig, newRequiredLazyFieldRule, newRequiredRule, newScopeFn, newTableProxy, newTestInstance, noValue, noopFieldLogger, normalizeHint, nowUTC, opToFn, operators, optimizeCollectionJoins, parseAlias, parseEntityFilter, parseFindQuery, parseValueFilter, partition, plainDateMapper, plainDateTimeMapper, plainTimeMapper, polymorphicField, query, queryMaybe, rangeValueRule, recursiveQuery, requireTemporal, resetBootFlag, resetDefaultEntityLimit, resolveScope, reverseReactiveHint, runInTrustedContext, sameEntity, sameReference, setDefaultEntityLimit, setFactoryLogging, setFactoryWriter, setField, setLastNow, setReactionLogging, setRuntimeConfig, setTaggedIdDelimiter, skipCondition, sql, stiSubtypeFilter, subqueryBrand, table, tableMgmt, tables, tagFromId, tagId, tagIds, taggedIdPrefix, testIndex, toIdOf, toJSON, toTaggedId, unsafeDeTagIds, unsafeLoaded, updatePartial, upsert, visitConditions, withLoaded, zeroTo, zonedDateTimeMapper };
180
184
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0Ba;;;;;cACA;2BAAA;;UAyRH,UAAU;EAClB,QAAQ;;KAGE,OAAO,GAAG,WAAW,IAAI,UAAU;;;;;;;;;;;;;;;iBAgB/B,QAAQ,UAAU,QAChC,QAAQ,GACR,QAAQ,QAAQ,OAAO,iBACvB;EAAS;EAAmB;;;;;;;;;iBAoBd,OAAO,UAAU,QAC/B,MAAM,eAAe,IACrB,QAAQ,GACR,aACA,aACA,mBACA;iBAwDc,iBAAiB,QAAQ,QAAQ;;KAOrC,cAAc,QACvB,WAAW,KAAK,EAAE;iBAGL,gBAAgB,UAAU,QAAQ,QAAQ;iBAC1C,gBAAgB,UAAU,QAAQ,MAAM,kBAAkB;iBAO1D,aAAa,QAAQ,SAAS;iBAM9B,mBAAmB,QAAQ,kBAAkB;;iBAO7C,eAAe,UAAU,QAAQ,MAAM,+BAA+B,KAAK,kBAAkB;;;;;;;;cAWhG,kBAAkB;;iBAGf,YAAY;;;;;;iBASZ,YAAY,UAAU,QAAQ,QAAQ,IAAI,UAAU,IAAI"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA0Ba;;;;;qBACA;2BAAA;;UA8RH,UAAU;EAClB,QAAQ;;YAGE,OAAO,GAAG,WAAW,IAAI,UAAU;;;;;;;;;;;;;;;wBAgB/B,QAAQ,UAAU,QAChC,QAAQ,GACR,QAAQ,QAAQ,OAAO,iBACvB;EAAS;EAAmB;;;;;;;;;wBAoBd,OAAO,UAAU,QAC/B,MAAM,eAAe,IACrB,QAAQ,GACR,aACA,aACA,mBACA;wBA6Dc,iBAAiB,QAAQ,QAAQ;;YAOrC,cAAc,QACvB,WAAW,KAAK,EAAE;wBAGL,gBAAgB,UAAU,QAAQ,QAAQ;wBAC1C,gBAAgB,UAAU,QAAQ,MAAM,kBAAkB;wBAO1D,aAAa,QAAQ,SAAS;wBAM9B,mBAAmB,QAAQ,kBAAkB;;wBAO7C,eAAe,UAAU,QAAQ,MAAM,+BAA+B,KAAK,kBAAkB;;;;;;;;qBAWhG,kBAAkB;;wBAGf,YAAY;;;;;;wBASZ,YAAY,UAAU,QAAQ,QAAQ,IAAI,UAAU,IAAI"}
package/build/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ActualFactoryOpts, ColumnsOf, EntityOf, FactoryExtrasOf, FieldsOf, FilterOf, GraphQLFilterOf, InheritanceTypeOf, OptIdsOf, OptsOf, OrderOf, RelationsOf, RootTypeNameOf, TypeMap, TypeMapEntry, TypeNameOf } from "./typeMap.mjs";
2
2
  import { Changes, EntityChanges, EnumCollectionFieldStatus, FieldStatus, ManyToManyFieldStatus, ManyToOneFieldStatus, OneToManyFieldStatus, PrimitiveFieldStatus, newChangesProxy } from "./changes.mjs";
3
+ import { EntityMetrics, EntityMetricsSnapshot, EvaluationStats } from "./metrics/EntityMetrics.mjs";
3
4
  import { deepNormalizeHint, normalizeHint } from "./normalizeHints.mjs";
4
5
  import { Collection, LoadedCollection, isCollection, isLoadedCollection } from "./relations/Collection.mjs";
5
6
  import { AbstractRelationImpl } from "./relations/AbstractRelationImpl.mjs";
@@ -8,6 +9,7 @@ import { EnumMetadata } from "./EnumMetadata.mjs";
8
9
  import { EnumCollection, EnumCollectionImpl, LoadedEnumCollection, hasEnumCollection } from "./relations/EnumCollection.mjs";
9
10
  import { CustomReference, hasCustomReference } from "./relations/CustomReference.mjs";
10
11
  import { AsyncMethod, LoadedMethod, hasAsyncMethod } from "./relations/hasAsyncMethod.mjs";
12
+ import { hasReactiveAsyncMethod } from "./relations/hasReactiveAsyncMethod.mjs";
11
13
  import { LoadedProperty, Property, PropertyImpl, hasProperty, hasReactiveProperty, isLoadedProperty, isProperty } from "./relations/hasProperty.mjs";
12
14
  import { AsyncProperty, AsyncPropertyImpl, hasAsyncProperty, isAsyncProperty, isLoadedAsyncProperty } from "./relations/AsyncProperty.mjs";
13
15
  import { LazyField, LazyFieldImpl, hasLazyField, isLazyField, isLoadedLazyField } from "./relations/LazyField.mjs";
@@ -49,9 +51,10 @@ import { abbreviation, asNew, assertNever, cleanSql, cleanStringValue, fail, fai
49
51
  import { DeepNew, LoadHint, Loadable, Loaded, MarkLoaded, NestedLoadHint, New, RelationsIn, assertLoaded, ensureLoaded, isLoaded, isNew, maybePopulateThen, unsafeLoaded } from "./loading/loadHints.mjs";
50
52
  import { Reactable, Reacted, ReactiveHint, ReactiveTarget, convertToLoadHint, isTypeOrSubType, reverseReactiveHint } from "./reactivity/reactiveHints.mjs";
51
53
  import { GenericError, ValidationCode, ValidationError, ValidationErrors, ValidationRule, ValidationRuleInternal, ValidationRuleResult, cannotBeChanged, cannotBeUpdated, maxValueRule, minValueRule, mustBeSubType, newRequiredLazyFieldRule, newRequiredRule, rangeValueRule } from "./rules.mjs";
54
+ import { GuardTransitionMatch, OnTransitionMatch, TransitionTable } from "./transitions.mjs";
52
55
  import { ConfigApi, EntityHook, resetBootFlag } from "./config.mjs";
53
56
  import { Temporal, maybeRequireTemporal, requireTemporal } from "./serde/temporal.mjs";
54
- import { BigIntSerde, CustomSerde, CustomSerdeAdapter, DateSerde, DecimalToNumberSerde, EnumArrayFieldSerde, EnumFieldSerde, JsonSerde, KeySerde, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, PrimitiveSerde, ScalarCodec, SuperstructSerde, TimestampCodec, ZodSerde, ZonedDateTimeSerde } from "./serde/serde.mjs";
57
+ import { BigIntSerde, CustomSerde, CustomSerdeAdapter, DateSerde, DecimalToNumberSerde, EnumArrayFieldSerde, EnumFieldSerde, JsonSerde, KeySerde, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, PrimitiveSerde, ScalarCodec, SuperstructSerde, TimestampCodec, VectorSerde, ZodSerde, ZonedDateTimeSerde } from "./serde/serde.mjs";
55
58
  import { Column, ColumnDescriptors } from "./serde/columns.mjs";
56
59
  import { DeleteOp, InsertFixup, InsertOp, OpColumn, UpdateOp, generateOps } from "./drivers/EntityWriter.mjs";
57
60
  import { PojoRowData, RowData, emptyRowData } from "./RowData.mjs";
@@ -67,11 +70,12 @@ import { ExprFromInput, ExprInput } from "./queries/sql/expressions/types.mjs";
67
70
  import { expr } from "./queries/sql/expressions/expression.mjs";
68
71
  import { CustomColumnConfig, CustomColumnInput, CustomColumnInputs, CustomColumnType, CustomTable, CustomTableDefinition, CustomTableFor, declareTable } from "./queries/sql/custom.mjs";
69
72
  import { CollectionJoin, EntityColumn, PolyReference, PrimitiveColumn, ReferenceColumn, ReferenceJoin, Table, TableBrand, TableFilter, TableFor, TableMgmt, TableSourceBrand, TableSourceMgmt, getTableMetadata, getTableMgmt, isTable, newTableProxy, table, tableMgmt, tables } from "./queries/sql/Tables.mjs";
70
- import { CheckScope, Clauses, EntityQuery, ExistsQuery, ExpressionOrderBy, MaybeNull, NameOf, NotWidened, OrderByDirection, OrderByKeys, Query, QueryArg, QueryCondition, QueryJoin, QueryJoinInput, QueryJoinList, QueryRow, QuerySelect, QuerySource, QueryValue, RecursiveOptions, ResolvedJoins, ScalarQuery, SetQuery, Subquery, SubqueryBrand, WithInput, WithSource, entityQueryBrand, query, queryMaybe, recursiveQuery, sql, subqueryBrand } from "./queries/sql/query.mjs";
73
+ import { CheckScope, Clauses, EntityQuery, ExistsQuery, ExpressionOrderBy, MaybeNull, NameOf, NotWidened, OrderByDirection, OrderByKeys, Query, QueryArg, QueryCondition, QueryJoin, QueryJoinInput, QueryJoinList, QueryRow, QuerySelect, QuerySource, QueryTable, QueryTableBrand, QueryValue, RecursiveOptions, ResolvedJoins, ScalarQuery, SetQuery, Subquery, SubqueryBrand, WithInput, WithSource, entityQueryBrand, query, queryMaybe, recursiveQuery, sql, subqueryBrand } from "./queries/sql/query.mjs";
71
74
  import { ArrayAggOptions, Expr, ExprBrand, ExprLike, InnerJoin, LeftJoin, exprBrand } from "./queries/sql/Expr.mjs";
72
75
  import { JoinTree } from "./queries/sql/JoinTree.mjs";
73
76
  import { ConditionBuilder } from "./queries/ConditionBuilder.mjs";
74
77
  import { EntityField, EntityFields, SettableFields } from "./EntityFields.mjs";
78
+ import { ReadDrift, ReadDriftError } from "./flush/ReadDrift.mjs";
75
79
  import { EntityOrId, HintNode } from "./loading/HintTree.mjs";
76
80
  import { JoinResult, PreloadHydrator, PreloadPlugin } from "./plugins/PreloadPlugin.mjs";
77
81
  import { Driver, DriverQueryResult } from "./drivers/Driver.mjs";
@@ -107,23 +111,23 @@ import { isInTrustedContext, runInTrustedContext } from "./trusted.mjs";
107
111
  import { buildUnnestCte, ensureRectangularArraySizes } from "./queries/unnest.mjs";
108
112
  import { DeepPartialOrNull, updatePartial, upsert } from "./upsert.mjs";
109
113
  import { StubbedRelation, WithLoaded, ensureWithLoaded, withLoaded } from "./loading/withLoaded.mjs";
110
- import { EntityConstructor, EntityManager, EntityManagerHook, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, FindCountFilterOptions, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, IdOf, LoaderCache, MaybeAbstractEntityConstructor, NotFoundError, ReadOnlyError, TaggedId, TimestampFields, TooManyError, appendStack, createRowFromEntityData, driverAfterBegin, driverAfterCommit, driverBeforeBegin, driverBeforeCommit, getDefaultEntityLimit, getEmInternalApi, isDefined, isId, isKey, resetDefaultEntityLimit, sameEntity, sameReference, setDefaultEntityLimit, setLastNow } from "./EntityManager.mjs";
114
+ import { CloneOverrides, CloneOverridesCallback, ClonePostClone, CloneSkipIf, EntityConstructor, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, FailedFlushError, FindCountFilterOptions, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, IdOf, LoaderCache, MaybeAbstractEntityConstructor, NotFoundError, ReadOnlyError, TaggedId, TimestampFields, TooManyError, appendStack, createRowFromEntityData, driverAfterBegin, driverAfterCommit, driverBeforeBegin, driverBeforeCommit, getDefaultEntityLimit, getEmInternalApi, invokeRule, isDefined, isId, isKey, resetDefaultEntityLimit, sameEntity, sameReference, setDefaultEntityLimit, setLastNow } from "./EntityManager.mjs";
111
115
  import { Entity, IdType, isEntity } from "./Entity.mjs";
112
116
  import { BaseEntity, getInstanceData } from "./BaseEntity.mjs";
113
117
  import { newPgConnectionConfig } from "joist-utils";
114
118
  //#region src/index.d.ts
115
- declare const testing: {
119
+ export declare const testing: {
116
120
  isAllSqlPaths: typeof isAllSqlPaths;
117
121
  getDefaultDependencies: typeof getDefaultDependencies;
118
122
  partitionHint: typeof partitionHint;
119
123
  };
120
- declare const internals: {
124
+ export declare const internals: {
121
125
  buildWhereClause: typeof buildWhereClause;
122
126
  };
123
127
  interface Flavoring<FlavorT> {
124
128
  _type?: FlavorT;
125
129
  }
126
- type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
130
+ export type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
127
131
  /**
128
132
  * Sets each value in `values` on the current entity.
129
133
  *
@@ -138,7 +142,7 @@ type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
138
142
  * use `values` being a primary key to short-circuit and let hydration callers assign the values
139
143
  * returned by the serde `fromRow` methods.
140
144
  */
141
- declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>> | undefined, opts?: {
145
+ export declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>> | undefined, opts?: {
142
146
  partial?: boolean;
143
147
  calledFromConstructor?: boolean;
144
148
  }): void;
@@ -149,16 +153,16 @@ declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>>
149
153
  * - We catch missing/invalid field names
150
154
  * - We handle FactoryInitialValues
151
155
  */
152
- declare function setOpt<T extends Entity>(meta: EntityMetadata<T>, entity: T, key: string, _value: any, partial?: boolean, calledFromConstructor?: boolean): void;
153
- declare function ensureNotDeleted(entity: Entity, ignore?: "pending"): void;
156
+ export declare function setOpt<T extends Entity>(meta: EntityMetadata<T>, entity: T, key: string, _value: any, partial?: boolean, calledFromConstructor?: boolean): void;
157
+ export declare function ensureNotDeleted(entity: Entity, ignore?: "pending"): void;
154
158
  /** Adds `null` to every key in `T` to accept partial-update-style input. */
155
- type PartialOrNull<T> = { [P in keyof T]?: T[P] | null; };
156
- declare function getRequiredKeys<T extends Entity>(entity: T): string[];
157
- declare function getRequiredKeys<T extends Entity>(type: EntityConstructor<T>): string[];
158
- declare function getRelations(entity: Entity): AbstractRelationImpl<any, any>[];
159
- declare function getRelationEntries(entity: Entity): [string, AbstractRelationImpl<any, any>][];
159
+ export type PartialOrNull<T> = { [P in keyof T]?: T[P] | null; };
160
+ export declare function getRequiredKeys<T extends Entity>(entity: T): string[];
161
+ export declare function getRequiredKeys<T extends Entity>(type: EntityConstructor<T>): string[];
162
+ export declare function getRelations(entity: Entity): AbstractRelationImpl<any, any>[];
163
+ export declare function getRelationEntries(entity: Entity): [string, AbstractRelationImpl<any, any>][];
160
164
  /** Casts a "maybe abstract" cstr to a concrete cstr when the calling code knows it's safe. */
161
- declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): EntityConstructor<T>;
165
+ export declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): EntityConstructor<T>;
162
166
  /**
163
167
  * Thrown when `.id` is accessed on an entity that does not have an id yet.
164
168
  *
@@ -166,15 +170,15 @@ declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConst
166
170
  * `em.assignNewIds()`. Other databases typically require INSERTs to trigger the auto
167
171
  * id assignment.
168
172
  */
169
- declare class NoIdError extends Error {}
173
+ export declare class NoIdError extends Error {}
170
174
  /** Throws a `NoIdError` for `entity`, i.e. because `id` was called before being saved. */
171
- declare function failNoIdYet(entity: string): never;
175
+ export declare function failNoIdYet(entity: string): never;
172
176
  /**
173
177
  * Add a static function since getters can't have type guards.
174
178
  *
175
179
  * See https://github.com/microsoft/TypeScript/issues/43368
176
180
  */
177
- declare function isNewEntity<T extends Entity>(entity: T): entity is New<T>;
181
+ export declare function isNewEntity<T extends Entity>(entity: T): entity is New<T>;
178
182
  //#endregion
179
- export { type ActualFactoryOpts, type Alias, AliasAssigner, type AliasBrand, type AliasColumn, AliasFn, type AliasMgmt, type AndCondition, type ArrayAggOptions, type AsyncMethod, type AsyncProperty, AsyncPropertyImpl, BaseEntity, BigIntSerde, BooleanFilter, BooleanGraphQLFilter, type CaseElse, type CaseWhen, Changes, type CheckScope, type Clauses, type Collection, type CollectionJoin, Column, type ColumnCondition, ColumnDescriptors, type ColumnsOf, ConditionBuilder, type ConditionGroup, ConfigApi, CrossJoinTable, CustomCollection, type CustomColumnConfig, type CustomColumnInput, type CustomColumnInputs, type CustomColumnType, CustomJsonKeyHint, CustomReference, CustomSerde, CustomSerdeAdapter, type CustomTable, type CustomTableDefinition, type CustomTableFor, DateSerde, DecimalToNumberSerde, type DeepNew, type DeepPartialOrNull, DeleteOp, type DeleteStatement, type DomainPredicate, type Driver, type DriverQueryResult, type Entity, type EntityAlias, EntityChanges, type EntityColumn, EntityConstructor, type EntityField, type EntityFields, EntityFilter, EntityFilterObject, EntityGraphQLFilter, type EntityHook, EntityKeyJsonHint, EntityManager, EntityManagerHook, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, EntityMetadata, type EntityOf, type EntityOrId, type EntityQuery, EnumArrayFieldSerde, type EnumCollection, EnumCollectionFieldStatus, EnumCollectionImpl, EnumField, EnumFieldSerde, type EnumMetadata, type ExecuteResult, type ExistsCondition, type ExistsQuery, type Expr, type ExprBrand, type ExprFromInput, type ExprInput, type ExprLike, ExpressionCondition, ExpressionFilter, type ExpressionOrderBy, type FactoryEntityOpt, type FactoryExtrasOf, type FactoryOpts, Field, FieldColumn, FieldLogger, FieldLoggerWatch, FieldSerde, FieldStatus, type FieldsOf, FilterAndSettings, type FilterOf, FilterWithAlias, FindCountFilterOptions, FindFilter, FindFilterOptions, FindGqlFilterOptions, FindOperation, Flavor, FlushOptions, type GenericError, GraphQLFilterAndSettings, type GraphQLFilterOf, GraphQLFilterWithAlias, type HintNode, IdAssigner, IdOf, type IdType, ImmutableEntitiesPlugin, type InheritanceTypeOf, type InnerJoin, InsertFixup, InsertOp, type InsertStatement, type InsertValues, InstanceData, type JoinColumnValue, type JoinResult, type JoinRow, JoinRowOperation, type JoinRowTodo, JoinTable, type JoinTree, JsonAggregatePreloader, JsonHint, JsonPayload, JsonSerde, Jsonable, JsonableValue, KeySerde, type LargeCollection, LargeOneToManyField, LateralJoinTable, type LazyField, LazyFieldImpl, type LeftJoin, Lens, type LoadHint, type Loadable, type Loaded, type LoadedCollection, type LoadedEnumCollection, type LoadedMethod, type LoadedProperty, type LoadedReadOnlyCollection, type LoadedReference, LoaderCache, ManyToManyCollection, ManyToManyEnumField, ManyToManyField, ManyToManyFieldStatus, ManyToManyLargeCollection, type ManyToManyLike, ManyToOneField, ManyToOneFieldStatus, type ManyToOneReference, ManyToOneReferenceImpl, type MarkLoaded, MaybeAbstractEntityConstructor, type MaybeNull, type MutationReturning, type MutationStatement, type NameOf, NestedJsonHint, type NestedLoadHint, type New, NoIdError, NotFoundError, type NotWidened, OneToManyCollection, OneToManyField, OneToManyFieldStatus, OneToManyLargeCollection, OneToOneField, type OneToOneReference, OneToOneReferenceImpl, OpColumn, Operator, type OptIdsOf, type OptsOf, type OrCondition, OrderBy, type OrderByDirection, type OrderByKeys, type OrderOf, ParsedCteClause, type ParsedEntityFilter, type ParsedExpressionCondition, type ParsedExpressionFilter, ParsedFindQuery, ParsedGroupBy, ParsedOrderBy, ParsedSelect, ParsedTable, type ParsedValueFilter, PartialOrNull, type PendingChange, type PendingCreate, type PendingDelete, type PendingM2M, type PendingUpdate, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, Plugin, PojoRowData, type PolyAlias, PolyComponent, type PolyReference, PolymorphicField, PolymorphicFieldComponent, PolymorphicKeySerde, type PolymorphicReference, PolymorphicReferenceImpl, type PredicateBrand, type PreloadHydrator, type PreloadPlugin, PrimaryKeyField, PrimaryTable, type PrimitiveAlias, type PrimitiveColumn, PrimitiveField, PrimitiveFieldStatus, PrimitiveSerde, type Property, PropertyImpl, type Query, type QueryArg, type QueryCondition, type QueryJoin, type QueryJoinInput, type QueryJoinList, type QueryRow, type QuerySelect, type QuerySource, type QueryValue, RandomUuidAssigner, type RawCondition, type Reactable, type Reacted, ReactionLogger, type ReactiveField, type ReactiveGetter, type ReactiveHint, type ReactiveManyToMany, ReactiveManyToManyImpl, type ReactiveManyToManyOtherSide, ReactiveManyToManyOtherSideImpl, type ReactiveReference, ReactiveReferenceImpl, type ReactiveTarget, type ReadOnlyCollection, ReadOnlyError, RecursiveCycleError, type RecursiveOptions, type Reference, type ReferenceColumn, type ReferenceJoin, type Relation, type RelationsIn, type RelationsOf, type ResolvedJoins, ResolvedScope, type RootTypeNameOf, RowData, type RuntimeConfig, ScalarCodec, type ScalarQuery, Scope, ScopeFilterFragment, ScopeFn, ScopeJoinFilter, ScopeQuery, SequenceIdAssigner, SerdeField, type SetQuery, type SettableFields, SimpleFieldSerde, type SqlCondition, type SqlPredicate, StubbedRelation, type Subquery, type SubqueryBrand, SubqueryRenderer, SuperstructSerde, type Table, type TableBrand, type TableFilter, type TableFor, type TableMgmt, type TableSourceBrand, type TableSourceMgmt, TaggedId, Temporal, TestUuidAssigner, TimestampCodec, TimestampFields, TimestampSerde, ToJsonHint, Todo, TooManyError, type TypeMap, type TypeMapEntry, type TypeNameOf, UniqueFilter, UnknownProperty, UpdateOp, type UpdateStatement, type UpdateValues, ValidationCode, type ValidationError, ValidationErrors, type ValidationRule, type ValidationRuleInternal, type ValidationRuleResult, ValueFilter, ValueGraphQLFilter, type WithInput, type WithLoaded, type WithSource, WriteFn, ZodSerde, ZonedDateTimeSerde, abbreviation, addTablePerClassJoinsAndClassTag, alias, aliases, appendStack, asConcreteCstr, asNew, assertIdIsTagged, assertIdsAreTagged, assertLoaded, assertNever, buildCteSql, buildRawQuery, buildUnnestCte, buildValueCondition, buildWhereClause, cannotBeChanged, cannotBeUpdated, cleanSql, cleanStringValue, configureMetadata, convertToLoadHint, createRowFromEntityData, deTagId, deTagIds, declareTable, deepNormalizeHint, defaultValue, driverAfterBegin, driverAfterCommit, driverApi, driverBeforeBegin, driverBeforeCommit, emptyRowData, ensureLoaded, ensureNotDeleted, ensureRectangularArraySizes, ensureTagged, ensureWithLoaded, entityQueryBrand, expr, exprBrand, factories, fail, failIfAnyRejected, failNoIdYet, filterSoftDeletes, findFilterField, generateOps, getAliasMetadata, getAliasMgmt, getBaseAndSelfMetas, getBaseMeta, getBaseSelfAndSubMetas, getConstructorFromTaggedId, getDefaultEntityLimit, getEmInternalApi, getField, getInstanceData, getLazyFields, getLens, getLensPath, getMaybeCtiAlias, getMetadata, getMetadataForField, getMetadataForTable, getMetadataForType, getProperties, getRelationEntries, getRelations, getRequiredKeys, getRuntimeConfig, getSubMetas, getTableMetadata, getTableMgmt, getTables, getTestIndex, hasAsyncMethod, hasAsyncProperty, hasAsyncReactiveField, hasCustomCollection, hasCustomReference, hasEnumCollection, hasLargeMany, hasLargeManyToMany, hasLazyField, hasMany, hasManyDerived, hasManyThrough, hasManyToMany, hasOne, hasOneDerived, hasOnePolymorphic, hasOneThrough, hasOneToOne, hasProperty, hasReactiveField, hasReactiveGetter, hasReactiveManyToMany, hasReactiveManyToManyOtherSide, hasReactiveProperty, hasReactiveReference, hasRecursiveChildren, hasRecursiveM2m, hasRecursiveParents, hasSerde, indexBy, internals, isAlias, isAllSqlPaths, isAsyncProperty, isAsyncReactiveField, isChangeableField, isCollection, isCollectionField, isDefined, isEntity, isFactoryCreation, isFieldSet, isId, isInTrustedContext, isKey, isLazyField, isLensLoaded, isLensLoadedPath, isLoaded, isLoadedAsyncProperty, isLoadedCollection, isLoadedLazyField, isLoadedOneToOneReference, isLoadedProperty, isLoadedReadOnlyCollection, isLoadedReference, isManyToManyEnumField, isManyToManyField, isManyToOneField, isManyToOneReference, isNew, isNewEntity, isOneToManyField, isOneToOneField, isOneToOneReference, isPolymorphicField, isPolymorphicReference, isProperty, isReactiveField, isReactiveGetter, isReactiveManyToMany, isReactiveManyToManyOtherSide, isReactiveReference, isReadOnlyCollection, isReference, isReferenceField, isRelation, isScope, isScopeJoinFilter, isSelectAllFilter, isTable, isTaggedId, isTypeOrSubType, keyToNumber, keyToTaggedId, kq, kqDot, kqStar, lazyExcludedSelects, lazyField, lensPathToLoadHint, lensToLoadHint, lensToPath, loadLens, loadLensPath, makeLike, mapPathsToTarget, mapToDb, maxValueRule, maybeAddIdNotNulls, maybeAddNotSoftDeleted, maybeAddOrderBy, maybeBranchValue, maybeGetConstructorFromReference, maybeNew, maybeNewPoly, maybePopulateThen, maybeRequireTemporal, maybeResolveReferenceToId, mergeFindOptions, minValueRule, mustBeSubType, newAliasProxy, newChangesProxy, newPgConnectionConfig, newRequiredLazyFieldRule, newRequiredRule, newScopeFn, newTableProxy, newTestInstance, noValue, noopFieldLogger, normalizeHint, nowUTC, opToFn, operators, optimizeCollectionJoins, parseAlias, parseEntityFilter, parseFindQuery, parseValueFilter, partition, plainDateMapper, plainDateTimeMapper, plainTimeMapper, polymorphicField, query, queryMaybe, rangeValueRule, recursiveQuery, requireTemporal, resetBootFlag, resetDefaultEntityLimit, resolveScope, reverseReactiveHint, runInTrustedContext, sameEntity, sameReference, setDefaultEntityLimit, setFactoryLogging, setFactoryWriter, setField, setLastNow, setOpt, setOpts, setReactionLogging, setRuntimeConfig, setTaggedIdDelimiter, skipCondition, sql, stiSubtypeFilter, subqueryBrand, table, tableMgmt, tables, tagFromId, tagId, tagIds, taggedIdPrefix, testIndex, testing, toIdOf, toJSON, toTaggedId, unsafeDeTagIds, unsafeLoaded, updatePartial, upsert, visitConditions, withLoaded, zeroTo, zonedDateTimeMapper };
183
+ export { type ActualFactoryOpts, type Alias, AliasAssigner, type AliasBrand, type AliasColumn, AliasFn, type AliasMgmt, type AndCondition, type ArrayAggOptions, type AsyncMethod, type AsyncProperty, AsyncPropertyImpl, BaseEntity, BigIntSerde, BooleanFilter, BooleanGraphQLFilter, type CaseElse, type CaseWhen, Changes, type CheckScope, type Clauses, CloneOverrides, CloneOverridesCallback, ClonePostClone, CloneSkipIf, type Collection, type CollectionJoin, Column, type ColumnCondition, ColumnDescriptors, type ColumnsOf, ConditionBuilder, type ConditionGroup, ConfigApi, CrossJoinTable, CustomCollection, type CustomColumnConfig, type CustomColumnInput, type CustomColumnInputs, type CustomColumnType, CustomJsonKeyHint, CustomReference, CustomSerde, CustomSerdeAdapter, type CustomTable, type CustomTableDefinition, type CustomTableFor, DateSerde, DecimalToNumberSerde, type DeepNew, type DeepPartialOrNull, DeleteOp, type DeleteStatement, type DomainPredicate, type Driver, type DriverQueryResult, type Entity, type EntityAlias, EntityChanges, type EntityColumn, EntityConstructor, type EntityField, type EntityFields, EntityFilter, EntityFilterObject, EntityGraphQLFilter, type EntityHook, EntityKeyJsonHint, EntityManager, EntityManagerHook, EntityManagerHookOptions, EntityManagerInternalApi, EntityManagerMode, EntityManagerOpts, EntityMetadata, EntityMetrics, type EntityMetricsSnapshot, type EntityOf, type EntityOrId, type EntityQuery, EnumArrayFieldSerde, type EnumCollection, EnumCollectionFieldStatus, EnumCollectionImpl, EnumField, EnumFieldSerde, type EnumMetadata, type EvaluationStats, type ExecuteResult, type ExistsCondition, type ExistsQuery, type Expr, type ExprBrand, type ExprFromInput, type ExprInput, type ExprLike, ExpressionCondition, ExpressionFilter, type ExpressionOrderBy, type FactoryEntityOpt, type FactoryExtrasOf, type FactoryOpts, FailedFlushError, Field, FieldColumn, FieldLogger, FieldLoggerWatch, FieldSerde, FieldStatus, type FieldsOf, FilterAndSettings, type FilterOf, FilterWithAlias, FindCountFilterOptions, FindFilter, FindFilterOptions, FindGqlFilterOptions, FindOperation, FlushOptions, type GenericError, GraphQLFilterAndSettings, type GraphQLFilterOf, GraphQLFilterWithAlias, type GuardTransitionMatch, type HintNode, IdAssigner, IdOf, type IdType, ImmutableEntitiesPlugin, type InheritanceTypeOf, type InnerJoin, InsertFixup, InsertOp, type InsertStatement, type InsertValues, InstanceData, type JoinColumnValue, type JoinResult, type JoinRow, JoinRowOperation, type JoinRowTodo, JoinTable, type JoinTree, JsonAggregatePreloader, JsonHint, JsonPayload, JsonSerde, Jsonable, JsonableValue, KeySerde, type LargeCollection, LargeOneToManyField, LateralJoinTable, type LazyField, LazyFieldImpl, type LeftJoin, Lens, type LoadHint, type Loadable, type Loaded, type LoadedCollection, type LoadedEnumCollection, type LoadedMethod, type LoadedProperty, type LoadedReadOnlyCollection, type LoadedReference, LoaderCache, ManyToManyCollection, ManyToManyEnumField, ManyToManyField, ManyToManyFieldStatus, ManyToManyLargeCollection, type ManyToManyLike, ManyToOneField, ManyToOneFieldStatus, type ManyToOneReference, ManyToOneReferenceImpl, type MarkLoaded, MaybeAbstractEntityConstructor, type MaybeNull, type MutationReturning, type MutationStatement, type NameOf, NestedJsonHint, type NestedLoadHint, type New, NotFoundError, type NotWidened, type OnTransitionMatch, OneToManyCollection, OneToManyField, OneToManyFieldStatus, OneToManyLargeCollection, OneToOneField, type OneToOneReference, OneToOneReferenceImpl, OpColumn, Operator, type OptIdsOf, type OptsOf, type OrCondition, OrderBy, type OrderByDirection, type OrderByKeys, type OrderOf, ParsedCteClause, type ParsedEntityFilter, type ParsedExpressionCondition, type ParsedExpressionFilter, ParsedFindQuery, ParsedGroupBy, ParsedOrderBy, ParsedSelect, ParsedTable, type ParsedValueFilter, type PendingChange, type PendingCreate, type PendingDelete, type PendingM2M, type PendingUpdate, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, Plugin, PojoRowData, type PolyAlias, PolyComponent, type PolyReference, PolymorphicField, PolymorphicFieldComponent, PolymorphicKeySerde, type PolymorphicReference, PolymorphicReferenceImpl, type PredicateBrand, type PreloadHydrator, type PreloadPlugin, PrimaryKeyField, PrimaryTable, type PrimitiveAlias, type PrimitiveColumn, PrimitiveField, PrimitiveFieldStatus, PrimitiveSerde, type Property, PropertyImpl, type Query, type QueryArg, type QueryCondition, type QueryJoin, type QueryJoinInput, type QueryJoinList, type QueryRow, type QuerySelect, type QuerySource, type QueryTable, type QueryTableBrand, type QueryValue, RandomUuidAssigner, type RawCondition, type Reactable, type Reacted, ReactionLogger, type ReactiveField, type ReactiveGetter, type ReactiveHint, type ReactiveManyToMany, ReactiveManyToManyImpl, type ReactiveManyToManyOtherSide, ReactiveManyToManyOtherSideImpl, type ReactiveReference, ReactiveReferenceImpl, type ReactiveTarget, type ReadDrift, ReadDriftError, type ReadOnlyCollection, ReadOnlyError, RecursiveCycleError, type RecursiveOptions, type Reference, type ReferenceColumn, type ReferenceJoin, type Relation, type RelationsIn, type RelationsOf, type ResolvedJoins, ResolvedScope, type RootTypeNameOf, RowData, type RuntimeConfig, ScalarCodec, type ScalarQuery, Scope, ScopeFilterFragment, ScopeFn, ScopeJoinFilter, ScopeQuery, SequenceIdAssigner, SerdeField, type SetQuery, type SettableFields, SimpleFieldSerde, type SqlCondition, type SqlPredicate, StubbedRelation, type Subquery, type SubqueryBrand, SubqueryRenderer, SuperstructSerde, type Table, type TableBrand, type TableFilter, type TableFor, type TableMgmt, type TableSourceBrand, type TableSourceMgmt, TaggedId, Temporal, TestUuidAssigner, TimestampCodec, TimestampFields, TimestampSerde, ToJsonHint, Todo, TooManyError, type TransitionTable, type TypeMap, type TypeMapEntry, type TypeNameOf, UniqueFilter, UnknownProperty, UpdateOp, type UpdateStatement, type UpdateValues, ValidationCode, type ValidationError, ValidationErrors, type ValidationRule, type ValidationRuleInternal, type ValidationRuleResult, ValueFilter, ValueGraphQLFilter, VectorSerde, type WithInput, type WithLoaded, type WithSource, WriteFn, ZodSerde, ZonedDateTimeSerde, abbreviation, addTablePerClassJoinsAndClassTag, alias, aliases, appendStack, asNew, assertIdIsTagged, assertIdsAreTagged, assertLoaded, assertNever, buildCteSql, buildRawQuery, buildUnnestCte, buildValueCondition, buildWhereClause, cannotBeChanged, cannotBeUpdated, cleanSql, cleanStringValue, configureMetadata, convertToLoadHint, createRowFromEntityData, deTagId, deTagIds, declareTable, deepNormalizeHint, defaultValue, driverAfterBegin, driverAfterCommit, driverApi, driverBeforeBegin, driverBeforeCommit, emptyRowData, ensureLoaded, ensureRectangularArraySizes, ensureTagged, ensureWithLoaded, entityQueryBrand, expr, exprBrand, factories, fail, failIfAnyRejected, filterSoftDeletes, findFilterField, generateOps, getAliasMetadata, getAliasMgmt, getBaseAndSelfMetas, getBaseMeta, getBaseSelfAndSubMetas, getConstructorFromTaggedId, getDefaultEntityLimit, getEmInternalApi, getField, getInstanceData, getLazyFields, getLens, getLensPath, getMaybeCtiAlias, getMetadata, getMetadataForField, getMetadataForTable, getMetadataForType, getProperties, getRuntimeConfig, getSubMetas, getTableMetadata, getTableMgmt, getTables, getTestIndex, hasAsyncMethod, hasAsyncProperty, hasAsyncReactiveField, hasCustomCollection, hasCustomReference, hasEnumCollection, hasLargeMany, hasLargeManyToMany, hasLazyField, hasMany, hasManyDerived, hasManyThrough, hasManyToMany, hasOne, hasOneDerived, hasOnePolymorphic, hasOneThrough, hasOneToOne, hasProperty, hasReactiveAsyncMethod, hasReactiveField, hasReactiveGetter, hasReactiveManyToMany, hasReactiveManyToManyOtherSide, hasReactiveProperty, hasReactiveReference, hasRecursiveChildren, hasRecursiveM2m, hasRecursiveParents, hasSerde, indexBy, invokeRule, isAlias, isAllSqlPaths, isAsyncProperty, isAsyncReactiveField, isChangeableField, isCollection, isCollectionField, isDefined, isEntity, isFactoryCreation, isFieldSet, isId, isInTrustedContext, isKey, isLazyField, isLensLoaded, isLensLoadedPath, isLoaded, isLoadedAsyncProperty, isLoadedCollection, isLoadedLazyField, isLoadedOneToOneReference, isLoadedProperty, isLoadedReadOnlyCollection, isLoadedReference, isManyToManyEnumField, isManyToManyField, isManyToOneField, isManyToOneReference, isNew, isOneToManyField, isOneToOneField, isOneToOneReference, isPolymorphicField, isPolymorphicReference, isProperty, isReactiveField, isReactiveGetter, isReactiveManyToMany, isReactiveManyToManyOtherSide, isReactiveReference, isReadOnlyCollection, isReference, isReferenceField, isRelation, isScope, isScopeJoinFilter, isSelectAllFilter, isTable, isTaggedId, isTypeOrSubType, keyToNumber, keyToTaggedId, kq, kqDot, kqStar, lazyExcludedSelects, lazyField, lensPathToLoadHint, lensToLoadHint, lensToPath, loadLens, loadLensPath, makeLike, mapPathsToTarget, mapToDb, maxValueRule, maybeAddIdNotNulls, maybeAddNotSoftDeleted, maybeAddOrderBy, maybeBranchValue, maybeGetConstructorFromReference, maybeNew, maybeNewPoly, maybePopulateThen, maybeRequireTemporal, maybeResolveReferenceToId, mergeFindOptions, minValueRule, mustBeSubType, newAliasProxy, newChangesProxy, newPgConnectionConfig, newRequiredLazyFieldRule, newRequiredRule, newScopeFn, newTableProxy, newTestInstance, noValue, noopFieldLogger, normalizeHint, nowUTC, opToFn, operators, optimizeCollectionJoins, parseAlias, parseEntityFilter, parseFindQuery, parseValueFilter, partition, plainDateMapper, plainDateTimeMapper, plainTimeMapper, polymorphicField, query, queryMaybe, rangeValueRule, recursiveQuery, requireTemporal, resetBootFlag, resetDefaultEntityLimit, resolveScope, reverseReactiveHint, runInTrustedContext, sameEntity, sameReference, setDefaultEntityLimit, setFactoryLogging, setFactoryWriter, setField, setLastNow, setReactionLogging, setRuntimeConfig, setTaggedIdDelimiter, skipCondition, sql, stiSubtypeFilter, subqueryBrand, table, tableMgmt, tables, tagFromId, tagId, tagIds, taggedIdPrefix, testIndex, toIdOf, toJSON, toTaggedId, unsafeDeTagIds, unsafeLoaded, updatePartial, upsert, visitConditions, withLoaded, zeroTo, zonedDateTimeMapper };
180
184
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0Ba;;;;;cACA;2BAAA;;UAyRH,UAAU;EAClB,QAAQ;;KAGE,OAAO,GAAG,WAAW,IAAI,UAAU;;;;;;;;;;;;;;;iBAgB/B,QAAQ,UAAU,QAChC,QAAQ,GACR,QAAQ,QAAQ,OAAO,iBACvB;EAAS;EAAmB;;;;;;;;;iBAoBd,OAAO,UAAU,QAC/B,MAAM,eAAe,IACrB,QAAQ,GACR,aACA,aACA,mBACA;iBAwDc,iBAAiB,QAAQ,QAAQ;;KAOrC,cAAc,QACvB,WAAW,KAAK,EAAE;iBAGL,gBAAgB,UAAU,QAAQ,QAAQ;iBAC1C,gBAAgB,UAAU,QAAQ,MAAM,kBAAkB;iBAO1D,aAAa,QAAQ,SAAS;iBAM9B,mBAAmB,QAAQ,kBAAkB;;iBAO7C,eAAe,UAAU,QAAQ,MAAM,+BAA+B,KAAK,kBAAkB;;;;;;;;cAWhG,kBAAkB;;iBAGf,YAAY;;;;;;iBASZ,YAAY,UAAU,QAAQ,QAAQ,IAAI,UAAU,IAAI"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA0Ba;;;;;qBACA;2BAAA;;UA8RH,UAAU;EAClB,QAAQ;;YAGE,OAAO,GAAG,WAAW,IAAI,UAAU;;;;;;;;;;;;;;;wBAgB/B,QAAQ,UAAU,QAChC,QAAQ,GACR,QAAQ,QAAQ,OAAO,iBACvB;EAAS;EAAmB;;;;;;;;;wBAoBd,OAAO,UAAU,QAC/B,MAAM,eAAe,IACrB,QAAQ,GACR,aACA,aACA,mBACA;wBA6Dc,iBAAiB,QAAQ,QAAQ;;YAOrC,cAAc,QACvB,WAAW,KAAK,EAAE;wBAGL,gBAAgB,UAAU,QAAQ,QAAQ;wBAC1C,gBAAgB,UAAU,QAAQ,MAAM,kBAAkB;wBAO1D,aAAa,QAAQ,SAAS;wBAM9B,mBAAmB,QAAQ,kBAAkB;;wBAO7C,eAAe,UAAU,QAAQ,MAAM,+BAA+B,KAAK,kBAAkB;;;;;;;;qBAWhG,kBAAkB;;wBAGf,YAAY;;;;;;wBASZ,YAAY,UAAU,QAAQ,QAAQ,IAAI,UAAU,IAAI"}