joist-orm 1.294.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{drivers/PostgresDriver.d.ts → PostgresDriver.d.ts} +1 -4
- package/build/PostgresDriver.d.ts.map +1 -0
- package/build/{drivers/PostgresDriver.js → PostgresDriver.js} +49 -58
- package/build/PostgresDriver.js.map +1 -0
- package/build/codegen.d.ts +2 -0
- package/build/codegen.d.ts.map +1 -0
- package/build/codegen.js +29 -0
- package/build/codegen.js.map +1 -0
- package/build/graphql-codegen-export.d.ts +2 -0
- package/build/graphql-codegen-export.d.ts.map +1 -0
- package/build/{drivers/index.js → graphql-codegen-export.js} +3 -5
- package/build/graphql-codegen-export.js.map +1 -0
- package/build/graphql-export.d.ts +2 -0
- package/build/graphql-export.d.ts.map +1 -0
- package/build/graphql-export.js +19 -0
- package/build/graphql-export.js.map +1 -0
- package/build/index.d.ts +3 -128
- package/build/index.d.ts.map +1 -1
- package/build/index.js +8 -284
- package/build/index.js.map +1 -1
- package/build/knex-export.d.ts +2 -0
- package/build/knex-export.d.ts.map +1 -0
- package/build/knex-export.js +19 -0
- package/build/knex-export.js.map +1 -0
- package/build/pg-migrate.d.ts +2 -0
- package/build/pg-migrate.d.ts.map +1 -0
- package/build/pg-migrate.js +30 -0
- package/build/pg-migrate.js.map +1 -0
- package/build/postgres-driver.d.ts +2 -0
- package/build/postgres-driver.d.ts.map +1 -0
- package/build/postgres-driver.js +7 -0
- package/build/postgres-driver.js.map +1 -0
- package/build/tests-export.d.ts +2 -0
- package/build/tests-export.d.ts.map +1 -0
- package/build/tests-export.js +19 -0
- package/build/tests-export.js.map +1 -0
- package/package.json +85 -16
- package/build/AliasAssigner.d.ts +0 -7
- package/build/AliasAssigner.d.ts.map +0 -1
- package/build/AliasAssigner.js +0 -30
- package/build/AliasAssigner.js.map +0 -1
- package/build/Aliases.d.ts +0 -110
- package/build/Aliases.d.ts.map +0 -1
- package/build/Aliases.js +0 -456
- package/build/Aliases.js.map +0 -1
- package/build/BaseEntity.d.ts +0 -66
- package/build/BaseEntity.d.ts.map +0 -1
- package/build/BaseEntity.js +0 -120
- package/build/BaseEntity.js.map +0 -1
- package/build/ConditionBuilder.d.ts +0 -50
- package/build/ConditionBuilder.d.ts.map +0 -1
- package/build/ConditionBuilder.js +0 -178
- package/build/ConditionBuilder.js.map +0 -1
- package/build/Entity.d.ts +0 -38
- package/build/Entity.d.ts.map +0 -1
- package/build/Entity.js +0 -8
- package/build/Entity.js.map +0 -1
- package/build/EntityFields.d.ts +0 -37
- package/build/EntityFields.d.ts.map +0 -1
- package/build/EntityFields.js +0 -3
- package/build/EntityFields.js.map +0 -1
- package/build/EntityFilter.d.ts +0 -113
- package/build/EntityFilter.d.ts.map +0 -1
- package/build/EntityFilter.js +0 -3
- package/build/EntityFilter.js.map +0 -1
- package/build/EntityGraphQLFilter.d.ts +0 -51
- package/build/EntityGraphQLFilter.d.ts.map +0 -1
- package/build/EntityGraphQLFilter.js +0 -54
- package/build/EntityGraphQLFilter.js.map +0 -1
- package/build/EntityManager.d.ts +0 -734
- package/build/EntityManager.d.ts.map +0 -1
- package/build/EntityManager.js +0 -2075
- package/build/EntityManager.js.map +0 -1
- package/build/EntityMetadata.d.ts +0 -185
- package/build/EntityMetadata.d.ts.map +0 -1
- package/build/EntityMetadata.js +0 -61
- package/build/EntityMetadata.js.map +0 -1
- package/build/EnumMetadata.d.ts +0 -15
- package/build/EnumMetadata.d.ts.map +0 -1
- package/build/EnumMetadata.js +0 -3
- package/build/EnumMetadata.js.map +0 -1
- package/build/FlushLock.d.ts +0 -26
- package/build/FlushLock.d.ts.map +0 -1
- package/build/FlushLock.js +0 -57
- package/build/FlushLock.js.map +0 -1
- package/build/HintTree.d.ts +0 -42
- package/build/HintTree.d.ts.map +0 -1
- package/build/HintTree.js +0 -64
- package/build/HintTree.js.map +0 -1
- package/build/IndexManager.d.ts +0 -30
- package/build/IndexManager.d.ts.map +0 -1
- package/build/IndexManager.js +0 -206
- package/build/IndexManager.js.map +0 -1
- package/build/InstanceData.d.ts +0 -59
- package/build/InstanceData.d.ts.map +0 -1
- package/build/InstanceData.js +0 -162
- package/build/InstanceData.js.map +0 -1
- package/build/IsLoadedCache.d.ts +0 -32
- package/build/IsLoadedCache.d.ts.map +0 -1
- package/build/IsLoadedCache.js +0 -80
- package/build/IsLoadedCache.js.map +0 -1
- package/build/JoinRows.d.ts +0 -75
- package/build/JoinRows.d.ts.map +0 -1
- package/build/JoinRows.js +0 -246
- package/build/JoinRows.js.map +0 -1
- package/build/PluginManager.d.ts +0 -90
- package/build/PluginManager.d.ts.map +0 -1
- package/build/PluginManager.js +0 -97
- package/build/PluginManager.js.map +0 -1
- package/build/QueryParser.d.ts +0 -271
- package/build/QueryParser.d.ts.map +0 -1
- package/build/QueryParser.js +0 -853
- package/build/QueryParser.js.map +0 -1
- package/build/QueryParser.pruning.d.ts +0 -5
- package/build/QueryParser.pruning.d.ts.map +0 -1
- package/build/QueryParser.pruning.js +0 -118
- package/build/QueryParser.pruning.js.map +0 -1
- package/build/QueryVisitor.d.ts +0 -19
- package/build/QueryVisitor.d.ts.map +0 -1
- package/build/QueryVisitor.js +0 -84
- package/build/QueryVisitor.js.map +0 -1
- package/build/ReactionsManager.d.ts +0 -84
- package/build/ReactionsManager.d.ts.map +0 -1
- package/build/ReactionsManager.js +0 -308
- package/build/ReactionsManager.js.map +0 -1
- package/build/Todo.d.ts +0 -31
- package/build/Todo.d.ts.map +0 -1
- package/build/Todo.js +0 -73
- package/build/Todo.js.map +0 -1
- package/build/caches.d.ts +0 -6
- package/build/caches.d.ts.map +0 -1
- package/build/caches.js +0 -42
- package/build/caches.js.map +0 -1
- package/build/changes.d.ts +0 -79
- package/build/changes.d.ts.map +0 -1
- package/build/changes.js +0 -251
- package/build/changes.js.map +0 -1
- package/build/config.d.ts +0 -237
- package/build/config.d.ts.map +0 -1
- package/build/config.js +0 -298
- package/build/config.js.map +0 -1
- package/build/config.test.d.ts +0 -2
- package/build/config.test.d.ts.map +0 -1
- package/build/config.test.js +0 -53
- package/build/config.test.js.map +0 -1
- package/build/configure.d.ts +0 -13
- package/build/configure.d.ts.map +0 -1
- package/build/configure.js +0 -329
- package/build/configure.js.map +0 -1
- package/build/dataloaders/findByUniqueDataLoader.d.ts +0 -7
- package/build/dataloaders/findByUniqueDataLoader.d.ts.map +0 -1
- package/build/dataloaders/findByUniqueDataLoader.js +0 -47
- package/build/dataloaders/findByUniqueDataLoader.js.map +0 -1
- package/build/dataloaders/findCountDataLoader.d.ts +0 -7
- package/build/dataloaders/findCountDataLoader.d.ts.map +0 -1
- package/build/dataloaders/findCountDataLoader.js +0 -74
- package/build/dataloaders/findCountDataLoader.js.map +0 -1
- package/build/dataloaders/findDataLoader.d.ts +0 -37
- package/build/dataloaders/findDataLoader.d.ts.map +0 -1
- package/build/dataloaders/findDataLoader.js +0 -337
- package/build/dataloaders/findDataLoader.js.map +0 -1
- package/build/dataloaders/findIdsDataLoader.d.ts +0 -7
- package/build/dataloaders/findIdsDataLoader.d.ts.map +0 -1
- package/build/dataloaders/findIdsDataLoader.js +0 -74
- package/build/dataloaders/findIdsDataLoader.js.map +0 -1
- package/build/dataloaders/findOrCreateDataLoader.d.ts +0 -13
- package/build/dataloaders/findOrCreateDataLoader.d.ts.map +0 -1
- package/build/dataloaders/findOrCreateDataLoader.js +0 -174
- package/build/dataloaders/findOrCreateDataLoader.js.map +0 -1
- package/build/dataloaders/lensDataLoader.d.ts +0 -12
- package/build/dataloaders/lensDataLoader.d.ts.map +0 -1
- package/build/dataloaders/lensDataLoader.js +0 -180
- package/build/dataloaders/lensDataLoader.js.map +0 -1
- package/build/dataloaders/loadDataLoader.d.ts +0 -11
- package/build/dataloaders/loadDataLoader.d.ts.map +0 -1
- package/build/dataloaders/loadDataLoader.js +0 -54
- package/build/dataloaders/loadDataLoader.js.map +0 -1
- package/build/dataloaders/manyToManyDataLoader.d.ts +0 -8
- package/build/dataloaders/manyToManyDataLoader.d.ts.map +0 -1
- package/build/dataloaders/manyToManyDataLoader.js +0 -74
- package/build/dataloaders/manyToManyDataLoader.js.map +0 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.ts +0 -8
- package/build/dataloaders/manyToManyFindDataLoader.d.ts.map +0 -1
- package/build/dataloaders/manyToManyFindDataLoader.js +0 -70
- package/build/dataloaders/manyToManyFindDataLoader.js.map +0 -1
- package/build/dataloaders/oneToManyDataLoader.d.ts +0 -7
- package/build/dataloaders/oneToManyDataLoader.d.ts.map +0 -1
- package/build/dataloaders/oneToManyDataLoader.js +0 -60
- package/build/dataloaders/oneToManyDataLoader.js.map +0 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.ts +0 -8
- package/build/dataloaders/oneToManyFindDataLoader.d.ts.map +0 -1
- package/build/dataloaders/oneToManyFindDataLoader.js +0 -71
- package/build/dataloaders/oneToManyFindDataLoader.js.map +0 -1
- package/build/dataloaders/oneToOneDataLoader.d.ts +0 -7
- package/build/dataloaders/oneToOneDataLoader.d.ts.map +0 -1
- package/build/dataloaders/oneToOneDataLoader.js +0 -59
- package/build/dataloaders/oneToOneDataLoader.js.map +0 -1
- package/build/dataloaders/populateDataLoader.d.ts +0 -13
- package/build/dataloaders/populateDataLoader.d.ts.map +0 -1
- package/build/dataloaders/populateDataLoader.js +0 -148
- package/build/dataloaders/populateDataLoader.js.map +0 -1
- package/build/dataloaders/recursiveChildrenDataLoader.d.ts +0 -7
- package/build/dataloaders/recursiveChildrenDataLoader.d.ts.map +0 -1
- package/build/dataloaders/recursiveChildrenDataLoader.js +0 -77
- package/build/dataloaders/recursiveChildrenDataLoader.js.map +0 -1
- package/build/dataloaders/recursiveParentsDataLoader.d.ts +0 -7
- package/build/dataloaders/recursiveParentsDataLoader.d.ts.map +0 -1
- package/build/dataloaders/recursiveParentsDataLoader.js +0 -59
- package/build/dataloaders/recursiveParentsDataLoader.js.map +0 -1
- package/build/defaults.d.ts +0 -54
- package/build/defaults.d.ts.map +0 -1
- package/build/defaults.js +0 -282
- package/build/defaults.js.map +0 -1
- package/build/driverApi.d.ts +0 -19
- package/build/driverApi.d.ts.map +0 -1
- package/build/driverApi.js +0 -17
- package/build/driverApi.js.map +0 -1
- package/build/drivers/Driver.d.ts +0 -26
- package/build/drivers/Driver.d.ts.map +0 -1
- package/build/drivers/Driver.js +0 -3
- package/build/drivers/Driver.js.map +0 -1
- package/build/drivers/EntityWriter.d.ts +0 -64
- package/build/drivers/EntityWriter.d.ts.map +0 -1
- package/build/drivers/EntityWriter.js +0 -237
- package/build/drivers/EntityWriter.js.map +0 -1
- package/build/drivers/IdAssigner.d.ts +0 -50
- package/build/drivers/IdAssigner.d.ts.map +0 -1
- package/build/drivers/IdAssigner.js +0 -133
- package/build/drivers/IdAssigner.js.map +0 -1
- package/build/drivers/PostgresDriver.d.ts.map +0 -1
- package/build/drivers/PostgresDriver.js.map +0 -1
- package/build/drivers/buildRawQuery.d.ts +0 -20
- package/build/drivers/buildRawQuery.d.ts.map +0 -1
- package/build/drivers/buildRawQuery.js +0 -148
- package/build/drivers/buildRawQuery.js.map +0 -1
- package/build/drivers/buildUtils.d.ts +0 -4
- package/build/drivers/buildUtils.d.ts.map +0 -1
- package/build/drivers/buildUtils.js +0 -79
- package/build/drivers/buildUtils.js.map +0 -1
- package/build/drivers/index.d.ts +0 -5
- package/build/drivers/index.d.ts.map +0 -1
- package/build/drivers/index.js.map +0 -1
- package/build/fields.d.ts +0 -24
- package/build/fields.d.ts.map +0 -1
- package/build/fields.js +0 -162
- package/build/fields.js.map +0 -1
- package/build/getProperties.d.ts +0 -28
- package/build/getProperties.d.ts.map +0 -1
- package/build/getProperties.js +0 -141
- package/build/getProperties.js.map +0 -1
- package/build/json.d.ts +0 -77
- package/build/json.d.ts.map +0 -1
- package/build/json.js +0 -116
- package/build/json.js.map +0 -1
- package/build/k.d.ts +0 -2
- package/build/k.d.ts.map +0 -1
- package/build/k.js +0 -9
- package/build/k.js.map +0 -1
- package/build/keys.d.ts +0 -49
- package/build/keys.d.ts.map +0 -1
- package/build/keys.js +0 -195
- package/build/keys.js.map +0 -1
- package/build/keywords.d.ts +0 -5
- package/build/keywords.d.ts.map +0 -1
- package/build/keywords.js +0 -124
- package/build/keywords.js.map +0 -1
- package/build/loadHints.d.ts +0 -112
- package/build/loadHints.d.ts.map +0 -1
- package/build/loadHints.js +0 -75
- package/build/loadHints.js.map +0 -1
- package/build/loadLens.d.ts +0 -66
- package/build/loadLens.d.ts.map +0 -1
- package/build/loadLens.js +0 -287
- package/build/loadLens.js.map +0 -1
- package/build/logging/FactoryLogger.d.ts +0 -24
- package/build/logging/FactoryLogger.d.ts.map +0 -1
- package/build/logging/FactoryLogger.js +0 -77
- package/build/logging/FactoryLogger.js.map +0 -1
- package/build/logging/FieldLogger.d.ts +0 -27
- package/build/logging/FieldLogger.d.ts.map +0 -1
- package/build/logging/FieldLogger.js +0 -69
- package/build/logging/FieldLogger.js.map +0 -1
- package/build/logging/ReactionLogger.d.ts +0 -23
- package/build/logging/ReactionLogger.d.ts.map +0 -1
- package/build/logging/ReactionLogger.js +0 -65
- package/build/logging/ReactionLogger.js.map +0 -1
- package/build/newEntity.d.ts +0 -45
- package/build/newEntity.d.ts.map +0 -1
- package/build/newEntity.js +0 -106
- package/build/newEntity.js.map +0 -1
- package/build/newTestInstance.d.ts +0 -193
- package/build/newTestInstance.d.ts.map +0 -1
- package/build/newTestInstance.js +0 -738
- package/build/newTestInstance.js.map +0 -1
- package/build/normalizeHints.d.ts +0 -16
- package/build/normalizeHints.d.ts.map +0 -1
- package/build/normalizeHints.js +0 -31
- package/build/normalizeHints.js.map +0 -1
- package/build/plugins/ImmutableEntitiesPlugin.d.ts +0 -9
- package/build/plugins/ImmutableEntitiesPlugin.d.ts.map +0 -1
- package/build/plugins/ImmutableEntitiesPlugin.js +0 -21
- package/build/plugins/ImmutableEntitiesPlugin.js.map +0 -1
- package/build/plugins/PreloadPlugin.d.ts +0 -69
- package/build/plugins/PreloadPlugin.d.ts.map +0 -1
- package/build/plugins/PreloadPlugin.js +0 -3
- package/build/plugins/PreloadPlugin.js.map +0 -1
- package/build/preloading/JsonAggregatePreloader.d.ts +0 -16
- package/build/preloading/JsonAggregatePreloader.d.ts.map +0 -1
- package/build/preloading/JsonAggregatePreloader.js +0 -238
- package/build/preloading/JsonAggregatePreloader.js.map +0 -1
- package/build/preloading/canPreload.d.ts +0 -3
- package/build/preloading/canPreload.d.ts.map +0 -1
- package/build/preloading/canPreload.js +0 -21
- package/build/preloading/canPreload.js.map +0 -1
- package/build/preloading/partitionHint.d.ts +0 -5
- package/build/preloading/partitionHint.d.ts.map +0 -1
- package/build/preloading/partitionHint.js +0 -56
- package/build/preloading/partitionHint.js.map +0 -1
- package/build/reactiveHints.d.ts +0 -129
- package/build/reactiveHints.d.ts.map +0 -1
- package/build/reactiveHints.js +0 -458
- package/build/reactiveHints.js.map +0 -1
- package/build/relations/AbstractPropertyImpl.d.ts +0 -8
- package/build/relations/AbstractPropertyImpl.d.ts.map +0 -1
- package/build/relations/AbstractPropertyImpl.js +0 -15
- package/build/relations/AbstractPropertyImpl.js.map +0 -1
- package/build/relations/AbstractRelationImpl.d.ts +0 -36
- package/build/relations/AbstractRelationImpl.d.ts.map +0 -1
- package/build/relations/AbstractRelationImpl.js +0 -19
- package/build/relations/AbstractRelationImpl.js.map +0 -1
- package/build/relations/Collection.d.ts +0 -28
- package/build/relations/Collection.d.ts.map +0 -1
- package/build/relations/Collection.js +0 -18
- package/build/relations/Collection.js.map +0 -1
- package/build/relations/CustomCollection.d.ts +0 -69
- package/build/relations/CustomCollection.d.ts.map +0 -1
- package/build/relations/CustomCollection.js +0 -166
- package/build/relations/CustomCollection.js.map +0 -1
- package/build/relations/CustomReference.d.ts +0 -71
- package/build/relations/CustomReference.d.ts.map +0 -1
- package/build/relations/CustomReference.js +0 -152
- package/build/relations/CustomReference.js.map +0 -1
- package/build/relations/LargeCollection.d.ts +0 -19
- package/build/relations/LargeCollection.d.ts.map +0 -1
- package/build/relations/LargeCollection.js +0 -3
- package/build/relations/LargeCollection.js.map +0 -1
- package/build/relations/ManyToManyCollection.d.ts +0 -44
- package/build/relations/ManyToManyCollection.d.ts.map +0 -1
- package/build/relations/ManyToManyCollection.js +0 -268
- package/build/relations/ManyToManyCollection.js.map +0 -1
- package/build/relations/ManyToManyLargeCollection.d.ts +0 -30
- package/build/relations/ManyToManyLargeCollection.d.ts.map +0 -1
- package/build/relations/ManyToManyLargeCollection.js +0 -119
- package/build/relations/ManyToManyLargeCollection.js.map +0 -1
- package/build/relations/ManyToOneReference.d.ts +0 -121
- package/build/relations/ManyToOneReference.d.ts.map +0 -1
- package/build/relations/ManyToOneReference.js +0 -389
- package/build/relations/ManyToOneReference.js.map +0 -1
- package/build/relations/OneToManyCollection.d.ts +0 -58
- package/build/relations/OneToManyCollection.d.ts.map +0 -1
- package/build/relations/OneToManyCollection.js +0 -347
- package/build/relations/OneToManyCollection.js.map +0 -1
- package/build/relations/OneToManyLargeCollection.d.ts +0 -26
- package/build/relations/OneToManyLargeCollection.d.ts.map +0 -1
- package/build/relations/OneToManyLargeCollection.js +0 -102
- package/build/relations/OneToManyLargeCollection.js.map +0 -1
- package/build/relations/OneToOneReference.d.ts +0 -93
- package/build/relations/OneToOneReference.d.ts.map +0 -1
- package/build/relations/OneToOneReference.js +0 -228
- package/build/relations/OneToOneReference.js.map +0 -1
- package/build/relations/PolymorphicReference.d.ts +0 -89
- package/build/relations/PolymorphicReference.d.ts.map +0 -1
- package/build/relations/PolymorphicReference.js +0 -244
- package/build/relations/PolymorphicReference.js.map +0 -1
- package/build/relations/ReactiveField.d.ts +0 -87
- package/build/relations/ReactiveField.d.ts.map +0 -1
- package/build/relations/ReactiveField.js +0 -149
- package/build/relations/ReactiveField.js.map +0 -1
- package/build/relations/ReactiveGetter.d.ts +0 -30
- package/build/relations/ReactiveGetter.d.ts.map +0 -1
- package/build/relations/ReactiveGetter.js +0 -38
- package/build/relations/ReactiveGetter.js.map +0 -1
- package/build/relations/ReactiveManyToMany.d.ts +0 -56
- package/build/relations/ReactiveManyToMany.d.ts.map +0 -1
- package/build/relations/ReactiveManyToMany.js +0 -243
- package/build/relations/ReactiveManyToMany.js.map +0 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.ts +0 -47
- package/build/relations/ReactiveManyToManyOtherSide.d.ts.map +0 -1
- package/build/relations/ReactiveManyToManyOtherSide.js +0 -155
- package/build/relations/ReactiveManyToManyOtherSide.js.map +0 -1
- package/build/relations/ReactiveQueryField.d.ts +0 -41
- package/build/relations/ReactiveQueryField.d.ts.map +0 -1
- package/build/relations/ReactiveQueryField.js +0 -125
- package/build/relations/ReactiveQueryField.js.map +0 -1
- package/build/relations/ReactiveReference.d.ts +0 -119
- package/build/relations/ReactiveReference.d.ts.map +0 -1
- package/build/relations/ReactiveReference.js +0 -333
- package/build/relations/ReactiveReference.js.map +0 -1
- package/build/relations/ReadOnlyCollection.d.ts +0 -19
- package/build/relations/ReadOnlyCollection.d.ts.map +0 -1
- package/build/relations/ReadOnlyCollection.js +0 -15
- package/build/relations/ReadOnlyCollection.js.map +0 -1
- package/build/relations/RecursiveCollection.d.ts +0 -84
- package/build/relations/RecursiveCollection.d.ts.map +0 -1
- package/build/relations/RecursiveCollection.js +0 -296
- package/build/relations/RecursiveCollection.js.map +0 -1
- package/build/relations/Reference.d.ts +0 -35
- package/build/relations/Reference.d.ts.map +0 -1
- package/build/relations/Reference.js +0 -21
- package/build/relations/Reference.js.map +0 -1
- package/build/relations/Relation.d.ts +0 -14
- package/build/relations/Relation.d.ts.map +0 -1
- package/build/relations/Relation.js +0 -12
- package/build/relations/Relation.js.map +0 -1
- package/build/relations/hasAsyncMethod.d.ts +0 -27
- package/build/relations/hasAsyncMethod.d.ts.map +0 -1
- package/build/relations/hasAsyncMethod.js +0 -47
- package/build/relations/hasAsyncMethod.js.map +0 -1
- package/build/relations/hasAsyncProperty.d.ts +0 -49
- package/build/relations/hasAsyncProperty.d.ts.map +0 -1
- package/build/relations/hasAsyncProperty.js +0 -98
- package/build/relations/hasAsyncProperty.js.map +0 -1
- package/build/relations/hasManyDerived.d.ts +0 -22
- package/build/relations/hasManyDerived.d.ts.map +0 -1
- package/build/relations/hasManyDerived.js +0 -32
- package/build/relations/hasManyDerived.js.map +0 -1
- package/build/relations/hasManyThrough.d.ts +0 -10
- package/build/relations/hasManyThrough.d.ts.map +0 -1
- package/build/relations/hasManyThrough.js +0 -24
- package/build/relations/hasManyThrough.js.map +0 -1
- package/build/relations/hasOneDerived.d.ts +0 -12
- package/build/relations/hasOneDerived.d.ts.map +0 -1
- package/build/relations/hasOneDerived.js +0 -24
- package/build/relations/hasOneDerived.js.map +0 -1
- package/build/relations/hasOneThrough.d.ts +0 -10
- package/build/relations/hasOneThrough.d.ts.map +0 -1
- package/build/relations/hasOneThrough.js +0 -24
- package/build/relations/hasOneThrough.js.map +0 -1
- package/build/relations/index.d.ts +0 -28
- package/build/relations/index.d.ts.map +0 -1
- package/build/relations/index.js +0 -88
- package/build/relations/index.js.map +0 -1
- package/build/rules.d.ts +0 -123
- package/build/rules.d.ts.map +0 -1
- package/build/rules.js +0 -231
- package/build/rules.js.map +0 -1
- package/build/runtimeConfig.d.ts +0 -17
- package/build/runtimeConfig.d.ts.map +0 -1
- package/build/runtimeConfig.js +0 -18
- package/build/runtimeConfig.js.map +0 -1
- package/build/serde.d.ts +0 -277
- package/build/serde.d.ts.map +0 -1
- package/build/serde.js +0 -517
- package/build/serde.js.map +0 -1
- package/build/temporal.d.ts +0 -16
- package/build/temporal.d.ts.map +0 -1
- package/build/temporal.js +0 -48
- package/build/temporal.js.map +0 -1
- package/build/temporalMappers.d.ts +0 -25
- package/build/temporalMappers.d.ts.map +0 -1
- package/build/temporalMappers.js +0 -59
- package/build/temporalMappers.js.map +0 -1
- package/build/typeMap.d.ts +0 -68
- package/build/typeMap.d.ts.map +0 -1
- package/build/typeMap.js +0 -3
- package/build/typeMap.js.map +0 -1
- package/build/unnest.d.ts +0 -13
- package/build/unnest.d.ts.map +0 -1
- package/build/unnest.js +0 -85
- package/build/unnest.js.map +0 -1
- package/build/upsert.d.ts +0 -42
- package/build/upsert.d.ts.map +0 -1
- package/build/upsert.js +0 -265
- package/build/upsert.js.map +0 -1
- package/build/utils.d.ts +0 -58
- package/build/utils.d.ts.map +0 -1
- package/build/utils.js +0 -236
- package/build/utils.js.map +0 -1
- package/build/withLoaded.d.ts +0 -56
- package/build/withLoaded.d.ts.map +0 -1
- package/build/withLoaded.js +0 -76
- package/build/withLoaded.js.map +0 -1
|
@@ -1,8 +1,5 @@
|
|
|
1
|
+
import { Driver, EntityManager, IdAssigner, JoinRowTodo, ParsedFindQuery, PreloadPlugin, RuntimeConfig, Todo } from "joist-core";
|
|
1
2
|
import { Knex } from "knex";
|
|
2
|
-
import { EntityManager, ParsedFindQuery, PreloadPlugin, RuntimeConfig } from "../index";
|
|
3
|
-
import { JoinRowTodo, Todo } from "../Todo";
|
|
4
|
-
import { Driver } from "./Driver";
|
|
5
|
-
import { IdAssigner } from "./IdAssigner";
|
|
6
3
|
export interface PostgresDriverOpts {
|
|
7
4
|
idAssigner?: IdAssigner;
|
|
8
5
|
/** Sets a default `PreloadPlugin` for any `EntityManager` that uses this driver. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostgresDriver.d.ts","sourceRoot":"","sources":["../src/PostgresDriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,EAMN,aAAa,EAKb,UAAU,EAIV,WAAW,EAMX,eAAe,EAEf,aAAa,EACb,aAAa,EAEb,IAAI,EAGL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAK5B,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oFAAoF;IACpF,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,cAAe,YAAW,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;;IAK3D,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,IAAI,EAC3B,IAAI,CAAC,EAAE,kBAAkB;IAOrB,WAAW,CACf,EAAE,EAAE,aAAa,EACjB,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5C,OAAO,CAAC,GAAG,EAAE,CAAC;IAKX,YAAY,CAAC,EAAE,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAOtF,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAqBxF,YAAY,CAAC,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1E,KAAK,CACT,EAAE,EAAE,aAAa,EACjB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EACjC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GACpC,OAAO,CAAC,IAAI,CAAC;IAgBhB,IAAI,cAAc;;MAEjB;IAED,OAAO,CAAC,iBAAiB;CAG1B;AAmJD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,GAAG,IAAI,CAkB5E"}
|
|
@@ -5,18 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.PostgresDriver = void 0;
|
|
7
7
|
exports.setupLatestPgTypes = setupLatestPgTypes;
|
|
8
|
-
const
|
|
8
|
+
const joist_core_1 = require("joist-core");
|
|
9
|
+
const pg_1 = __importDefault(require("pg"));
|
|
9
10
|
const pg_types_1 = require("pg-types");
|
|
10
11
|
const postgres_array_1 = __importDefault(require("postgres-array"));
|
|
11
|
-
const index_1 = require("../index");
|
|
12
|
-
const JoinRows_1 = require("../JoinRows");
|
|
13
|
-
const keywords_1 = require("../keywords");
|
|
14
|
-
const runtimeConfig_1 = require("../runtimeConfig");
|
|
15
|
-
const unnest_1 = require("../unnest");
|
|
16
|
-
const utils_1 = require("../utils");
|
|
17
|
-
const buildRawQuery_1 = require("./buildRawQuery");
|
|
18
|
-
const EntityWriter_1 = require("./EntityWriter");
|
|
19
|
-
const IdAssigner_1 = require("./IdAssigner");
|
|
20
12
|
/**
|
|
21
13
|
* Implements the `Driver` interface for Postgres.
|
|
22
14
|
*
|
|
@@ -37,12 +29,12 @@ class PostgresDriver {
|
|
|
37
29
|
#preloadPlugin;
|
|
38
30
|
constructor(knex, opts) {
|
|
39
31
|
this.knex = knex;
|
|
40
|
-
this.#idAssigner = opts?.idAssigner ?? new
|
|
32
|
+
this.#idAssigner = opts?.idAssigner ?? new joist_core_1.SequenceIdAssigner(knex);
|
|
41
33
|
this.#preloadPlugin = opts?.preloadPlugin;
|
|
42
|
-
setupLatestPgTypes((0,
|
|
34
|
+
setupLatestPgTypes((0, joist_core_1.getRuntimeConfig)().temporal);
|
|
43
35
|
}
|
|
44
36
|
async executeFind(em, parsed, settings) {
|
|
45
|
-
const { sql, bindings } = (0,
|
|
37
|
+
const { sql, bindings } = (0, joist_core_1.buildRawQuery)(parsed, { limit: em.entityLimit, ...settings });
|
|
46
38
|
return this.executeQuery(em, sql, bindings);
|
|
47
39
|
}
|
|
48
40
|
async executeQuery(em, sql, bindings) {
|
|
@@ -56,29 +48,29 @@ class PostgresDriver {
|
|
|
56
48
|
if (em.txn) {
|
|
57
49
|
return fn(em.txn);
|
|
58
50
|
}
|
|
59
|
-
await (0,
|
|
51
|
+
await (0, joist_core_1.driverBeforeBegin)(em, this.knex);
|
|
60
52
|
const result = await this.knex.transaction(async (txn) => {
|
|
61
53
|
em.txn = txn;
|
|
62
54
|
try {
|
|
63
|
-
await (0,
|
|
55
|
+
await (0, joist_core_1.driverAfterBegin)(em, txn);
|
|
64
56
|
const result = await fn(txn);
|
|
65
|
-
await (0,
|
|
57
|
+
await (0, joist_core_1.driverBeforeCommit)(em, txn);
|
|
66
58
|
return result;
|
|
67
59
|
}
|
|
68
60
|
finally {
|
|
69
61
|
em.txn = undefined;
|
|
70
62
|
}
|
|
71
63
|
});
|
|
72
|
-
await (0,
|
|
64
|
+
await (0, joist_core_1.driverAfterCommit)(em, this.knex);
|
|
73
65
|
return result;
|
|
74
66
|
}
|
|
75
67
|
async assignNewIds(_, todos) {
|
|
76
68
|
return this.#idAssigner.assignNewIds(todos);
|
|
77
69
|
}
|
|
78
70
|
async flush(em, entityTodos, joinRows) {
|
|
79
|
-
const txn = (em.txn ?? (0,
|
|
71
|
+
const txn = (em.txn ?? (0, joist_core_1.fail)("Expected EntityManager.txn to be set"));
|
|
80
72
|
await this.#idAssigner.assignNewIds(entityTodos);
|
|
81
|
-
const ops = (0,
|
|
73
|
+
const ops = (0, joist_core_1.generateOps)(entityTodos);
|
|
82
74
|
// Do INSERTs+UPDATEs first so that we avoid DELETE cascades invalidating oplocks
|
|
83
75
|
// See https://github.com/joist-orm/joist-orm/issues/591
|
|
84
76
|
await Promise.all([
|
|
@@ -101,9 +93,9 @@ exports.PostgresDriver = PostgresDriver;
|
|
|
101
93
|
async function batchInsert(txn, op) {
|
|
102
94
|
const { tableName, columns, columnValues } = op;
|
|
103
95
|
const [cte, bindings] = buildUnnestCte("data", columns, columnValues);
|
|
104
|
-
const sql = (0,
|
|
96
|
+
const sql = (0, joist_core_1.cleanSql)(`
|
|
105
97
|
${cte}
|
|
106
|
-
INSERT INTO ${(0,
|
|
98
|
+
INSERT INTO ${(0, joist_core_1.kq)(tableName)} (${columns.map((c) => (0, joist_core_1.kq)(c.columnName)).join(", ")})
|
|
107
99
|
SELECT * FROM data
|
|
108
100
|
`);
|
|
109
101
|
return txn.raw(sql, bindings);
|
|
@@ -116,24 +108,24 @@ async function batchUpdate(txn, op) {
|
|
|
116
108
|
// the pg data to match what we have in the JS Date.
|
|
117
109
|
//
|
|
118
110
|
// ...but Temporal's types don't have this flaw.
|
|
119
|
-
const truncateToMills = !(0,
|
|
111
|
+
const truncateToMills = !(0, joist_core_1.getRuntimeConfig)().temporal;
|
|
120
112
|
const maybeUpdatedAt = updatedAt && truncateToMills
|
|
121
|
-
? ` AND date_trunc('milliseconds', ${(0,
|
|
113
|
+
? ` AND date_trunc('milliseconds', ${(0, joist_core_1.kqDot)(tableName, updatedAt)}) = data.__original_updated_at`
|
|
122
114
|
: updatedAt
|
|
123
|
-
? ` AND ${(0,
|
|
115
|
+
? ` AND ${(0, joist_core_1.kqDot)(tableName, updatedAt)} = data.__original_updated_at`
|
|
124
116
|
: "";
|
|
125
117
|
const sql = `
|
|
126
118
|
${cte}
|
|
127
|
-
UPDATE ${(0,
|
|
119
|
+
UPDATE ${(0, joist_core_1.kq)(tableName)}
|
|
128
120
|
SET ${columns
|
|
129
121
|
.filter((c) => c.columnName !== "id" && c.columnName !== "__original_updated_at")
|
|
130
|
-
.map((c) => `${(0,
|
|
122
|
+
.map((c) => `${(0, joist_core_1.kq)(c.columnName)} = data.${(0, joist_core_1.kq)(c.columnName)}`)
|
|
131
123
|
.join(", ")}
|
|
132
124
|
FROM data
|
|
133
|
-
WHERE ${(0,
|
|
134
|
-
RETURNING ${(0,
|
|
125
|
+
WHERE ${(0, joist_core_1.kq)(tableName)}.id = data.id ${maybeUpdatedAt}
|
|
126
|
+
RETURNING ${(0, joist_core_1.kq)(tableName)}.id
|
|
135
127
|
`;
|
|
136
|
-
const result = await txn.raw((0,
|
|
128
|
+
const result = await txn.raw((0, joist_core_1.cleanSql)(sql), bindings);
|
|
137
129
|
const results = result.rows;
|
|
138
130
|
const ids = columnValues[0]; // assume id is the 1st column
|
|
139
131
|
if (results.length !== ids.length) {
|
|
@@ -144,22 +136,22 @@ async function batchUpdate(txn, op) {
|
|
|
144
136
|
}
|
|
145
137
|
async function batchDelete(txn, op) {
|
|
146
138
|
const { tableName, ids } = op;
|
|
147
|
-
await txn.raw(`DELETE FROM ${(0,
|
|
139
|
+
await txn.raw(`DELETE FROM ${(0, joist_core_1.kq)(tableName)} WHERE id = ANY(?)`, [ids]);
|
|
148
140
|
}
|
|
149
141
|
/** Creates a CTE named `tableName` that bulk-injects the `columnValues` into a SQL query. */
|
|
150
142
|
function buildUnnestCte(tableName, columns, columnValues) {
|
|
151
|
-
(0,
|
|
143
|
+
(0, joist_core_1.ensureRectangularArraySizes)(columns, columnValues);
|
|
152
144
|
const selects = columns.map((c) => {
|
|
153
145
|
if (c.dbType.endsWith("[]")) {
|
|
154
146
|
if (c.isNullableArray) {
|
|
155
|
-
return `unnest_arrays(?::${c.dbType}[], true) as ${(0,
|
|
147
|
+
return `unnest_arrays(?::${c.dbType}[], true) as ${(0, joist_core_1.kq)(c.columnName)}`;
|
|
156
148
|
}
|
|
157
149
|
else {
|
|
158
|
-
return `unnest_arrays(?::${c.dbType}[]) as ${(0,
|
|
150
|
+
return `unnest_arrays(?::${c.dbType}[]) as ${(0, joist_core_1.kq)(c.columnName)}`;
|
|
159
151
|
}
|
|
160
152
|
}
|
|
161
153
|
else {
|
|
162
|
-
return `unnest(?::${c.dbType}[]) as ${(0,
|
|
154
|
+
return `unnest(?::${c.dbType}[]) as ${(0, joist_core_1.kq)(c.columnName)}`;
|
|
163
155
|
}
|
|
164
156
|
});
|
|
165
157
|
const sql = `WITH ${tableName} AS (SELECT ${selects.join(", ")})`;
|
|
@@ -168,36 +160,35 @@ function buildUnnestCte(tableName, columns, columnValues) {
|
|
|
168
160
|
async function m2mBatchInsert(txn, joinTableName, m2m, newRows) {
|
|
169
161
|
if (newRows.length === 0)
|
|
170
162
|
return;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
VALUES ${(0, utils_1.zeroTo)(newRows.length)
|
|
163
|
+
const sql = (0, joist_core_1.cleanSql)(`
|
|
164
|
+
INSERT INTO ${(0, joist_core_1.kq)(joinTableName)} (${(0, joist_core_1.kq)(m2m.columnName)}, ${(0, joist_core_1.kq)(m2m.otherColumnName)})
|
|
165
|
+
VALUES ${(0, joist_core_1.zeroTo)(newRows.length)
|
|
175
166
|
.map(() => "(?, ?) ")
|
|
176
167
|
.join(", ")}
|
|
177
|
-
ON CONFLICT (${(0,
|
|
168
|
+
ON CONFLICT (${(0, joist_core_1.kq)(m2m.columnName)}, ${(0, joist_core_1.kq)(m2m.otherColumnName)}) DO UPDATE SET id = ${(0, joist_core_1.kq)(joinTableName)}.id
|
|
178
169
|
RETURNING id;
|
|
179
170
|
`);
|
|
180
|
-
const meta1 = (0,
|
|
171
|
+
const meta1 = (0, joist_core_1.getMetadata)(m2m.entity);
|
|
181
172
|
const meta2 = m2m.otherMeta;
|
|
182
173
|
const bindings = newRows.flatMap((row) => {
|
|
183
174
|
return [
|
|
184
|
-
(0,
|
|
185
|
-
(0,
|
|
175
|
+
(0, joist_core_1.keyToNumber)(meta1, row.columns[m2m.columnName].idTagged),
|
|
176
|
+
(0, joist_core_1.keyToNumber)(meta2, row.columns[m2m.otherColumnName].idTagged),
|
|
186
177
|
];
|
|
187
178
|
});
|
|
188
179
|
const { rows } = await txn.raw(sql, bindings);
|
|
189
180
|
for (let i = 0; i < rows.length; i++) {
|
|
190
181
|
newRows[i].id = rows[i].id;
|
|
191
|
-
newRows[i].op =
|
|
182
|
+
newRows[i].op = joist_core_1.JoinRowOperation.Flushed;
|
|
192
183
|
}
|
|
193
184
|
}
|
|
194
185
|
async function m2mBatchDelete(txn, joinTableName, m2m, deletedRows) {
|
|
195
186
|
if (deletedRows.length === 0)
|
|
196
187
|
return;
|
|
197
188
|
// `remove`s that were done against unloaded ManyToManyCollections will not have row ids
|
|
198
|
-
const [haveIds, noIds] = (0,
|
|
189
|
+
const [haveIds, noIds] = (0, joist_core_1.partition)(deletedRows, (r) => r.id !== -1);
|
|
199
190
|
if (haveIds.length > 0) {
|
|
200
|
-
await txn.raw(`DELETE FROM ${(0,
|
|
191
|
+
await txn.raw(`DELETE FROM ${(0, joist_core_1.kq)(joinTableName)} WHERE id = ANY(?)`, [haveIds.map((r) => r.id)]);
|
|
201
192
|
}
|
|
202
193
|
if (noIds.length > 0) {
|
|
203
194
|
const data = noIds
|
|
@@ -209,20 +200,20 @@ async function m2mBatchDelete(txn, joinTableName, m2m, deletedRows) {
|
|
|
209
200
|
return !e1.isNewEntity && !e2.isNewEntity;
|
|
210
201
|
})
|
|
211
202
|
.map((e) => [
|
|
212
|
-
(0,
|
|
213
|
-
(0,
|
|
203
|
+
(0, joist_core_1.keyToNumber)(m2m.meta, e.columns[m2m.columnName].idTagged),
|
|
204
|
+
(0, joist_core_1.keyToNumber)(m2m.otherMeta, e.columns[m2m.otherColumnName].idTagged),
|
|
214
205
|
]);
|
|
215
206
|
if (data.length > 0) {
|
|
216
207
|
await txn.raw(`
|
|
217
|
-
DELETE FROM ${(0,
|
|
218
|
-
WHERE (${(0,
|
|
208
|
+
DELETE FROM ${(0, joist_core_1.kq)(joinTableName)}
|
|
209
|
+
WHERE (${(0, joist_core_1.kq)(m2m.columnName)}, ${(0, joist_core_1.kq)(m2m.otherColumnName)}) IN (
|
|
219
210
|
SELECT (data->>0)::int, (data->>1)::int FROM jsonb_array_elements(?) data
|
|
220
211
|
)`, [JSON.stringify(data)]);
|
|
221
212
|
}
|
|
222
213
|
}
|
|
223
214
|
deletedRows.forEach((row) => {
|
|
224
215
|
row.id = undefined;
|
|
225
|
-
row.op =
|
|
216
|
+
row.op = joist_core_1.JoinRowOperation.Flushed;
|
|
226
217
|
});
|
|
227
218
|
}
|
|
228
219
|
/**
|
|
@@ -237,17 +228,17 @@ function setupLatestPgTypes(temporal) {
|
|
|
237
228
|
// Don't eagerly parse the strings, instead defer to the serde logic
|
|
238
229
|
const noop = (s) => s;
|
|
239
230
|
const noopArray = (s) => postgres_array_1.default.parse(s, noop);
|
|
240
|
-
const { TIMESTAMP, TIMESTAMPTZ, DATE } = pg_1.types.builtins;
|
|
241
|
-
pg_1.types.setTypeParser(DATE, noop);
|
|
242
|
-
pg_1.types.setTypeParser(TIMESTAMP, noop);
|
|
243
|
-
pg_1.types.setTypeParser(TIMESTAMPTZ, noop);
|
|
231
|
+
const { TIMESTAMP, TIMESTAMPTZ, DATE } = pg_1.default.types.builtins;
|
|
232
|
+
pg_1.default.types.setTypeParser(DATE, noop);
|
|
233
|
+
pg_1.default.types.setTypeParser(TIMESTAMP, noop);
|
|
234
|
+
pg_1.default.types.setTypeParser(TIMESTAMPTZ, noop);
|
|
244
235
|
// Use `as number` b/c the typings of shadowed pg-types from `pg` and `pg-types` top-level don't line up
|
|
245
|
-
pg_1.types.setTypeParser(1182, noopArray); // date[]
|
|
246
|
-
pg_1.types.setTypeParser(1115, noopArray); // timestamp[]
|
|
247
|
-
pg_1.types.setTypeParser(1185, noopArray); // timestamptz[]
|
|
236
|
+
pg_1.default.types.setTypeParser(1182, noopArray); // date[]
|
|
237
|
+
pg_1.default.types.setTypeParser(1115, noopArray); // timestamp[]
|
|
238
|
+
pg_1.default.types.setTypeParser(1185, noopArray); // timestamptz[]
|
|
248
239
|
}
|
|
249
240
|
else {
|
|
250
|
-
pg_1.types.setTypeParser(pg_1.types.builtins.TIMESTAMPTZ, (0, pg_types_1.getTypeParser)(pg_types_1.builtins.TIMESTAMPTZ));
|
|
241
|
+
pg_1.default.types.setTypeParser(pg_1.default.types.builtins.TIMESTAMPTZ, (0, pg_types_1.getTypeParser)(pg_types_1.builtins.TIMESTAMPTZ));
|
|
251
242
|
}
|
|
252
243
|
}
|
|
253
244
|
//# sourceMappingURL=PostgresDriver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostgresDriver.js","sourceRoot":"","sources":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"codegen.d.ts","sourceRoot":"","sources":["../src/codegen.ts"],"names":[],"mappings":"AAGA,cAAc,eAAe,CAAC"}
|
package/build/codegen.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
const joist_codegen_1 = require("joist-codegen");
|
|
18
|
+
// Re-export everything from joist-codegen
|
|
19
|
+
__exportStar(require("joist-codegen"), exports);
|
|
20
|
+
// Duplicate the `require.main` check from joist-codegen
|
|
21
|
+
if (require.main === module) {
|
|
22
|
+
(0, joist_codegen_1.joistCodegen)()
|
|
23
|
+
.then(() => (0, joist_codegen_1.maybeSetExitCode)())
|
|
24
|
+
.catch((err) => {
|
|
25
|
+
console.error(err);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=codegen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen.js","sourceRoot":"","sources":["../src/codegen.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+D;AAE/D,0CAA0C;AAC1C,gDAA8B;AAE9B,wDAAwD;AACxD,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,IAAA,4BAAY,GAAE;SACX,IAAI,CAAC,GAAG,EAAE,CAAC,IAAA,gCAAgB,GAAE,CAAC;SAC9B,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql-codegen-export.d.ts","sourceRoot":"","sources":["../src/graphql-codegen-export.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAC"}
|
|
@@ -14,8 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("
|
|
19
|
-
|
|
20
|
-
__exportStar(require("./PostgresDriver"), exports);
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
17
|
+
// Re-export everything from joist-graphql-codegen
|
|
18
|
+
__exportStar(require("joist-graphql-codegen"), exports);
|
|
19
|
+
//# sourceMappingURL=graphql-codegen-export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql-codegen-export.js","sourceRoot":"","sources":["../src/graphql-codegen-export.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAkD;AAClD,wDAAsC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql-export.d.ts","sourceRoot":"","sources":["../src/graphql-export.ts"],"names":[],"mappings":"AACA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Re-export everything from joist-graphql-resolver-utils
|
|
18
|
+
__exportStar(require("joist-graphql-resolver-utils"), exports);
|
|
19
|
+
//# sourceMappingURL=graphql-export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql-export.js","sourceRoot":"","sources":["../src/graphql-export.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,+DAA6C"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,129 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { getDefaultDependencies } from "./defaults";
|
|
5
|
-
import { buildWhereClause } from "./drivers/buildUtils";
|
|
6
|
-
import { New } from "./loadHints";
|
|
7
|
-
import { isAllSqlPaths } from "./loadLens";
|
|
8
|
-
import { partitionHint } from "./preloading/partitionHint";
|
|
9
|
-
import { AbstractRelationImpl } from "./relations/AbstractRelationImpl";
|
|
10
|
-
import { OptsOf } from "./typeMap";
|
|
11
|
-
export declare const testing: {
|
|
12
|
-
isAllSqlPaths: typeof isAllSqlPaths;
|
|
13
|
-
getDefaultDependencies: typeof getDefaultDependencies;
|
|
14
|
-
partitionHint: typeof partitionHint;
|
|
15
|
-
};
|
|
16
|
-
export declare const internals: {
|
|
17
|
-
buildWhereClause: typeof buildWhereClause;
|
|
18
|
-
};
|
|
19
|
-
export { newPgConnectionConfig } from "joist-utils";
|
|
20
|
-
export { AliasAssigner } from "./AliasAssigner";
|
|
21
|
-
export * from "./Aliases";
|
|
22
|
-
export { BaseEntity, getInstanceData } from "./BaseEntity";
|
|
23
|
-
export { ConditionBuilder } from "./ConditionBuilder";
|
|
24
|
-
export { Entity, IdType, isEntity } from "./Entity";
|
|
25
|
-
export * from "./EntityFields";
|
|
26
|
-
export * from "./EntityFilter";
|
|
27
|
-
export * from "./EntityGraphQLFilter";
|
|
28
|
-
export * from "./EntityManager";
|
|
29
|
-
export * from "./EntityMetadata";
|
|
30
|
-
export { EnumMetadata } from "./EnumMetadata";
|
|
31
|
-
export { EntityOrId, HintNode } from "./HintTree";
|
|
32
|
-
export { InstanceData } from "./InstanceData";
|
|
33
|
-
export { JoinRow } from "./JoinRows";
|
|
34
|
-
export { Plugin } from "./PluginManager";
|
|
35
|
-
export * from "./QueryParser";
|
|
36
|
-
export { visitConditions } from "./QueryVisitor";
|
|
37
|
-
export { JoinRowTodo, Todo } from "./Todo";
|
|
38
|
-
export * from "./changes";
|
|
39
|
-
export { ConfigApi, EntityHook, resetBootFlag } from "./config";
|
|
40
|
-
export { configureMetadata, getConstructorFromTaggedId, getMetadataForTable, getMetadataForType, maybeGetConstructorFromReference, } from "./configure";
|
|
41
|
-
export { driverApi } from "./driverApi";
|
|
42
|
-
export * from "./drivers";
|
|
43
|
-
export { getField, isChangeableField, isFieldSet, setField } from "./fields";
|
|
44
|
-
export * from "./getProperties";
|
|
45
|
-
export * from "./json";
|
|
46
|
-
export * from "./keys";
|
|
47
|
-
export { kq, kqDot, kqStar } from "./keywords";
|
|
48
|
-
export { assertLoaded, DeepNew, ensureLoaded, isLoaded, isNew, Loadable, Loaded, LoadHint, MarkLoaded, maybePopulateThen, NestedLoadHint, New, RelationsIn, unsafeLoaded, } from "./loadHints";
|
|
49
|
-
export * from "./loadLens";
|
|
50
|
-
export { setFactoryWriter } from "./logging/FactoryLogger";
|
|
51
|
-
export * from "./logging/FieldLogger";
|
|
52
|
-
export { ReactionLogger, setReactionLogging } from "./logging/ReactionLogger";
|
|
53
|
-
export { lazyField } from "./newEntity";
|
|
54
|
-
export { defaultValue, FactoryEntityOpt, FactoryOpts, getTestIndex, isFactoryCreation, maybeBranchValue, maybeNew, maybeNewPoly, newTestInstance, noValue, setFactoryLogging, testIndex, } from "./newTestInstance";
|
|
55
|
-
export { deepNormalizeHint, normalizeHint } from "./normalizeHints";
|
|
56
|
-
export { ImmutableEntitiesPlugin } from "./plugins/ImmutableEntitiesPlugin";
|
|
57
|
-
export { JoinResult, PreloadHydrator, PreloadPlugin } from "./plugins/PreloadPlugin";
|
|
58
|
-
export { JsonAggregatePreloader } from "./preloading/JsonAggregatePreloader";
|
|
59
|
-
export { convertToLoadHint, Reactable, Reacted, ReactiveHint, ReactiveTarget, reverseReactiveHint, } from "./reactiveHints";
|
|
60
|
-
export * from "./relations";
|
|
61
|
-
export { cannotBeChanged, cannotBeUpdated, GenericError, maxValueRule, minValueRule, mustBeSubType, newRequiredRule, rangeValueRule, ValidationCode, ValidationError, ValidationErrors, ValidationRule, ValidationRuleResult, } from "./rules";
|
|
62
|
-
export { setRuntimeConfig, type RuntimeConfig } from "./runtimeConfig";
|
|
63
|
-
export * from "./serde";
|
|
64
|
-
export * from "./temporalMappers";
|
|
65
|
-
export { isInTrustedContext } from "./trusted";
|
|
66
|
-
export * from "./typeMap";
|
|
67
|
-
export { buildUnnestCte } from "./unnest";
|
|
68
|
-
export { DeepPartialOrNull, updatePartial, upsert } from "./upsert";
|
|
69
|
-
export { abbreviation, asNew, assertNever, cleanStringValue, fail, failIfAnyRejected, indexBy } from "./utils";
|
|
70
|
-
export { ensureWithLoaded, StubbedRelation, WithLoaded, withLoaded } from "./withLoaded";
|
|
71
|
-
interface Flavoring<FlavorT> {
|
|
72
|
-
_type?: FlavorT;
|
|
73
|
-
}
|
|
74
|
-
export type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
|
|
75
|
-
/**
|
|
76
|
-
* Sets each value in `values` on the current entity.
|
|
77
|
-
*
|
|
78
|
-
* The default behavior is that passing a value as either `null` or `undefined` will set
|
|
79
|
-
* the field as `undefined`, i.e. automatic `null` to `undefined` conversion.
|
|
80
|
-
*
|
|
81
|
-
* However, if you pass `ignoreUndefined: true`, then any opt that is `undefined` will be treated
|
|
82
|
-
* as "do not set", and `null` will still mean "set to `undefined`". This is useful for implementing
|
|
83
|
-
* APIs were an input of `undefined` means "do not set / noop" and `null` means "unset".
|
|
84
|
-
*
|
|
85
|
-
* Note that constructors _always_ call this method, but if the call is coming from `em.hydrate`, we
|
|
86
|
-
* use `values` being a primary key to short-circuit and let `hydrate` set the fields via the serde
|
|
87
|
-
* `setOnEntity` methods.
|
|
88
|
-
*/
|
|
89
|
-
export declare function setOpts<T extends Entity>(entity: T, values: Partial<OptsOf<T>> | undefined, opts?: {
|
|
90
|
-
partial?: boolean;
|
|
91
|
-
calledFromConstructor?: boolean;
|
|
92
|
-
}): void;
|
|
93
|
-
/**
|
|
94
|
-
* Applies some standard behavior & protections to `entity[key] = value`. I.e.
|
|
95
|
-
*
|
|
96
|
-
* - We don't set over AsyncProperties/relations/etc., and instead call current.set(value)
|
|
97
|
-
* - We catch missing/invalid field names
|
|
98
|
-
* - We handle FactoryInitialValues
|
|
99
|
-
*/
|
|
100
|
-
export declare function setOpt<T extends Entity>(meta: EntityMetadata<T>, entity: T, key: string, _value: any, partial?: boolean, calledFromConstructor?: boolean): void;
|
|
101
|
-
export declare function ensureNotDeleted(entity: Entity, ignore?: "pending"): void;
|
|
102
|
-
/** Adds `null` to every key in `T` to accept partial-update-style input. */
|
|
103
|
-
export type PartialOrNull<T> = {
|
|
104
|
-
[P in keyof T]?: T[P] | null;
|
|
105
|
-
};
|
|
106
|
-
export declare function getRequiredKeys<T extends Entity>(entity: T): string[];
|
|
107
|
-
export declare function getRequiredKeys<T extends Entity>(type: EntityConstructor<T>): string[];
|
|
108
|
-
export declare function getRelations(entity: Entity): AbstractRelationImpl<any, any>[];
|
|
109
|
-
export declare function getRelationEntries(entity: Entity): [string, AbstractRelationImpl<any, any>][];
|
|
110
|
-
/** Casts a "maybe abstract" cstr to a concrete cstr when the calling code knows it's safe. */
|
|
111
|
-
export declare function asConcreteCstr<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): EntityConstructor<T>;
|
|
112
|
-
/**
|
|
113
|
-
* Thrown when `.id` is accessed on an entity that does not have an id yet.
|
|
114
|
-
*
|
|
115
|
-
* For Postgres, entities are actually allowed to have ids pre-INSERT, if you call
|
|
116
|
-
* `em.assignNewIds()`. Other databases typically require INSERTs to trigger the auto
|
|
117
|
-
* id assignment.
|
|
118
|
-
*/
|
|
119
|
-
export declare class NoIdError extends Error {
|
|
120
|
-
}
|
|
121
|
-
/** Throws a `NoIdError` for `entity`, i.e. because `id` was called before being saved. */
|
|
122
|
-
export declare function failNoIdYet(entity: string): never;
|
|
123
|
-
/**
|
|
124
|
-
* Add a static function since getters can't have type guards.
|
|
125
|
-
*
|
|
126
|
-
* See https://github.com/microsoft/TypeScript/issues/43368
|
|
127
|
-
*/
|
|
128
|
-
export declare function isNewEntity<T extends Entity>(entity: T): entity is New<T>;
|
|
1
|
+
export * from "joist-core";
|
|
2
|
+
export { ConnectionConfig, Deferred, groupBy, isPlainObject, keyBy, newPgConnectionConfig } from "joist-utils";
|
|
3
|
+
export type { CallbackFn } from "joist-utils";
|
|
129
4
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAC;AAG3B,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC/G,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
|