@decaf-ts/core 0.13.1 → 0.14.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/README.md +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/lib/cjs/auth/constants.js.map +1 -0
- package/lib/cjs/auth/decorators.js.map +1 -0
- package/lib/cjs/auth/index.js.map +1 -0
- package/lib/cjs/fs/FilesystemAdapter.js.map +1 -0
- package/lib/cjs/fs/FsDispatch.js.map +1 -0
- package/lib/cjs/fs/helpers.js.map +1 -0
- package/lib/cjs/fs/index.js.map +1 -0
- package/lib/cjs/fs/indexStore.js.map +1 -0
- package/lib/cjs/fs/locks/FilesystemLock.js.map +1 -0
- package/lib/cjs/fs/locks/FilesystemMultiLock.js.map +1 -0
- package/lib/{fs → cjs/fs}/types.js.map +1 -1
- package/lib/cjs/identity/decorators.js.map +1 -0
- package/lib/cjs/identity/index.js.map +1 -0
- package/lib/{index.cjs → cjs/index.cjs} +1 -1
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/interfaces/ContextuallyLogged.js.map +1 -0
- package/lib/cjs/interfaces/ErrorParser.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/Executor.js.map +1 -1
- package/lib/cjs/interfaces/Observable.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/Observer.js.map +1 -1
- package/lib/cjs/interfaces/Paginatable.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/Queriable.js.map +1 -1
- package/lib/cjs/interfaces/RawExecutor.js.map +1 -0
- package/lib/cjs/interfaces/SequenceOptions.js.map +1 -0
- package/lib/cjs/interfaces/index.js.map +1 -0
- package/lib/cjs/migrations/Migration.js.map +1 -0
- package/lib/cjs/migrations/MigrationService.js.map +1 -0
- package/lib/cjs/migrations/MigrationTaskBuilder.js.map +1 -0
- package/lib/cjs/migrations/MigrationTasks.js.map +1 -0
- package/lib/cjs/migrations/MigrationVersioning.js.map +1 -0
- package/lib/cjs/migrations/SemverMigrationVersioning.js.map +1 -0
- package/lib/cjs/migrations/StandardMigrationVersioning.js.map +1 -0
- package/lib/cjs/migrations/constants.js.map +1 -0
- package/lib/cjs/migrations/decorators.js.map +1 -0
- package/lib/cjs/migrations/index.js.map +1 -0
- package/lib/{persistence → cjs/migrations}/types.js.map +1 -1
- package/lib/cjs/model/BaseModel.js.map +1 -0
- package/lib/cjs/model/SequenceModel.js.map +1 -0
- package/lib/cjs/model/construction.js.map +1 -0
- package/lib/cjs/model/decorators.js.map +1 -0
- package/lib/cjs/model/index.js.map +1 -0
- package/lib/cjs/model/indexing.js.map +1 -0
- package/lib/{model → cjs/model}/types.js.map +1 -1
- package/lib/cjs/overrides/Metadata.js.map +1 -0
- package/lib/cjs/overrides/Model.js.map +1 -0
- package/lib/cjs/overrides/ModelBuilder.js.map +1 -0
- package/lib/cjs/overrides/index.js.map +1 -0
- package/lib/cjs/overrides/injectables.js.map +1 -0
- package/lib/cjs/overrides/overrides.js.map +1 -0
- package/lib/{persistence → cjs/persistence}/Adapter.cjs +12 -4
- package/lib/cjs/persistence/Adapter.js.map +1 -0
- package/lib/cjs/persistence/Context.js.map +1 -0
- package/lib/cjs/persistence/ContextLock.js.map +1 -0
- package/lib/cjs/persistence/Dispatch.js.map +1 -0
- package/lib/cjs/persistence/ObserverHandler.js.map +1 -0
- package/lib/cjs/persistence/Sequence.js.map +1 -0
- package/lib/cjs/persistence/constants.js.map +1 -0
- package/lib/cjs/persistence/decorators.js.map +1 -0
- package/lib/cjs/persistence/errors.js.map +1 -0
- package/lib/cjs/persistence/event-filters.js.map +1 -0
- package/lib/cjs/persistence/generators.js.map +1 -0
- package/lib/cjs/persistence/index.js.map +1 -0
- package/lib/cjs/persistence/transactions.js.map +1 -0
- package/lib/cjs/persistence/types.js.map +1 -0
- package/lib/cjs/query/Condition.js.map +1 -0
- package/lib/cjs/query/MethodQueryBuilder.js.map +1 -0
- package/lib/cjs/query/Paginator.js.map +1 -0
- package/lib/cjs/query/Statement.js.map +1 -0
- package/lib/cjs/query/constants.js.map +1 -0
- package/lib/cjs/query/decorators.js.map +1 -0
- package/lib/cjs/query/errors.js.map +1 -0
- package/lib/cjs/query/index.js.map +1 -0
- package/lib/{query → cjs/query}/options.js.map +1 -1
- package/lib/{query → cjs/query}/selectors.js.map +1 -1
- package/lib/cjs/query/types.js.map +1 -0
- package/lib/cjs/query/utils.js.map +1 -0
- package/lib/cjs/ram/RamAdapter.js.map +1 -0
- package/lib/cjs/ram/RamPaginator.js.map +1 -0
- package/lib/cjs/ram/RamStatement.js.map +1 -0
- package/lib/cjs/ram/constants.js.map +1 -0
- package/lib/cjs/ram/handlers.js.map +1 -0
- package/lib/cjs/ram/index.js.map +1 -0
- package/lib/{tasks → cjs/ram}/types.js.map +1 -1
- package/lib/{repository → cjs/repository}/Repository.cjs +10 -2
- package/lib/cjs/repository/Repository.js.map +1 -0
- package/lib/cjs/repository/constants.js.map +1 -0
- package/lib/cjs/repository/decorators.js.map +1 -0
- package/lib/cjs/repository/errors.js.map +1 -0
- package/lib/cjs/repository/index.js.map +1 -0
- package/lib/cjs/repository/injectables.js.map +1 -0
- package/lib/cjs/repository/types.js.map +1 -0
- package/lib/cjs/repository/utils.js.map +1 -0
- package/lib/cjs/services/ModelService.js.map +1 -0
- package/lib/cjs/services/PersistenceService.js.map +1 -0
- package/lib/cjs/services/index.js.map +1 -0
- package/lib/cjs/services/services.js.map +1 -0
- package/lib/cjs/tasks/CleanUpTask.js.map +1 -0
- package/lib/cjs/tasks/TaskContext.js.map +1 -0
- package/lib/cjs/tasks/TaskEngine.js.map +1 -0
- package/lib/cjs/tasks/TaskErrors.js.map +1 -0
- package/lib/cjs/tasks/TaskEventBus.js.map +1 -0
- package/lib/cjs/tasks/TaskEventService.js.map +1 -0
- package/lib/cjs/tasks/TaskHandler.js.map +1 -0
- package/lib/cjs/tasks/TaskHandlerRegistry.js.map +1 -0
- package/lib/cjs/tasks/TaskService.js.map +1 -0
- package/lib/cjs/tasks/TaskStateChangeError.js.map +1 -0
- package/lib/cjs/tasks/TaskTracker.js.map +1 -0
- package/lib/cjs/tasks/builder.js.map +1 -0
- package/lib/cjs/tasks/constants.js.map +1 -0
- package/lib/cjs/tasks/decorators.js.map +1 -0
- package/lib/cjs/tasks/index.js.map +1 -0
- package/lib/cjs/tasks/logging.js.map +1 -0
- package/lib/cjs/tasks/models/TaskBackoffModel.js.map +1 -0
- package/lib/cjs/tasks/models/TaskErrorModel.js.map +1 -0
- package/lib/cjs/tasks/models/TaskEventModel.js.map +1 -0
- package/lib/cjs/tasks/models/TaskIOSerializer.js.map +1 -0
- package/lib/cjs/tasks/models/TaskLogEntryModel.js.map +1 -0
- package/lib/cjs/tasks/models/TaskModel.js.map +1 -0
- package/lib/cjs/tasks/models/TaskStepResultModel.js.map +1 -0
- package/lib/cjs/tasks/models/TaskStepSpecModel.js.map +1 -0
- package/lib/cjs/tasks/models/index.js.map +1 -0
- package/lib/{ram → cjs/tasks}/types.js.map +1 -1
- package/lib/cjs/tasks/utils.js.map +1 -0
- package/lib/cjs/utils/ContextualLoggedClass.js.map +1 -0
- package/lib/cjs/utils/decorators.js.map +1 -0
- package/lib/cjs/utils/errors.js.map +1 -0
- package/lib/cjs/utils/index.js.map +1 -0
- package/lib/cjs/utils/throttling.js.map +1 -0
- package/lib/cjs/utils/types.js.map +1 -0
- package/lib/cjs/utils/utils.js.map +1 -0
- package/lib/cjs/workers/TaskEngine.js.map +1 -0
- package/lib/cjs/workers/WorkThreadEnvironment.js.map +1 -0
- package/lib/cjs/workers/index.js.map +1 -0
- package/lib/{workers → cjs/workers}/messages.js.map +1 -1
- package/lib/{migrations → cjs/workers}/types.js.map +1 -1
- package/lib/cjs/workers/workerThread.js.map +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/persistence/Adapter.js +12 -4
- package/lib/esm/persistence/Adapter.js.map +1 -1
- package/lib/esm/repository/Repository.js +10 -2
- package/lib/esm/repository/Repository.js.map +1 -1
- package/lib/{esm → types}/index.d.ts +1 -1
- package/lib/{esm → types}/persistence/transactions.d.ts +1 -1
- package/lib/{repository → types/repository}/Repository.d.ts +1 -1
- package/lib/{services → types/services}/ModelService.d.ts +2 -2
- package/lib/{esm → types}/tasks/TaskService.d.ts +2 -2
- package/package.json +26 -20
- package/lib/auth/constants.js.map +0 -1
- package/lib/auth/decorators.js.map +0 -1
- package/lib/auth/index.js.map +0 -1
- package/lib/esm/auth/constants.d.ts +0 -5
- package/lib/esm/auth/decorators.d.ts +0 -5
- package/lib/esm/auth/index.d.ts +0 -2
- package/lib/esm/repository/Repository.d.ts +0 -501
- package/lib/esm/services/ModelService.d.ts +0 -45
- package/lib/fs/FilesystemAdapter.d.ts +0 -70
- package/lib/fs/FilesystemAdapter.js.map +0 -1
- package/lib/fs/FsDispatch.d.ts +0 -7
- package/lib/fs/FsDispatch.js.map +0 -1
- package/lib/fs/helpers.d.ts +0 -17
- package/lib/fs/helpers.js.map +0 -1
- package/lib/fs/index.d.ts +0 -4
- package/lib/fs/index.js.map +0 -1
- package/lib/fs/indexStore.d.ts +0 -28
- package/lib/fs/indexStore.js.map +0 -1
- package/lib/fs/locks/FilesystemLock.d.ts +0 -13
- package/lib/fs/locks/FilesystemLock.js.map +0 -1
- package/lib/fs/locks/FilesystemMultiLock.d.ts +0 -8
- package/lib/fs/locks/FilesystemMultiLock.js.map +0 -1
- package/lib/fs/types.d.ts +0 -40
- package/lib/identity/decorators.d.ts +0 -72
- package/lib/identity/decorators.js.map +0 -1
- package/lib/identity/index.d.ts +0 -6
- package/lib/identity/index.js.map +0 -1
- package/lib/index.d.ts +0 -33
- package/lib/index.js.map +0 -1
- package/lib/interfaces/ContextuallyLogged.d.ts +0 -8
- package/lib/interfaces/ContextuallyLogged.js.map +0 -1
- package/lib/interfaces/ErrorParser.d.ts +0 -16
- package/lib/interfaces/ErrorParser.js.map +0 -1
- package/lib/interfaces/Executor.d.ts +0 -16
- package/lib/interfaces/Observable.d.ts +0 -33
- package/lib/interfaces/Observable.js.map +0 -1
- package/lib/interfaces/Observer.d.ts +0 -15
- package/lib/interfaces/Paginatable.d.ts +0 -20
- package/lib/interfaces/Paginatable.js.map +0 -1
- package/lib/interfaces/Queriable.d.ts +0 -47
- package/lib/interfaces/RawExecutor.d.ts +0 -28
- package/lib/interfaces/RawExecutor.js.map +0 -1
- package/lib/interfaces/SequenceOptions.d.ts +0 -79
- package/lib/interfaces/SequenceOptions.js.map +0 -1
- package/lib/interfaces/index.d.ts +0 -12
- package/lib/interfaces/index.js.map +0 -1
- package/lib/migrations/Migration.d.ts +0 -19
- package/lib/migrations/Migration.js.map +0 -1
- package/lib/migrations/MigrationService.d.ts +0 -63
- package/lib/migrations/MigrationService.js.map +0 -1
- package/lib/migrations/MigrationTaskBuilder.d.ts +0 -10
- package/lib/migrations/MigrationTaskBuilder.js.map +0 -1
- package/lib/migrations/MigrationTasks.d.ts +0 -9
- package/lib/migrations/MigrationTasks.js.map +0 -1
- package/lib/migrations/MigrationVersioning.d.ts +0 -7
- package/lib/migrations/MigrationVersioning.js.map +0 -1
- package/lib/migrations/SemverMigrationVersioning.d.ts +0 -10
- package/lib/migrations/SemverMigrationVersioning.js.map +0 -1
- package/lib/migrations/StandardMigrationVersioning.d.ts +0 -12
- package/lib/migrations/StandardMigrationVersioning.js.map +0 -1
- package/lib/migrations/constants.d.ts +0 -2
- package/lib/migrations/constants.js.map +0 -1
- package/lib/migrations/decorators.d.ts +0 -12
- package/lib/migrations/decorators.js.map +0 -1
- package/lib/migrations/index.d.ts +0 -14
- package/lib/migrations/index.js.map +0 -1
- package/lib/migrations/types.d.ts +0 -46
- package/lib/model/BaseModel.d.ts +0 -37
- package/lib/model/BaseModel.js.map +0 -1
- package/lib/model/SequenceModel.d.ts +0 -32
- package/lib/model/SequenceModel.js.map +0 -1
- package/lib/model/construction.d.ts +0 -455
- package/lib/model/construction.js.map +0 -1
- package/lib/model/decorators.d.ts +0 -237
- package/lib/model/decorators.js.map +0 -1
- package/lib/model/index.d.ts +0 -11
- package/lib/model/index.js.map +0 -1
- package/lib/model/indexing.d.ts +0 -20
- package/lib/model/indexing.js.map +0 -1
- package/lib/model/types.d.ts +0 -60
- package/lib/overrides/Metadata.d.ts +0 -22
- package/lib/overrides/Metadata.js.map +0 -1
- package/lib/overrides/Model.d.ts +0 -94
- package/lib/overrides/Model.js.map +0 -1
- package/lib/overrides/ModelBuilder.d.ts +0 -31
- package/lib/overrides/ModelBuilder.js.map +0 -1
- package/lib/overrides/index.d.ts +0 -10
- package/lib/overrides/index.js.map +0 -1
- package/lib/overrides/injectables.d.ts +0 -10
- package/lib/overrides/injectables.js.map +0 -1
- package/lib/overrides/overrides.d.ts +0 -1
- package/lib/overrides/overrides.js.map +0 -1
- package/lib/persistence/Adapter.d.ts +0 -469
- package/lib/persistence/Adapter.js.map +0 -1
- package/lib/persistence/Context.d.ts +0 -16
- package/lib/persistence/Context.js.map +0 -1
- package/lib/persistence/ContextLock.d.ts +0 -18
- package/lib/persistence/ContextLock.js.map +0 -1
- package/lib/persistence/Dispatch.d.ts +0 -128
- package/lib/persistence/Dispatch.js.map +0 -1
- package/lib/persistence/ObserverHandler.d.ts +0 -111
- package/lib/persistence/ObserverHandler.js.map +0 -1
- package/lib/persistence/Sequence.d.ts +0 -126
- package/lib/persistence/Sequence.js.map +0 -1
- package/lib/persistence/constants.d.ts +0 -74
- package/lib/persistence/constants.js.map +0 -1
- package/lib/persistence/decorators.d.ts +0 -28
- package/lib/persistence/decorators.js.map +0 -1
- package/lib/persistence/errors.d.ts +0 -33
- package/lib/persistence/errors.js.map +0 -1
- package/lib/persistence/event-filters.d.ts +0 -20
- package/lib/persistence/event-filters.js.map +0 -1
- package/lib/persistence/generators.d.ts +0 -14
- package/lib/persistence/generators.js.map +0 -1
- package/lib/persistence/index.d.ts +0 -18
- package/lib/persistence/index.js.map +0 -1
- package/lib/persistence/transactions.d.ts +0 -4
- package/lib/persistence/transactions.js.map +0 -1
- package/lib/persistence/types.d.ts +0 -86
- package/lib/query/Condition.d.ts +0 -131
- package/lib/query/Condition.js.map +0 -1
- package/lib/query/MethodQueryBuilder.d.ts +0 -185
- package/lib/query/MethodQueryBuilder.js.map +0 -1
- package/lib/query/Paginator.d.ts +0 -105
- package/lib/query/Paginator.js.map +0 -1
- package/lib/query/Statement.d.ts +0 -136
- package/lib/query/Statement.js.map +0 -1
- package/lib/query/constants.d.ts +0 -69
- package/lib/query/constants.js.map +0 -1
- package/lib/query/decorators.d.ts +0 -8
- package/lib/query/decorators.js.map +0 -1
- package/lib/query/errors.d.ts +0 -21
- package/lib/query/errors.js.map +0 -1
- package/lib/query/index.d.ts +0 -16
- package/lib/query/index.js.map +0 -1
- package/lib/query/options.d.ts +0 -393
- package/lib/query/selectors.d.ts +0 -39
- package/lib/query/types.d.ts +0 -158
- package/lib/query/types.js.map +0 -1
- package/lib/query/utils.d.ts +0 -40
- package/lib/query/utils.js.map +0 -1
- package/lib/ram/RamAdapter.d.ts +0 -341
- package/lib/ram/RamAdapter.js.map +0 -1
- package/lib/ram/RamPaginator.d.ts +0 -54
- package/lib/ram/RamPaginator.js.map +0 -1
- package/lib/ram/RamStatement.d.ts +0 -92
- package/lib/ram/RamStatement.js.map +0 -1
- package/lib/ram/constants.d.ts +0 -8
- package/lib/ram/constants.js.map +0 -1
- package/lib/ram/handlers.d.ts +0 -24
- package/lib/ram/handlers.js.map +0 -1
- package/lib/ram/index.d.ts +0 -6
- package/lib/ram/index.js.map +0 -1
- package/lib/ram/types.d.ts +0 -50
- package/lib/repository/Repository.js.map +0 -1
- package/lib/repository/constants.d.ts +0 -36
- package/lib/repository/constants.js.map +0 -1
- package/lib/repository/decorators.d.ts +0 -30
- package/lib/repository/decorators.js.map +0 -1
- package/lib/repository/errors.d.ts +0 -19
- package/lib/repository/errors.js.map +0 -1
- package/lib/repository/index.d.ts +0 -12
- package/lib/repository/index.js.map +0 -1
- package/lib/repository/injectables.d.ts +0 -95
- package/lib/repository/injectables.js.map +0 -1
- package/lib/repository/types.d.ts +0 -28
- package/lib/repository/types.js.map +0 -1
- package/lib/repository/utils.d.ts +0 -36
- package/lib/repository/utils.js.map +0 -1
- package/lib/services/ModelService.js.map +0 -1
- package/lib/services/PersistenceService.d.ts +0 -17
- package/lib/services/PersistenceService.js.map +0 -1
- package/lib/services/index.d.ts +0 -8
- package/lib/services/index.js.map +0 -1
- package/lib/services/services.d.ts +0 -96
- package/lib/services/services.js.map +0 -1
- package/lib/tasks/CleanUpTask.d.ts +0 -15
- package/lib/tasks/CleanUpTask.js.map +0 -1
- package/lib/tasks/TaskContext.d.ts +0 -30
- package/lib/tasks/TaskContext.js.map +0 -1
- package/lib/tasks/TaskEngine.d.ts +0 -97
- package/lib/tasks/TaskEngine.js.map +0 -1
- package/lib/tasks/TaskErrors.d.ts +0 -65
- package/lib/tasks/TaskErrors.js.map +0 -1
- package/lib/tasks/TaskEventBus.d.ts +0 -17
- package/lib/tasks/TaskEventBus.js.map +0 -1
- package/lib/tasks/TaskEventService.d.ts +0 -7
- package/lib/tasks/TaskEventService.js.map +0 -1
- package/lib/tasks/TaskHandler.d.ts +0 -12
- package/lib/tasks/TaskHandler.js.map +0 -1
- package/lib/tasks/TaskHandlerRegistry.d.ts +0 -8
- package/lib/tasks/TaskHandlerRegistry.js.map +0 -1
- package/lib/tasks/TaskService.d.ts +0 -65
- package/lib/tasks/TaskService.js.map +0 -1
- package/lib/tasks/TaskStateChangeError.d.ts +0 -11
- package/lib/tasks/TaskStateChangeError.js.map +0 -1
- package/lib/tasks/TaskTracker.d.ts +0 -47
- package/lib/tasks/TaskTracker.js.map +0 -1
- package/lib/tasks/builder.d.ts +0 -72
- package/lib/tasks/builder.js.map +0 -1
- package/lib/tasks/constants.d.ts +0 -31
- package/lib/tasks/constants.js.map +0 -1
- package/lib/tasks/decorators.d.ts +0 -4
- package/lib/tasks/decorators.js.map +0 -1
- package/lib/tasks/index.d.ts +0 -22
- package/lib/tasks/index.js.map +0 -1
- package/lib/tasks/logging.d.ts +0 -31
- package/lib/tasks/logging.js.map +0 -1
- package/lib/tasks/models/TaskBackoffModel.d.ts +0 -9
- package/lib/tasks/models/TaskBackoffModel.js.map +0 -1
- package/lib/tasks/models/TaskErrorModel.d.ts +0 -8
- package/lib/tasks/models/TaskErrorModel.js.map +0 -1
- package/lib/tasks/models/TaskEventModel.d.ts +0 -11
- package/lib/tasks/models/TaskEventModel.js.map +0 -1
- package/lib/tasks/models/TaskIOSerializer.d.ts +0 -33
- package/lib/tasks/models/TaskIOSerializer.js.map +0 -1
- package/lib/tasks/models/TaskLogEntryModel.d.ts +0 -10
- package/lib/tasks/models/TaskLogEntryModel.js.map +0 -1
- package/lib/tasks/models/TaskModel.d.ts +0 -43
- package/lib/tasks/models/TaskModel.js.map +0 -1
- package/lib/tasks/models/TaskStepResultModel.d.ts +0 -9
- package/lib/tasks/models/TaskStepResultModel.js.map +0 -1
- package/lib/tasks/models/TaskStepSpecModel.d.ts +0 -9
- package/lib/tasks/models/TaskStepSpecModel.js.map +0 -1
- package/lib/tasks/models/index.d.ts +0 -8
- package/lib/tasks/models/index.js.map +0 -1
- package/lib/tasks/types.d.ts +0 -71
- package/lib/tasks/utils.d.ts +0 -5
- package/lib/tasks/utils.js.map +0 -1
- package/lib/utils/ContextualLoggedClass.d.ts +0 -37
- package/lib/utils/ContextualLoggedClass.js.map +0 -1
- package/lib/utils/decorators.d.ts +0 -27
- package/lib/utils/decorators.js.map +0 -1
- package/lib/utils/errors.d.ts +0 -56
- package/lib/utils/errors.js.map +0 -1
- package/lib/utils/index.d.ts +0 -11
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/throttling.d.ts +0 -9
- package/lib/utils/throttling.js.map +0 -1
- package/lib/utils/types.d.ts +0 -23
- package/lib/utils/types.js.map +0 -1
- package/lib/utils/utils.d.ts +0 -22
- package/lib/utils/utils.js.map +0 -1
- package/lib/workers/TaskEngine.d.ts +0 -40
- package/lib/workers/TaskEngine.js.map +0 -1
- package/lib/workers/WorkThreadEnvironment.d.ts +0 -35
- package/lib/workers/WorkThreadEnvironment.js.map +0 -1
- package/lib/workers/index.d.ts +0 -4
- package/lib/workers/index.js.map +0 -1
- package/lib/workers/messages.d.ts +0 -69
- package/lib/workers/types.d.ts +0 -41
- package/lib/workers/types.js.map +0 -1
- package/lib/workers/workerThread.d.ts +0 -1
- package/lib/workers/workerThread.js.map +0 -1
- /package/lib/{auth → cjs/auth}/constants.cjs +0 -0
- /package/lib/{auth → cjs/auth}/decorators.cjs +0 -0
- /package/lib/{auth → cjs/auth}/index.cjs +0 -0
- /package/lib/{fs → cjs/fs}/FilesystemAdapter.cjs +0 -0
- /package/lib/{fs → cjs/fs}/FsDispatch.cjs +0 -0
- /package/lib/{fs → cjs/fs}/helpers.cjs +0 -0
- /package/lib/{fs → cjs/fs}/index.cjs +0 -0
- /package/lib/{fs → cjs/fs}/indexStore.cjs +0 -0
- /package/lib/{fs → cjs/fs}/locks/FilesystemLock.cjs +0 -0
- /package/lib/{fs → cjs/fs}/locks/FilesystemMultiLock.cjs +0 -0
- /package/lib/{fs → cjs/fs}/types.cjs +0 -0
- /package/lib/{identity → cjs/identity}/decorators.cjs +0 -0
- /package/lib/{identity → cjs/identity}/index.cjs +0 -0
- /package/lib/{interfaces → cjs/interfaces}/ContextuallyLogged.cjs +0 -0
- /package/lib/{interfaces → cjs/interfaces}/ErrorParser.cjs +0 -0
- /package/lib/{interfaces → cjs/interfaces}/Executor.cjs +0 -0
- /package/lib/{interfaces → cjs/interfaces}/Observable.cjs +0 -0
- /package/lib/{interfaces → cjs/interfaces}/Observer.cjs +0 -0
- /package/lib/{interfaces → cjs/interfaces}/Paginatable.cjs +0 -0
- /package/lib/{interfaces → cjs/interfaces}/Queriable.cjs +0 -0
- /package/lib/{interfaces → cjs/interfaces}/RawExecutor.cjs +0 -0
- /package/lib/{interfaces → cjs/interfaces}/SequenceOptions.cjs +0 -0
- /package/lib/{interfaces → cjs/interfaces}/index.cjs +0 -0
- /package/lib/{migrations → cjs/migrations}/Migration.cjs +0 -0
- /package/lib/{migrations → cjs/migrations}/MigrationService.cjs +0 -0
- /package/lib/{migrations → cjs/migrations}/MigrationTaskBuilder.cjs +0 -0
- /package/lib/{migrations → cjs/migrations}/MigrationTasks.cjs +0 -0
- /package/lib/{migrations → cjs/migrations}/MigrationVersioning.cjs +0 -0
- /package/lib/{migrations → cjs/migrations}/SemverMigrationVersioning.cjs +0 -0
- /package/lib/{migrations → cjs/migrations}/StandardMigrationVersioning.cjs +0 -0
- /package/lib/{migrations → cjs/migrations}/constants.cjs +0 -0
- /package/lib/{migrations → cjs/migrations}/decorators.cjs +0 -0
- /package/lib/{migrations → cjs/migrations}/index.cjs +0 -0
- /package/lib/{migrations → cjs/migrations}/types.cjs +0 -0
- /package/lib/{model → cjs/model}/BaseModel.cjs +0 -0
- /package/lib/{model → cjs/model}/SequenceModel.cjs +0 -0
- /package/lib/{model → cjs/model}/construction.cjs +0 -0
- /package/lib/{model → cjs/model}/decorators.cjs +0 -0
- /package/lib/{model → cjs/model}/index.cjs +0 -0
- /package/lib/{model → cjs/model}/indexing.cjs +0 -0
- /package/lib/{model → cjs/model}/types.cjs +0 -0
- /package/lib/{overrides → cjs/overrides}/Metadata.cjs +0 -0
- /package/lib/{overrides → cjs/overrides}/Model.cjs +0 -0
- /package/lib/{overrides → cjs/overrides}/ModelBuilder.cjs +0 -0
- /package/lib/{overrides → cjs/overrides}/index.cjs +0 -0
- /package/lib/{overrides → cjs/overrides}/injectables.cjs +0 -0
- /package/lib/{overrides → cjs/overrides}/overrides.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/Context.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/ContextLock.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/Dispatch.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/ObserverHandler.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/Sequence.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/constants.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/decorators.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/errors.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/event-filters.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/generators.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/index.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/transactions.cjs +0 -0
- /package/lib/{persistence → cjs/persistence}/types.cjs +0 -0
- /package/lib/{query → cjs/query}/Condition.cjs +0 -0
- /package/lib/{query → cjs/query}/MethodQueryBuilder.cjs +0 -0
- /package/lib/{query → cjs/query}/Paginator.cjs +0 -0
- /package/lib/{query → cjs/query}/Statement.cjs +0 -0
- /package/lib/{query → cjs/query}/constants.cjs +0 -0
- /package/lib/{query → cjs/query}/decorators.cjs +0 -0
- /package/lib/{query → cjs/query}/errors.cjs +0 -0
- /package/lib/{query → cjs/query}/index.cjs +0 -0
- /package/lib/{query → cjs/query}/options.cjs +0 -0
- /package/lib/{query → cjs/query}/selectors.cjs +0 -0
- /package/lib/{query → cjs/query}/types.cjs +0 -0
- /package/lib/{query → cjs/query}/utils.cjs +0 -0
- /package/lib/{ram → cjs/ram}/RamAdapter.cjs +0 -0
- /package/lib/{ram → cjs/ram}/RamPaginator.cjs +0 -0
- /package/lib/{ram → cjs/ram}/RamStatement.cjs +0 -0
- /package/lib/{ram → cjs/ram}/constants.cjs +0 -0
- /package/lib/{ram → cjs/ram}/handlers.cjs +0 -0
- /package/lib/{ram → cjs/ram}/index.cjs +0 -0
- /package/lib/{ram → cjs/ram}/types.cjs +0 -0
- /package/lib/{repository → cjs/repository}/constants.cjs +0 -0
- /package/lib/{repository → cjs/repository}/decorators.cjs +0 -0
- /package/lib/{repository → cjs/repository}/errors.cjs +0 -0
- /package/lib/{repository → cjs/repository}/index.cjs +0 -0
- /package/lib/{repository → cjs/repository}/injectables.cjs +0 -0
- /package/lib/{repository → cjs/repository}/types.cjs +0 -0
- /package/lib/{repository → cjs/repository}/utils.cjs +0 -0
- /package/lib/{services → cjs/services}/ModelService.cjs +0 -0
- /package/lib/{services → cjs/services}/PersistenceService.cjs +0 -0
- /package/lib/{services → cjs/services}/index.cjs +0 -0
- /package/lib/{services → cjs/services}/services.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/CleanUpTask.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/TaskContext.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/TaskEngine.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/TaskErrors.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/TaskEventBus.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/TaskEventService.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/TaskHandler.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/TaskHandlerRegistry.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/TaskService.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/TaskStateChangeError.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/TaskTracker.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/builder.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/constants.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/decorators.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/index.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/logging.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/models/TaskBackoffModel.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/models/TaskErrorModel.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/models/TaskEventModel.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/models/TaskIOSerializer.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/models/TaskLogEntryModel.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/models/TaskModel.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/models/TaskStepResultModel.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/models/TaskStepSpecModel.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/models/index.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/types.cjs +0 -0
- /package/lib/{tasks → cjs/tasks}/utils.cjs +0 -0
- /package/lib/{utils → cjs/utils}/ContextualLoggedClass.cjs +0 -0
- /package/lib/{utils → cjs/utils}/decorators.cjs +0 -0
- /package/lib/{utils → cjs/utils}/errors.cjs +0 -0
- /package/lib/{utils → cjs/utils}/index.cjs +0 -0
- /package/lib/{utils → cjs/utils}/throttling.cjs +0 -0
- /package/lib/{utils → cjs/utils}/types.cjs +0 -0
- /package/lib/{utils → cjs/utils}/utils.cjs +0 -0
- /package/lib/{workers → cjs/workers}/TaskEngine.cjs +0 -0
- /package/lib/{workers → cjs/workers}/WorkThreadEnvironment.cjs +0 -0
- /package/lib/{workers → cjs/workers}/index.cjs +0 -0
- /package/lib/{workers → cjs/workers}/messages.cjs +0 -0
- /package/lib/{workers → cjs/workers}/types.cjs +0 -0
- /package/lib/{workers → cjs/workers}/workerThread.cjs +0 -0
- /package/lib/{auth → types/auth}/constants.d.ts +0 -0
- /package/lib/{auth → types/auth}/decorators.d.ts +0 -0
- /package/lib/{auth → types/auth}/index.d.ts +0 -0
- /package/lib/{esm → types}/fs/FilesystemAdapter.d.ts +0 -0
- /package/lib/{esm → types}/fs/FsDispatch.d.ts +0 -0
- /package/lib/{esm → types}/fs/helpers.d.ts +0 -0
- /package/lib/{esm → types}/fs/index.d.ts +0 -0
- /package/lib/{esm → types}/fs/indexStore.d.ts +0 -0
- /package/lib/{esm → types}/fs/locks/FilesystemLock.d.ts +0 -0
- /package/lib/{esm → types}/fs/locks/FilesystemMultiLock.d.ts +0 -0
- /package/lib/{esm → types}/fs/types.d.ts +0 -0
- /package/lib/{esm → types}/identity/decorators.d.ts +0 -0
- /package/lib/{esm → types}/identity/index.d.ts +0 -0
- /package/lib/{esm → types}/interfaces/ContextuallyLogged.d.ts +0 -0
- /package/lib/{esm → types}/interfaces/ErrorParser.d.ts +0 -0
- /package/lib/{esm → types}/interfaces/Executor.d.ts +0 -0
- /package/lib/{esm → types}/interfaces/Observable.d.ts +0 -0
- /package/lib/{esm → types}/interfaces/Observer.d.ts +0 -0
- /package/lib/{esm → types}/interfaces/Paginatable.d.ts +0 -0
- /package/lib/{esm → types}/interfaces/Queriable.d.ts +0 -0
- /package/lib/{esm → types}/interfaces/RawExecutor.d.ts +0 -0
- /package/lib/{esm → types}/interfaces/SequenceOptions.d.ts +0 -0
- /package/lib/{esm → types}/interfaces/index.d.ts +0 -0
- /package/lib/{esm → types}/migrations/Migration.d.ts +0 -0
- /package/lib/{esm → types}/migrations/MigrationService.d.ts +0 -0
- /package/lib/{esm → types}/migrations/MigrationTaskBuilder.d.ts +0 -0
- /package/lib/{esm → types}/migrations/MigrationTasks.d.ts +0 -0
- /package/lib/{esm → types}/migrations/MigrationVersioning.d.ts +0 -0
- /package/lib/{esm → types}/migrations/SemverMigrationVersioning.d.ts +0 -0
- /package/lib/{esm → types}/migrations/StandardMigrationVersioning.d.ts +0 -0
- /package/lib/{esm → types}/migrations/constants.d.ts +0 -0
- /package/lib/{esm → types}/migrations/decorators.d.ts +0 -0
- /package/lib/{esm → types}/migrations/index.d.ts +0 -0
- /package/lib/{esm → types}/migrations/types.d.ts +0 -0
- /package/lib/{esm → types}/model/BaseModel.d.ts +0 -0
- /package/lib/{esm → types}/model/SequenceModel.d.ts +0 -0
- /package/lib/{esm → types}/model/construction.d.ts +0 -0
- /package/lib/{esm → types}/model/decorators.d.ts +0 -0
- /package/lib/{esm → types}/model/index.d.ts +0 -0
- /package/lib/{esm → types}/model/indexing.d.ts +0 -0
- /package/lib/{esm → types}/model/types.d.ts +0 -0
- /package/lib/{esm → types}/overrides/Metadata.d.ts +0 -0
- /package/lib/{esm → types}/overrides/Model.d.ts +0 -0
- /package/lib/{esm → types}/overrides/ModelBuilder.d.ts +0 -0
- /package/lib/{esm → types}/overrides/index.d.ts +0 -0
- /package/lib/{esm → types}/overrides/injectables.d.ts +0 -0
- /package/lib/{esm → types}/overrides/overrides.d.ts +0 -0
- /package/lib/{esm → types}/persistence/Adapter.d.ts +0 -0
- /package/lib/{esm → types}/persistence/Context.d.ts +0 -0
- /package/lib/{esm → types}/persistence/ContextLock.d.ts +0 -0
- /package/lib/{esm → types}/persistence/Dispatch.d.ts +0 -0
- /package/lib/{esm → types}/persistence/ObserverHandler.d.ts +0 -0
- /package/lib/{esm → types}/persistence/Sequence.d.ts +0 -0
- /package/lib/{esm → types}/persistence/constants.d.ts +0 -0
- /package/lib/{esm → types}/persistence/decorators.d.ts +0 -0
- /package/lib/{esm → types}/persistence/errors.d.ts +0 -0
- /package/lib/{esm → types}/persistence/event-filters.d.ts +0 -0
- /package/lib/{esm → types}/persistence/generators.d.ts +0 -0
- /package/lib/{esm → types}/persistence/index.d.ts +0 -0
- /package/lib/{esm → types}/persistence/types.d.ts +0 -0
- /package/lib/{esm → types}/query/Condition.d.ts +0 -0
- /package/lib/{esm → types}/query/MethodQueryBuilder.d.ts +0 -0
- /package/lib/{esm → types}/query/Paginator.d.ts +0 -0
- /package/lib/{esm → types}/query/Statement.d.ts +0 -0
- /package/lib/{esm → types}/query/constants.d.ts +0 -0
- /package/lib/{esm → types}/query/decorators.d.ts +0 -0
- /package/lib/{esm → types}/query/errors.d.ts +0 -0
- /package/lib/{esm → types}/query/index.d.ts +0 -0
- /package/lib/{esm → types}/query/options.d.ts +0 -0
- /package/lib/{esm → types}/query/selectors.d.ts +0 -0
- /package/lib/{esm → types}/query/types.d.ts +0 -0
- /package/lib/{esm → types}/query/utils.d.ts +0 -0
- /package/lib/{esm → types}/ram/RamAdapter.d.ts +0 -0
- /package/lib/{esm → types}/ram/RamPaginator.d.ts +0 -0
- /package/lib/{esm → types}/ram/RamStatement.d.ts +0 -0
- /package/lib/{esm → types}/ram/constants.d.ts +0 -0
- /package/lib/{esm → types}/ram/handlers.d.ts +0 -0
- /package/lib/{esm → types}/ram/index.d.ts +0 -0
- /package/lib/{esm → types}/ram/types.d.ts +0 -0
- /package/lib/{esm → types}/repository/constants.d.ts +0 -0
- /package/lib/{esm → types}/repository/decorators.d.ts +0 -0
- /package/lib/{esm → types}/repository/errors.d.ts +0 -0
- /package/lib/{esm → types}/repository/index.d.ts +0 -0
- /package/lib/{esm → types}/repository/injectables.d.ts +0 -0
- /package/lib/{esm → types}/repository/types.d.ts +0 -0
- /package/lib/{esm → types}/repository/utils.d.ts +0 -0
- /package/lib/{esm → types}/services/PersistenceService.d.ts +0 -0
- /package/lib/{esm → types}/services/index.d.ts +0 -0
- /package/lib/{esm → types}/services/services.d.ts +0 -0
- /package/lib/{esm → types}/tasks/CleanUpTask.d.ts +0 -0
- /package/lib/{esm → types}/tasks/TaskContext.d.ts +0 -0
- /package/lib/{esm → types}/tasks/TaskEngine.d.ts +0 -0
- /package/lib/{esm → types}/tasks/TaskErrors.d.ts +0 -0
- /package/lib/{esm → types}/tasks/TaskEventBus.d.ts +0 -0
- /package/lib/{esm → types}/tasks/TaskEventService.d.ts +0 -0
- /package/lib/{esm → types}/tasks/TaskHandler.d.ts +0 -0
- /package/lib/{esm → types}/tasks/TaskHandlerRegistry.d.ts +0 -0
- /package/lib/{esm → types}/tasks/TaskStateChangeError.d.ts +0 -0
- /package/lib/{esm → types}/tasks/TaskTracker.d.ts +0 -0
- /package/lib/{esm → types}/tasks/builder.d.ts +0 -0
- /package/lib/{esm → types}/tasks/constants.d.ts +0 -0
- /package/lib/{esm → types}/tasks/decorators.d.ts +0 -0
- /package/lib/{esm → types}/tasks/index.d.ts +0 -0
- /package/lib/{esm → types}/tasks/logging.d.ts +0 -0
- /package/lib/{esm → types}/tasks/models/TaskBackoffModel.d.ts +0 -0
- /package/lib/{esm → types}/tasks/models/TaskErrorModel.d.ts +0 -0
- /package/lib/{esm → types}/tasks/models/TaskEventModel.d.ts +0 -0
- /package/lib/{esm → types}/tasks/models/TaskIOSerializer.d.ts +0 -0
- /package/lib/{esm → types}/tasks/models/TaskLogEntryModel.d.ts +0 -0
- /package/lib/{esm → types}/tasks/models/TaskModel.d.ts +0 -0
- /package/lib/{esm → types}/tasks/models/TaskStepResultModel.d.ts +0 -0
- /package/lib/{esm → types}/tasks/models/TaskStepSpecModel.d.ts +0 -0
- /package/lib/{esm → types}/tasks/models/index.d.ts +0 -0
- /package/lib/{esm → types}/tasks/types.d.ts +0 -0
- /package/lib/{esm → types}/tasks/utils.d.ts +0 -0
- /package/lib/{esm → types}/utils/ContextualLoggedClass.d.ts +0 -0
- /package/lib/{esm → types}/utils/decorators.d.ts +0 -0
- /package/lib/{esm → types}/utils/errors.d.ts +0 -0
- /package/lib/{esm → types}/utils/index.d.ts +0 -0
- /package/lib/{esm → types}/utils/throttling.d.ts +0 -0
- /package/lib/{esm → types}/utils/types.d.ts +0 -0
- /package/lib/{esm → types}/utils/utils.d.ts +0 -0
- /package/lib/{esm → types}/workers/TaskEngine.d.ts +0 -0
- /package/lib/{esm → types}/workers/WorkThreadEnvironment.d.ts +0 -0
- /package/lib/{esm → types}/workers/index.d.ts +0 -0
- /package/lib/{esm → types}/workers/messages.d.ts +0 -0
- /package/lib/{esm → types}/workers/types.d.ts +0 -0
- /package/lib/{esm → types}/workers/workerThread.d.ts +0 -0
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Adapter } from "../persistence/Adapter";
|
|
2
|
-
import { ContextLock } from "../persistence/ContextLock";
|
|
3
|
-
export declare function getAdapterTransaction(obj: any, ...args: any[]): import("../persistence/ContextLock").AdapterTransaction<Adapter<any, any, any, any>>;
|
|
4
|
-
export declare function getContextLock(obj: any, ...args: any[]): ContextLock;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../src/persistence/transactions.ts"],"names":[],"mappings":";;AAQA,sDAUC;AAED,wCAEC;AAtBD,2DAAwD;AACxD,qDAAoE;AACpE,iFAAuE;AACvE,iEAAwD;AACxD,+DAAsD;AACtD,2CAAiD;AACjD,mDAA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Keys, RepositoryFlags, ContextFlags as CtxFlags } from "@decaf-ts/db-decorators";
|
|
2
|
-
import { Adapter } from "./Adapter";
|
|
3
|
-
import { Observable, type Observer } from "../interfaces/index";
|
|
4
|
-
import { Logger } from "@decaf-ts/logging";
|
|
5
|
-
import { Constructor } from "@decaf-ts/decoration";
|
|
6
|
-
import { Model } from "@decaf-ts/decorator-validation";
|
|
7
|
-
import { ContextualArgs, ContextualLoggedClass } from "../utils/ContextualLoggedClass";
|
|
8
|
-
import { Context } from "./Context";
|
|
9
|
-
import { Repository } from "../repository/Repository";
|
|
10
|
-
import { PersistenceKeys } from "./constants";
|
|
11
|
-
import { PreparedStatementKeys } from "../query/constants";
|
|
12
|
-
import { ContextLock } from "./ContextLock";
|
|
13
|
-
export type FlagsOfContext<C extends Context<any>> = C extends Context<infer F> ? F : never;
|
|
14
|
-
export type LoggerOfContext<C extends Context<any>> = LoggerOfFlags<FlagsOfContext<C>>;
|
|
15
|
-
export type ContextOfRepository<R extends Repository<any, any>> = R extends Repository<any, infer A> ? ContextOf<A> : never;
|
|
16
|
-
export type FlagsOfRepository<R extends Repository<any, any>> = FlagsOfContext<ContextOfRepository<R>>;
|
|
17
|
-
export type LoggerOfRepository<R extends Repository<any, any>> = LoggerOfContext<ContextOfRepository<R>>;
|
|
18
|
-
export type ContextOf<OBJ extends Repository<any, any> | Adapter<any, any, any, any> | ContextualLoggedClass<any>> = OBJ extends Adapter<any, any, any, infer C> ? C : OBJ extends Repository<any, any> ? ContextOfRepository<OBJ> : OBJ extends ContextualLoggedClass<infer C> ? C : never;
|
|
19
|
-
export type ConfigOf<OBJ extends Adapter<any, any, any, any>> = OBJ extends Adapter<infer C, any, any, any> ? C : never;
|
|
20
|
-
export type LoggerOfAdapter<A extends Adapter<any, any, any, any>> = A extends Adapter<any, any, any, infer C> ? LoggerOfContext<C> : never;
|
|
21
|
-
export type FlagsOfAdapter<A extends Adapter<any, any, any, any>> = A extends Adapter<any, any, any, infer C> ? FlagsOfContext<C> : never;
|
|
22
|
-
export type LoggerOf<OBJ extends AdapterFlags<any> | Context<any> | Adapter<any, any, any> | Repository<any, any>> = OBJ extends AdapterFlags<any> ? LoggerOfFlags<OBJ> : OBJ extends Context<any> ? LoggerOfContext<OBJ> : OBJ extends Repository<any, any> ? LoggerOfRepository<OBJ> : OBJ extends Adapter<any, any, any> ? LoggerOfAdapter<OBJ> : Logger;
|
|
23
|
-
export type ConfOf<A extends Adapter<any, any, any, any>> = A extends Adapter<infer C, any, any> ? C : never;
|
|
24
|
-
export type FlagsOf<OBJ extends Repository<any, any> | Adapter<any, any, any, any> | Context<any>> = OBJ extends Context<any> ? FlagsOfContext<OBJ> : OBJ extends Repository<any, any> ? FlagsOfRepository<OBJ> : OBJ extends Adapter<any, any, any, any> ? FlagsOfAdapter<OBJ> : never;
|
|
25
|
-
export type PersistenceObservable<CONTEXT extends Context<any>> = Observable<[
|
|
26
|
-
Observer,
|
|
27
|
-
ObserverFilter?
|
|
28
|
-
], [
|
|
29
|
-
Constructor | string,
|
|
30
|
-
OperationKeys | BulkCrudOperationKeys | string,
|
|
31
|
-
EventIds,
|
|
32
|
-
...ContextualArgs<CONTEXT>
|
|
33
|
-
]>;
|
|
34
|
-
export type PersistenceObserver<CONTEXT extends Context<any>> = Observer<[
|
|
35
|
-
Constructor | string,
|
|
36
|
-
OperationKeys | BulkCrudOperationKeys | string,
|
|
37
|
-
EventIds,
|
|
38
|
-
...ContextualArgs<CONTEXT>
|
|
39
|
-
]>;
|
|
40
|
-
/**
|
|
41
|
-
* @description Type representing possible ID formats for database events
|
|
42
|
-
* @summary A union type that defines the possible formats for event identifiers in the persistence layer.
|
|
43
|
-
* These can be single values (string, number, bigint) or arrays of these types.
|
|
44
|
-
* @typedef {(string|number|bigint|string[]|number[]|bigint[])} EventIds
|
|
45
|
-
* @memberOf module:core
|
|
46
|
-
*/
|
|
47
|
-
export type EventIds = string | number | bigint | string[] | number[] | bigint[];
|
|
48
|
-
export type ObserverFilter = (table: Constructor | string, event: AllOperationKeys, id: EventIds, ...args: ContextualArgs<any>) => boolean;
|
|
49
|
-
export type InferredAdapterConfig<A> = A extends Adapter<infer CONF, any, any> ? CONF : never;
|
|
50
|
-
export interface AdapterDispatch<A extends Adapter<any, any, any, any>> extends PersistenceObservable<ContextOf<A>> {
|
|
51
|
-
close(...args: ContextualArgs<ContextOf<A>>): Promise<void>;
|
|
52
|
-
updateObservers<M extends Model>(table: Constructor<M> | string, event: OperationKeys | BulkCrudOperationKeys | string, id: EventIds, ...args: ContextualArgs<ContextOf<A>>): Promise<void>;
|
|
53
|
-
}
|
|
54
|
-
export type RepositoryFor<A extends Adapter<any, any, any, any>> = A extends Adapter<any, any, any, any> ? ReturnType<A["repository"]> : never;
|
|
55
|
-
export type PreparedModel = {
|
|
56
|
-
record: Record<string, any>;
|
|
57
|
-
id: string;
|
|
58
|
-
transient?: Record<string, any>;
|
|
59
|
-
};
|
|
60
|
-
export type ContextFlags<LOG extends Logger> = CtxFlags<LOG> & Pick<RepositoryFlags<LOG>, "operation" | "correlationId" | "ignoreDevSafeGuards" | "parentContext" | "childContexts"> & {
|
|
61
|
-
pending?: Record<string, string[]>;
|
|
62
|
-
transactionLock?: ContextLock;
|
|
63
|
-
};
|
|
64
|
-
export type AdapterFlags<LOG extends Logger = Logger> = RepositoryFlags<LOG> & ContextFlags<LOG> & {
|
|
65
|
-
allowGenerationOverride: boolean;
|
|
66
|
-
afterQueryHandlers: boolean;
|
|
67
|
-
enforceUpdateValidation: boolean;
|
|
68
|
-
allowRawStatements: boolean;
|
|
69
|
-
forcePrepareSimpleQueries: boolean;
|
|
70
|
-
forcePrepareComplexQueries: boolean;
|
|
71
|
-
cacheForPopulate: Record<string, any>;
|
|
72
|
-
preferFromCache: boolean;
|
|
73
|
-
noEmit: boolean;
|
|
74
|
-
noEmitSingle: boolean;
|
|
75
|
-
noEmitBulk: boolean;
|
|
76
|
-
breakOnSingleFailureInBulk: boolean;
|
|
77
|
-
observeFullResult: boolean;
|
|
78
|
-
paginateByBookmark: boolean;
|
|
79
|
-
dryRun: boolean;
|
|
80
|
-
lock?: ContextLock;
|
|
81
|
-
};
|
|
82
|
-
export type RawResult<R, D extends boolean> = D extends true ? R : {
|
|
83
|
-
data: R;
|
|
84
|
-
count?: number;
|
|
85
|
-
};
|
|
86
|
-
export type AllOperationKeys = OperationKeys | BulkCrudOperationKeys | PersistenceKeys | PreparedStatementKeys | string;
|
package/lib/query/Condition.d.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { AttributeOption, ConditionBuilderOption } from "./options";
|
|
2
|
-
import { ConditionalAsync, Model, ModelArg, ModelErrorDefinition } from "@decaf-ts/decorator-validation";
|
|
3
|
-
import { GroupOperator, Operator } from "./constants";
|
|
4
|
-
type InferAsync<M> = M extends Model<infer A> ? A : false;
|
|
5
|
-
/**
|
|
6
|
-
* @description Represents a logical condition for database queries
|
|
7
|
-
* @summary A class that encapsulates query conditions with support for complex logical operations.
|
|
8
|
-
* This class allows for building and combining query conditions using logical operators (AND, OR, NOT)
|
|
9
|
-
* and comparison operators (equals, not equals, greater than, etc.).
|
|
10
|
-
* @template M - The model type this condition operates on
|
|
11
|
-
* @param {string | Condition<M>} attr1 - The attribute name or a nested condition
|
|
12
|
-
* @param {Operator | GroupOperator} operator - The operator to use for the condition
|
|
13
|
-
* @param {any} comparison - The value to compare against or another condition
|
|
14
|
-
* @class Condition
|
|
15
|
-
* @example
|
|
16
|
-
* // Create a simple condition
|
|
17
|
-
* const nameCondition = Condition.attribute("name").eq("John");
|
|
18
|
-
*
|
|
19
|
-
* // Create a complex condition
|
|
20
|
-
* const complexCondition = Condition.attribute("age").gt(18)
|
|
21
|
-
* .and(Condition.attribute("status").eq("active"));
|
|
22
|
-
*
|
|
23
|
-
* // Use the builder pattern
|
|
24
|
-
* const userQuery = Condition.builder()
|
|
25
|
-
* .attribute("email").regexp(".*@example.com")
|
|
26
|
-
* .and(Condition.attribute("lastLogin").gt(new Date("2023-01-01")));
|
|
27
|
-
* @mermaid
|
|
28
|
-
* sequenceDiagram
|
|
29
|
-
* participant Dev
|
|
30
|
-
* participant Condition
|
|
31
|
-
* Dev->>Condition: builder().attribute("age").gt(18)
|
|
32
|
-
* Condition-->>Dev: Condition(age > 18)
|
|
33
|
-
* Dev->>Condition: .and(attribute("status").eq("active"))
|
|
34
|
-
* Condition-->>Dev: Condition((age > 18) AND (status = "active"))
|
|
35
|
-
*/
|
|
36
|
-
export declare class Condition<M extends Model<any>> extends Model<InferAsync<M>> {
|
|
37
|
-
protected attr1?: string | Condition<M>;
|
|
38
|
-
protected operator?: Operator | GroupOperator;
|
|
39
|
-
protected comparison?: any;
|
|
40
|
-
private constructor();
|
|
41
|
-
private constructor();
|
|
42
|
-
/**
|
|
43
|
-
* @description Combines this condition with another using logical AND
|
|
44
|
-
* @summary Joins two conditions with an AND operator, requiring both to be true
|
|
45
|
-
* @param {Condition<M>} condition - The condition to combine with this one
|
|
46
|
-
* @return {Condition<M>} A new condition representing the AND operation
|
|
47
|
-
*/
|
|
48
|
-
and(condition: Condition<M>): Condition<M>;
|
|
49
|
-
/**
|
|
50
|
-
* @description Combines this condition with another using logical OR
|
|
51
|
-
* @summary Joins two conditions with an OR operator, requiring at least one to be true
|
|
52
|
-
* @param {Condition<M>} condition - The condition to combine with this one
|
|
53
|
-
* @return {Condition<M>} A new condition representing the OR operation
|
|
54
|
-
*/
|
|
55
|
-
or(condition: Condition<M>): Condition<M>;
|
|
56
|
-
/**
|
|
57
|
-
* @description Creates a negation condition
|
|
58
|
-
* @summary Excludes a value from the result by applying a NOT operator
|
|
59
|
-
* @param {any} val - The value to negate
|
|
60
|
-
* @return {Condition<M>} A new condition representing the NOT operation
|
|
61
|
-
*/
|
|
62
|
-
not(val: any): Condition<M>;
|
|
63
|
-
/**
|
|
64
|
-
* @description Validates the condition and checks for errors
|
|
65
|
-
* @summary Extends the base validation to ensure the condition is properly formed
|
|
66
|
-
* @param {...string[]} exceptions - Fields to exclude from validation
|
|
67
|
-
* @return {ModelErrorDefinition | undefined} Error definition if validation fails, undefined otherwise
|
|
68
|
-
*/
|
|
69
|
-
hasErrors(...exceptions: string[]): ConditionalAsync<InferAsync<M>, ModelErrorDefinition | undefined>;
|
|
70
|
-
/**
|
|
71
|
-
* @description Creates a new condition that combines two conditions with logical AND
|
|
72
|
-
* @summary Static method that joins two conditions with an AND operator, requiring both to be true
|
|
73
|
-
* @template M - The model type this condition operates on
|
|
74
|
-
* @param {Condition<M>} condition1 - The first condition
|
|
75
|
-
* @param {Condition<M>} condition2 - The second condition
|
|
76
|
-
* @return {Condition<M>} A new condition representing the AND operation
|
|
77
|
-
*/
|
|
78
|
-
static and<M extends Model>(condition1: Condition<M>, condition2: Condition<M>): Condition<M>;
|
|
79
|
-
/**
|
|
80
|
-
* @description Creates a new condition that combines two conditions with logical OR
|
|
81
|
-
* @summary Static method that joins two conditions with an OR operator, requiring at least one to be true
|
|
82
|
-
* @template M - The model type this condition operates on
|
|
83
|
-
* @param {Condition<M>} condition1 - The first condition
|
|
84
|
-
* @param {Condition<M>} condition2 - The second condition
|
|
85
|
-
* @return {Condition<M>} A new condition representing the OR operation
|
|
86
|
-
*/
|
|
87
|
-
static or<M extends Model>(condition1: Condition<M>, condition2: Condition<M>): Condition<M>;
|
|
88
|
-
/**
|
|
89
|
-
* @description Creates a new condition that groups two conditions with a specified operator
|
|
90
|
-
* @summary Private static method that combines two conditions using the specified group operator
|
|
91
|
-
* @template M - The model type this condition operates on
|
|
92
|
-
* @param {Condition<M>} condition1 - The first condition
|
|
93
|
-
* @param {GroupOperator} operator - The group operator to use (AND, OR)
|
|
94
|
-
* @param {Condition<M>} condition2 - The second condition
|
|
95
|
-
* @return {Condition<M>} A new condition representing the grouped operation
|
|
96
|
-
*/
|
|
97
|
-
private static group;
|
|
98
|
-
/**
|
|
99
|
-
* @description Creates a condition builder for a specific model attribute
|
|
100
|
-
* @summary Static method that initializes a condition builder with the specified attribute
|
|
101
|
-
* @template M - The model type this condition operates on
|
|
102
|
-
* @param attr - The model attribute to build a condition for
|
|
103
|
-
* @return {AttributeOption<M>} A condition builder initialized with the attribute
|
|
104
|
-
*/
|
|
105
|
-
static attribute<M extends Model>(attr: keyof M): AttributeOption<M>;
|
|
106
|
-
/**
|
|
107
|
-
* @description Alias for the attribute method
|
|
108
|
-
* @summary Shorthand method that initializes a condition builder with the specified attribute
|
|
109
|
-
* @template M - The model type this condition operates on
|
|
110
|
-
* @param attr - The model attribute to build a condition for
|
|
111
|
-
* @return {AttributeOption<M>} A condition builder initialized with the attribute
|
|
112
|
-
*/
|
|
113
|
-
static attr<M extends Model>(attr: keyof M): AttributeOption<M>;
|
|
114
|
-
/**
|
|
115
|
-
* @description Provides a fluent API to build query conditions
|
|
116
|
-
* @summary A builder class that simplifies the creation of database query conditions
|
|
117
|
-
* with a chainable interface for setting attributes and operators
|
|
118
|
-
* @template M - The model type this condition builder operates on
|
|
119
|
-
* @class ConditionBuilder
|
|
120
|
-
*/
|
|
121
|
-
private static Builder;
|
|
122
|
-
/**
|
|
123
|
-
* @description Creates a new condition builder
|
|
124
|
-
* @summary Factory method that returns a new instance of the condition builder
|
|
125
|
-
* @template M - The model type this condition builder will operate on
|
|
126
|
-
* @return {ConditionBuilderOption<M>} A new condition builder instance
|
|
127
|
-
*/
|
|
128
|
-
static builder<M extends Model>(): ConditionBuilderOption<M>;
|
|
129
|
-
static from(obj: ModelArg<Condition<any>>): Condition<Model<any>>;
|
|
130
|
-
}
|
|
131
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Condition.js","sourceRoot":"","sources":["../../src/query/Condition.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,yEAMwC;AACxC,+CAAsD;AACtD,yCAAsC;AAItC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAa,SAAgC,SAAQ,4BAAoB;IAcvE,YACE,KAAuD,EACvD,QAAmC,EACnC,UAAgB;QAEhB,KAAK,EAAE,CAAC;Q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export type QueryActionPrefix = {
|
|
4
|
-
action: QueryAction;
|
|
5
|
-
prefix: string;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* @description
|
|
9
|
-
* Utility class to build query objects from repository method names.
|
|
10
|
-
*
|
|
11
|
-
* @summary
|
|
12
|
-
* The `MethodQueryBuilder` class parses method names that follow a specific naming convention
|
|
13
|
-
* (e.g., `findByNameAndAgeOrderByCountryAsc`) and converts them into structured query objects
|
|
14
|
-
* (`QueryAssist`). It extracts clauses such as `select`, `where`, `groupBy`, `orderBy`, `limit`,
|
|
15
|
-
* and `offset`, ensuring that developers can declare repository queries using expressive method names.
|
|
16
|
-
*
|
|
17
|
-
* @param methodName {string} - The repository method name to parse and convert into a query.
|
|
18
|
-
* @param values {any[]} - The values corresponding to method parameters used for query conditions.
|
|
19
|
-
*
|
|
20
|
-
* @return {QueryAssist} A structured query object describing the parsed action, select, where,
|
|
21
|
-
* groupBy, orderBy, limit, and offset clauses.
|
|
22
|
-
*
|
|
23
|
-
* @class
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```ts
|
|
27
|
-
* const query = MethodQueryBuilder.build(
|
|
28
|
-
* "findByNameAndAgeOrderByCountryAsc",
|
|
29
|
-
* "John",
|
|
30
|
-
* 25,
|
|
31
|
-
* [["country", "ASC"]]
|
|
32
|
-
* );
|
|
33
|
-
*
|
|
34
|
-
* console.log(query);
|
|
35
|
-
* // {
|
|
36
|
-
* // action: "find",
|
|
37
|
-
* // select: undefined,
|
|
38
|
-
* // where: { ... },
|
|
39
|
-
* // groupBy: undefined,
|
|
40
|
-
* // orderBy: [["country", "ASC"]],
|
|
41
|
-
* // limit: undefined,
|
|
42
|
-
* // offset: undefined
|
|
43
|
-
* // }
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* @mermaid
|
|
47
|
-
* sequenceDiagram
|
|
48
|
-
* participant Repo as Repository Method
|
|
49
|
-
* participant MQB as MethodQueryBuilder
|
|
50
|
-
* participant Query as QueryAssist
|
|
51
|
-
*
|
|
52
|
-
* Repo->>MQB: build(methodName, ...values)
|
|
53
|
-
* MQB->>MQB: extractCore(methodName)
|
|
54
|
-
* MQB->>MQB: extractSelect(methodName)
|
|
55
|
-
* MQB->>MQB: extractGroupBy(methodName)
|
|
56
|
-
* MQB->>MQB: buildWhere(core, values)
|
|
57
|
-
* MQB->>MQB: extractOrderLimitOffset(core, values)
|
|
58
|
-
* MQB->>Query: return structured QueryAssist object
|
|
59
|
-
*/
|
|
60
|
-
export declare class MethodQueryBuilder extends LoggedClass {
|
|
61
|
-
private static _logger;
|
|
62
|
-
protected static get log(): Logger;
|
|
63
|
-
/**
|
|
64
|
-
* @description
|
|
65
|
-
* Map of query prefixes to their corresponding actions.
|
|
66
|
-
*/
|
|
67
|
-
private static readonly prefixMap;
|
|
68
|
-
/**
|
|
69
|
-
* @description
|
|
70
|
-
* Determines the action and prefix length from a method name.
|
|
71
|
-
*
|
|
72
|
-
* @param methodName {string} - The repository method name.
|
|
73
|
-
* @return {QueryActionPrefix} | undefined} The action and prefix if found.
|
|
74
|
-
*/
|
|
75
|
-
private static getActionFromMethodName;
|
|
76
|
-
/**
|
|
77
|
-
* @description
|
|
78
|
-
* Builds a `QueryAssist` object by parsing a repository method name and values.
|
|
79
|
-
*
|
|
80
|
-
* @summary
|
|
81
|
-
* The method validates the method name, extracts clauses (core, select, groupBy, where,
|
|
82
|
-
* orderBy, limit, and offset), and assembles them into a structured query object
|
|
83
|
-
* that can be executed against a data source.
|
|
84
|
-
*
|
|
85
|
-
* @param methodName {string} - The repository method name that encodes query information.
|
|
86
|
-
* @param values {any[]} - The values corresponding to conditions and extra clauses.
|
|
87
|
-
*
|
|
88
|
-
* @return {QueryAssist} A structured query object representing the parsed query.
|
|
89
|
-
*/
|
|
90
|
-
static build(methodName: string, ...values: any[]): QueryAssist;
|
|
91
|
-
/**
|
|
92
|
-
* @description
|
|
93
|
-
* Extracts the aggregation selector field from method names like countByAge, sumByPrice.
|
|
94
|
-
*
|
|
95
|
-
* @param methodName {string} - The method name.
|
|
96
|
-
* @param prefix {string} - The prefix to remove.
|
|
97
|
-
* @return {string | undefined} The selector field name.
|
|
98
|
-
*/
|
|
99
|
-
private static extractAggregationSelector;
|
|
100
|
-
/**
|
|
101
|
-
* @description
|
|
102
|
-
* Extracts the core part of the method name after the prefix and before any special clauses.
|
|
103
|
-
*
|
|
104
|
-
* @summary
|
|
105
|
-
* Removes prefixes and detects delimiters (`Then`, `OrderBy`, `GroupBy`, `Limit`, `Offset`)
|
|
106
|
-
* to isolate the main conditional part of the query.
|
|
107
|
-
*
|
|
108
|
-
* @param methodName {string} - The method name to parse.
|
|
109
|
-
* @param prefix {string} - The prefix to remove (e.g., "findBy", "countBy").
|
|
110
|
-
*
|
|
111
|
-
* @return {string} The extracted core string used for building conditions.
|
|
112
|
-
*/
|
|
113
|
-
private static extractCore;
|
|
114
|
-
static getFieldsFromMethodName(methodName: string): Array<string>;
|
|
115
|
-
/**
|
|
116
|
-
* @description
|
|
117
|
-
* Extracts the select clause from a method name.
|
|
118
|
-
*
|
|
119
|
-
* @summary
|
|
120
|
-
* Detects the `Select` keyword in the method name, isolates the fields following it,
|
|
121
|
-
* and returns them as an array of lowercase-first strings.
|
|
122
|
-
*
|
|
123
|
-
* @param methodName {string} - The method name to parse.
|
|
124
|
-
*
|
|
125
|
-
* @return {string[] | undefined} An array of selected fields or `undefined` if no select clause exists.
|
|
126
|
-
*/
|
|
127
|
-
private static extractSelect;
|
|
128
|
-
/**
|
|
129
|
-
* @description
|
|
130
|
-
* Extracts the group by clause from a method name.
|
|
131
|
-
*
|
|
132
|
-
* @summary
|
|
133
|
-
* Detects the `GroupBy` keyword in the method name, isolates the fields following it,
|
|
134
|
-
* and returns them as an array of lowercase-first strings.
|
|
135
|
-
*
|
|
136
|
-
* @param methodName {string} - The method name to parse.
|
|
137
|
-
*
|
|
138
|
-
* @return {string[] | undefined} An array of group by fields or `undefined` if no group by clause exists.
|
|
139
|
-
*/
|
|
140
|
-
private static extractGroupBy;
|
|
141
|
-
/**
|
|
142
|
-
* @description
|
|
143
|
-
* Builds the `where` condition object based on the parsed core string and parameter values.
|
|
144
|
-
*
|
|
145
|
-
* @summary
|
|
146
|
-
* Splits the core string by logical operators (`And`, `Or`), parses each token into a field
|
|
147
|
-
* and operator, and combines them into a `Condition` object using the provided values.
|
|
148
|
-
*
|
|
149
|
-
* @param core {string} - The extracted core string from the method name.
|
|
150
|
-
* @param values {any[]} - The values corresponding to the conditions.
|
|
151
|
-
*
|
|
152
|
-
* @return {Condition<any>} A structured condition object representing the query's where clause.
|
|
153
|
-
*/
|
|
154
|
-
private static buildWhere;
|
|
155
|
-
/**
|
|
156
|
-
* @description
|
|
157
|
-
* Parses a field name and operator from a string token.
|
|
158
|
-
*
|
|
159
|
-
* @summary
|
|
160
|
-
* Identifies the operator suffix (if present) and returns a descriptor containing the field
|
|
161
|
-
* name in lowercase-first format along with the operator.
|
|
162
|
-
*
|
|
163
|
-
* @param str {string} - The token string to parse.
|
|
164
|
-
*
|
|
165
|
-
* @return {FilterDescriptor} An object containing the field name and operator.
|
|
166
|
-
*/
|
|
167
|
-
private static parseFieldAndOperator;
|
|
168
|
-
private static extractOrderByField;
|
|
169
|
-
private static getProperlyOrderByOrThrow;
|
|
170
|
-
/**
|
|
171
|
-
* @description
|
|
172
|
-
* Extracts `orderBy`, `limit`, and `offset` clauses from method arguments.
|
|
173
|
-
*
|
|
174
|
-
* @summary
|
|
175
|
-
* Determines the number of condition arguments, then checks the remaining arguments
|
|
176
|
-
* to resolve sorting, limiting, and pagination.
|
|
177
|
-
*
|
|
178
|
-
* @param methodName {string} - The method name.
|
|
179
|
-
* @param values {any[]} - The values corresponding to method arguments, including conditions and extras.
|
|
180
|
-
* @param core {string} - The pre-extracted core string.
|
|
181
|
-
*
|
|
182
|
-
* @return {OrderLimitOffsetExtract} An object containing orderBy, limit, and offset values if present.
|
|
183
|
-
*/
|
|
184
|
-
private static extractOrderLimitOffset;
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C;QAEvB,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,QAAQ;YAC3D,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAExB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IACpC,CAAC;;AAldH,gDAmdC"}
|
package/lib/query/Paginator.d.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { Adapter } from "../persistence/Adapter";
|
|
2
|
-
import { Model } from "@decaf-ts/decorator-validation";
|
|
3
|
-
import { Constructor } from "@decaf-ts/decoration";
|
|
4
|
-
import { LoggedClass } from "@decaf-ts/logging";
|
|
5
|
-
import { ContextualArgs, MaybeContextualArg } from "../utils/ContextualLoggedClass";
|
|
6
|
-
import { PreparedStatement } from "./types";
|
|
7
|
-
/**
|
|
8
|
-
* @description Handles pagination for database queries
|
|
9
|
-
* @summary Provides functionality for navigating through paginated query results
|
|
10
|
-
*
|
|
11
|
-
* This abstract class manages the state and navigation of paginated database query results.
|
|
12
|
-
* It tracks the current page, total pages, and record count, and provides methods for
|
|
13
|
-
* moving between pages.
|
|
14
|
-
*
|
|
15
|
-
* @template M - The model type this paginator operates on
|
|
16
|
-
* @template R - The return type of the paginated query (defaults to M[])
|
|
17
|
-
* @template Q - The query type (defaults to any)
|
|
18
|
-
* @param {Adapter<any, Q, any, any>} adapter - The database adapter to use for executing queries
|
|
19
|
-
* @param {Q} query - The query to paginate
|
|
20
|
-
* @param {number} size - The number of records per page
|
|
21
|
-
* @param {Constructor<M>} clazz - The constructor for the model type
|
|
22
|
-
* @class Paginator
|
|
23
|
-
* @example
|
|
24
|
-
* // Create a paginator for a user query
|
|
25
|
-
* const userQuery = db.select().from(User);
|
|
26
|
-
* const paginator = await userQuery.paginate(10); // 10 users per page
|
|
27
|
-
*
|
|
28
|
-
* // Get the first page of results
|
|
29
|
-
* const firstPage = await paginator.page(1);
|
|
30
|
-
*
|
|
31
|
-
* // Navigate to the next page
|
|
32
|
-
* const secondPage = await paginator.next();
|
|
33
|
-
*
|
|
34
|
-
* // Get information about the pagination
|
|
35
|
-
* console.log(`Page ${paginator.current} of ${paginator.total}, ${paginator.count} total records`);
|
|
36
|
-
*
|
|
37
|
-
* @mermaid
|
|
38
|
-
* sequenceDiagram
|
|
39
|
-
* participant Client
|
|
40
|
-
* participant Paginator
|
|
41
|
-
* participant Adapter
|
|
42
|
-
* participant Database
|
|
43
|
-
*
|
|
44
|
-
* Client->>Paginator: new Paginator(adapter, query, size, clazz)
|
|
45
|
-
* Client->>Paginator: page(1)
|
|
46
|
-
* Paginator->>Paginator: validatePage(1)
|
|
47
|
-
* Paginator->>Paginator: prepare(query)
|
|
48
|
-
* Paginator->>Adapter: execute query with pagination
|
|
49
|
-
* Adapter->>Database: execute query
|
|
50
|
-
* Database-->>Adapter: return results
|
|
51
|
-
* Adapter-->>Paginator: return results
|
|
52
|
-
* Paginator-->>Client: return page results
|
|
53
|
-
*
|
|
54
|
-
* Client->>Paginator: next()
|
|
55
|
-
* Paginator->>Paginator: page(current + 1)
|
|
56
|
-
* Paginator->>Paginator: validatePage(current + 1)
|
|
57
|
-
* Paginator->>Adapter: execute query with pagination
|
|
58
|
-
* Adapter->>Database: execute query
|
|
59
|
-
* Database-->>Adapter: return results
|
|
60
|
-
* Adapter-->>Paginator: return results
|
|
61
|
-
* Paginator-->>Client: return page results
|
|
62
|
-
*/
|
|
63
|
-
export declare abstract class Paginator<M extends Model, R = M[], Q = any> extends LoggedClass {
|
|
64
|
-
protected readonly adapter: Adapter<any, any, Q, any>;
|
|
65
|
-
protected readonly query: Q | PreparedStatement<M>;
|
|
66
|
-
readonly size: number;
|
|
67
|
-
protected readonly clazz: Constructor<M>;
|
|
68
|
-
protected _currentPage: number;
|
|
69
|
-
protected _totalPages: number;
|
|
70
|
-
protected _recordCount: number;
|
|
71
|
-
protected _bookmark?: number | string;
|
|
72
|
-
protected limit: number;
|
|
73
|
-
private _statement?;
|
|
74
|
-
get current(): number;
|
|
75
|
-
get total(): number;
|
|
76
|
-
get count(): number;
|
|
77
|
-
protected get statement(): Q;
|
|
78
|
-
protected constructor(adapter: Adapter<any, any, Q, any>, query: Q | PreparedStatement<M>, size: number, clazz: Constructor<M>);
|
|
79
|
-
protected isPreparedStatement(): "" | RegExpMatchArray | null;
|
|
80
|
-
protected pagePrefix(page?: number, ...args: MaybeContextualArg<any>): Promise<any[]>;
|
|
81
|
-
protected pagePrepared(page: number, bookmark?: any, ...argz: ContextualArgs<any>): Promise<M[]>;
|
|
82
|
-
/**
|
|
83
|
-
* @description Prepares a statement for pagination
|
|
84
|
-
* @summary Modifies the raw query statement to include pagination parameters.
|
|
85
|
-
* This protected method sets the limit parameter on the query to match the page size.
|
|
86
|
-
* @param {RawRamQuery<M>} rawStatement - The original query statement
|
|
87
|
-
* @return {RawRamQuery<M>} The modified query with pagination parameters
|
|
88
|
-
*/
|
|
89
|
-
protected abstract prepare(rawStatement: Q): Q;
|
|
90
|
-
next(...args: MaybeContextualArg<any>): Promise<R>;
|
|
91
|
-
previous(...args: MaybeContextualArg<any>): Promise<R>;
|
|
92
|
-
protected validatePage(page: number): number;
|
|
93
|
-
page(page?: number, bookmark?: any, ...args: MaybeContextualArg<any>): Promise<R>;
|
|
94
|
-
serialize(data: M[], toString?: boolean): string | SerializedPage<M>;
|
|
95
|
-
apply(serialization: string | SerializedPage<M>): M[];
|
|
96
|
-
static deserialize<M extends Model>(str: string): SerializedPage<M>;
|
|
97
|
-
static isSerializedPage(obj: SerializedPage<any> | any): any;
|
|
98
|
-
}
|
|
99
|
-
export type SerializedPage<M extends Model> = {
|
|
100
|
-
current: number;
|
|
101
|
-
total: number;
|
|
102
|
-
count: number;
|
|
103
|
-
data: M[];
|
|
104
|
-
bookmark?: number | string;
|
|
105
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Paginator.js","sourceRoot":"","sources":["../../src/query/Paginator.ts"],"names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