@decaf-ts/core 0.13.2 → 0.14.1
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/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/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 +1 -1
- 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/repository/Repository.js +1 -1
- 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}/Adapter.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
package/lib/query/options.d.ts
DELETED
|
@@ -1,393 +0,0 @@
|
|
|
1
|
-
import { GroupBySelector, LimitSelector, OffsetSelector, OrderBySelector, OrderDirectionInput, SelectSelector } from "./selectors";
|
|
2
|
-
import { Executor } from "../interfaces";
|
|
3
|
-
import { Model } from "@decaf-ts/decorator-validation";
|
|
4
|
-
import { Condition } from "./Condition";
|
|
5
|
-
import { Paginatable } from "../interfaces/Paginatable";
|
|
6
|
-
import { Constructor } from "@decaf-ts/decoration";
|
|
7
|
-
type NormalizedGroupKey<M extends Model, K extends keyof M> = M[K] extends PropertyKey ? M[K] : PropertyKey;
|
|
8
|
-
type GroupByReturnValue<M extends Model, Keys extends readonly GroupBySelector<M>[]> = Keys extends [
|
|
9
|
-
infer Head extends keyof M,
|
|
10
|
-
...infer Tail extends readonly GroupBySelector<M>[]
|
|
11
|
-
] ? Record<NormalizedGroupKey<M, Head>, GroupByReturnValue<M, Tail>> : M[];
|
|
12
|
-
export interface StatementExecutor<M extends Model, R> extends Executor<R>, Paginatable<M, R, any> {
|
|
13
|
-
}
|
|
14
|
-
export interface PreparableStatementExecutor<M extends Model, R> extends StatementExecutor<M, R> {
|
|
15
|
-
prepare(...args: any[]): Promise<StatementExecutor<M, R>>;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @summary GroupBy Option interface
|
|
19
|
-
* @description Exposes the GROUP BY method and remaining options
|
|
20
|
-
*
|
|
21
|
-
* @interface GroupByOption
|
|
22
|
-
* @memberOf module:core
|
|
23
|
-
*/
|
|
24
|
-
export interface GroupByResult<M extends Model, Keys extends readonly GroupBySelector<M>[] = readonly GroupBySelector<M>[]> extends PreparableStatementExecutor<M, GroupByReturnValue<M, Keys>>, OrderByOption<M, GroupByReturnValue<M, Keys>>, LimitOption<M, GroupByReturnValue<M, Keys>>, OffsetOption<M, GroupByReturnValue<M, Keys>> {
|
|
25
|
-
thenBy<Key extends GroupBySelector<M>>(selector: Key): GroupByResult<M, [...Keys, Key]>;
|
|
26
|
-
}
|
|
27
|
-
export interface GroupByOption<M extends Model> {
|
|
28
|
-
groupBy<Key extends GroupBySelector<M>>(selector: Key): GroupByResult<M, [Key]>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @summary Offset Option interface
|
|
32
|
-
* @description Exposes the OFFSET method and remaining options
|
|
33
|
-
*
|
|
34
|
-
* @interface GroupByOption
|
|
35
|
-
* @memberOf module:core
|
|
36
|
-
*/
|
|
37
|
-
export interface OffsetOption<M extends Model, R> extends PreparableStatementExecutor<M, R> {
|
|
38
|
-
offset(selector: OffsetSelector): PreparableStatementExecutor<M, R>;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @summary Limit Option interface
|
|
42
|
-
* @description Exposes the LIMIT method and remaining options
|
|
43
|
-
*
|
|
44
|
-
* @interface LimitOption
|
|
45
|
-
* @memberOf module:core
|
|
46
|
-
*/
|
|
47
|
-
export interface LimitOption<M extends Model, R> extends PreparableStatementExecutor<M, R> {
|
|
48
|
-
limit(selector: LimitSelector): OffsetOption<M, R>;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @summary OrderBy Option interface
|
|
52
|
-
* @description Exposes the ORDER BY method and remaining options
|
|
53
|
-
*
|
|
54
|
-
* @interface OrderByOption
|
|
55
|
-
* @memberOf module:core
|
|
56
|
-
*/
|
|
57
|
-
export interface OrderByResult<M extends Model, R> extends LimitOption<M, R>, OffsetOption<M, R>, OrderByThenByStarterOption<M, R> {
|
|
58
|
-
}
|
|
59
|
-
export interface OrderByOption<M extends Model, R> extends PreparableStatementExecutor<M, R> {
|
|
60
|
-
orderBy(selector: OrderBySelector<M>): OrderByResult<M, R>;
|
|
61
|
-
orderBy(attribute: keyof M, direction: OrderDirectionInput): OrderByResult<M, R>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* @summary OrderBy chaining starter interface
|
|
65
|
-
* @description Exposes the thenBy methods for continuing orderBy chains
|
|
66
|
-
*
|
|
67
|
-
* @interface OrderByThenByStarterOption
|
|
68
|
-
* @memberOf module:core
|
|
69
|
-
*/
|
|
70
|
-
export interface OrderByThenByStarterOption<M extends Model, R> {
|
|
71
|
-
thenBy(selector: OrderBySelector<M>): OrderByThenByOption<M, R>;
|
|
72
|
-
thenBy(attribute: keyof M, direction: OrderDirectionInput): OrderByThenByOption<M, R>;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* @summary OrderBy chaining continuation interface
|
|
76
|
-
* @description Exposes limit/offset and further thenBy chaining for multi-level sorts
|
|
77
|
-
*
|
|
78
|
-
* @interface OrderByThenByOption
|
|
79
|
-
* @memberOf module:core
|
|
80
|
-
*/
|
|
81
|
-
export interface OrderByThenByOption<M extends Model, R> extends LimitOption<M, R>, OffsetOption<M, R>, OrderByThenByStarterOption<M, R> {
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* @summary Groups several order and grouping options
|
|
85
|
-
*
|
|
86
|
-
* @interface OrderAndGroupOption
|
|
87
|
-
* @extends OrderByOption
|
|
88
|
-
* @extends GroupByOption
|
|
89
|
-
* @extends LimitOption
|
|
90
|
-
* @extends OffsetOption
|
|
91
|
-
* @memberOf module:core
|
|
92
|
-
*/
|
|
93
|
-
export interface OrderAndGroupOption<M extends Model, R> extends OrderByOption<M, R>, PreparableStatementExecutor<M, R>, GroupByOption<M>, LimitOption<M, R>, OffsetOption<M, R> {
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* @summary Where Option interface
|
|
97
|
-
* @description Exposes the WHERE method and remaining options
|
|
98
|
-
*
|
|
99
|
-
* @interface WhereOption
|
|
100
|
-
* @extends OrderAndGroupOption
|
|
101
|
-
* @memberOf module:core
|
|
102
|
-
*/
|
|
103
|
-
export interface WhereOption<M extends Model, R> extends OrderAndGroupOption<M, R> {
|
|
104
|
-
/**
|
|
105
|
-
* @summary filter the records by a condition
|
|
106
|
-
*
|
|
107
|
-
* @param {Condition} condition
|
|
108
|
-
* @method
|
|
109
|
-
*/
|
|
110
|
-
where(condition: Condition<M>): OrderAndGroupOption<M, R>;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* @summary From Option Interface
|
|
114
|
-
* @description Exposes the FROM method and remaining options
|
|
115
|
-
*
|
|
116
|
-
* @interface FromOption
|
|
117
|
-
* @memberOf module:core
|
|
118
|
-
*/
|
|
119
|
-
export interface FromOption<M extends Model, R> {
|
|
120
|
-
/**
|
|
121
|
-
* @summary selects records from a table
|
|
122
|
-
*
|
|
123
|
-
* @param {Constructor} tableName
|
|
124
|
-
* @method
|
|
125
|
-
*/
|
|
126
|
-
from(tableName: Constructor<M> | string): WhereOption<M, R>;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* @summary Distinct Option Interface
|
|
130
|
-
* @description Exposes the remaining options after a DISTINCT
|
|
131
|
-
*
|
|
132
|
-
* @interface DistinctOption
|
|
133
|
-
* @extends FromOption
|
|
134
|
-
* @memberOf module:core
|
|
135
|
-
*/
|
|
136
|
-
export interface DistinctOption<M extends Model, R> extends FromOption<M, R> {
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* @summary Max Option Interface
|
|
140
|
-
* @description Exposes the remaining options after a MAX
|
|
141
|
-
*
|
|
142
|
-
* @interface MaxOption
|
|
143
|
-
* @extends FromOption
|
|
144
|
-
* @memberOf module:core
|
|
145
|
-
*/
|
|
146
|
-
export interface MaxOption<M extends Model, R> extends FromOption<M, R> {
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* @summary Min Option Interface
|
|
150
|
-
* @description Exposes the remaining options after a MIN
|
|
151
|
-
*
|
|
152
|
-
* @interface MinOption
|
|
153
|
-
* @extends FromOption
|
|
154
|
-
* @memberOf module:core
|
|
155
|
-
*/
|
|
156
|
-
export interface MinOption<M extends Model, R> extends FromOption<M, R> {
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* @summary Count Distinct Where Option Interface
|
|
160
|
-
* @description Exposes the remaining options after COUNT DISTINCT...FROM
|
|
161
|
-
*
|
|
162
|
-
* @interface CountDistinctWhereOption
|
|
163
|
-
* @memberOf module:core
|
|
164
|
-
*/
|
|
165
|
-
export interface CountDistinctWhereOption<M extends Model> extends OrderAndGroupOption<M, number> {
|
|
166
|
-
/**
|
|
167
|
-
* @summary filter the records by a condition
|
|
168
|
-
* @param {Condition} condition
|
|
169
|
-
*/
|
|
170
|
-
where(condition: Condition<M>): CountDistinctWhereOption<M>;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* @summary Count Where Option Interface
|
|
174
|
-
* @description Exposes the remaining options after COUNT...FROM with distinct() available
|
|
175
|
-
*
|
|
176
|
-
* @interface CountWhereOption
|
|
177
|
-
* @memberOf module:core
|
|
178
|
-
*/
|
|
179
|
-
export interface CountWhereOption<M extends Model> extends OrderAndGroupOption<M, number> {
|
|
180
|
-
/**
|
|
181
|
-
* @summary Makes the count distinct
|
|
182
|
-
* @description When chained after count(), counts only distinct values
|
|
183
|
-
* @return A count distinct query builder
|
|
184
|
-
*/
|
|
185
|
-
distinct(): CountDistinctWhereOption<M>;
|
|
186
|
-
/**
|
|
187
|
-
* @summary filter the records by a condition
|
|
188
|
-
* @param {Condition} condition
|
|
189
|
-
*/
|
|
190
|
-
where(condition: Condition<M>): CountWhereOption<M>;
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* @summary Count Option Interface
|
|
194
|
-
* @description Exposes the remaining options after a COUNT
|
|
195
|
-
*
|
|
196
|
-
* @interface CountOption
|
|
197
|
-
* @memberOf module:core
|
|
198
|
-
*/
|
|
199
|
-
export interface CountOption<M extends Model> {
|
|
200
|
-
/**
|
|
201
|
-
* @summary Makes the count distinct
|
|
202
|
-
* @description When chained after count(), counts only distinct values
|
|
203
|
-
* @return A count distinct query builder
|
|
204
|
-
*/
|
|
205
|
-
distinct(): CountDistinctOption<M>;
|
|
206
|
-
/**
|
|
207
|
-
* @summary selects records from a table
|
|
208
|
-
* @param {Constructor} tableName
|
|
209
|
-
*/
|
|
210
|
-
from(tableName: Constructor<M> | string): CountWhereOption<M>;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* @summary Count Distinct Option Interface
|
|
214
|
-
* @description Exposes the remaining options after a COUNT DISTINCT
|
|
215
|
-
*
|
|
216
|
-
* @interface CountDistinctOption
|
|
217
|
-
* @memberOf module:core
|
|
218
|
-
*/
|
|
219
|
-
export interface CountDistinctOption<M extends Model> {
|
|
220
|
-
/**
|
|
221
|
-
* @summary selects records from a table
|
|
222
|
-
* @param {Constructor} tableName
|
|
223
|
-
*/
|
|
224
|
-
from(tableName: Constructor<M> | string): CountWhereOption<M>;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* @summary Sum Option Interface
|
|
228
|
-
* @description Exposes the remaining options after a SUM
|
|
229
|
-
*
|
|
230
|
-
* @interface SumOption
|
|
231
|
-
* @extends FromOption
|
|
232
|
-
* @memberOf module:core
|
|
233
|
-
*/
|
|
234
|
-
export interface SumOption<M extends Model, R> extends FromOption<M, R> {
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* @summary Avg Option Interface
|
|
238
|
-
* @description Exposes the remaining options after an AVG
|
|
239
|
-
*
|
|
240
|
-
* @interface AvgOption
|
|
241
|
-
* @extends FromOption
|
|
242
|
-
* @memberOf module:core
|
|
243
|
-
*/
|
|
244
|
-
export interface AvgOption<M extends Model, R> extends FromOption<M, R> {
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* @summary Select Option Interface
|
|
248
|
-
* @description Exposes the remaining options after a SELECT
|
|
249
|
-
*
|
|
250
|
-
* @interface SelectOption
|
|
251
|
-
* @extends FromOption
|
|
252
|
-
* @memberOf module:core
|
|
253
|
-
*/
|
|
254
|
-
export interface SelectOption<M extends Model, R> extends FromOption<M, R> {
|
|
255
|
-
distinct<S extends SelectSelector<M>>(selector: S): DistinctOption<M, M[S][]>;
|
|
256
|
-
max<S extends SelectSelector<M>>(selector: S): MaxOption<M, M[S]>;
|
|
257
|
-
min<S extends SelectSelector<M>>(selector: S): MinOption<M, M[S]>;
|
|
258
|
-
count<S extends SelectSelector<M>>(selector?: S): CountOption<M>;
|
|
259
|
-
sum<S extends SelectSelector<M>>(selector: S): SumOption<M, number>;
|
|
260
|
-
avg<S extends SelectSelector<M>>(selector: S): AvgOption<M, number>;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* @summary Into Option Interface
|
|
264
|
-
* @description Exposes the remaining options after an INTO
|
|
265
|
-
*
|
|
266
|
-
* @interface IntoOption
|
|
267
|
-
* @memberOf module:core
|
|
268
|
-
*/
|
|
269
|
-
export interface IntoOption<M extends Model, R> {
|
|
270
|
-
values(...models: M[]): Executor<R>;
|
|
271
|
-
where(condition: Condition<M>): Executor<R>;
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* @summary Valuest Option Interface
|
|
275
|
-
* @description Exposes the remaining options after a VALUES
|
|
276
|
-
*
|
|
277
|
-
* @interface ValuesOption
|
|
278
|
-
* @memberOf module:core
|
|
279
|
-
*/
|
|
280
|
-
export interface ValuesOption<M extends Model> extends Executor<M> {
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* @summary Insert Option Interface
|
|
284
|
-
* @description Exposes the remaining options after an INSERT
|
|
285
|
-
*
|
|
286
|
-
* @interface InsertOption
|
|
287
|
-
* @memberOf module:core
|
|
288
|
-
*/
|
|
289
|
-
export interface InsertOption<M extends Model, R = void> {
|
|
290
|
-
/**
|
|
291
|
-
* @summary selects the table to insert records into
|
|
292
|
-
*
|
|
293
|
-
* @param {string | Constructor} table
|
|
294
|
-
* @method
|
|
295
|
-
*/
|
|
296
|
-
into(table: Constructor<M>): IntoOption<M, R>;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* @summary {@link Operator} Option Interface
|
|
300
|
-
* @description Exposes the available operators for a {@link Condition}
|
|
301
|
-
*
|
|
302
|
-
* @interface AttributeOption
|
|
303
|
-
* @memberOf module:core
|
|
304
|
-
*/
|
|
305
|
-
export interface AttributeOption<M extends Model> {
|
|
306
|
-
/**
|
|
307
|
-
* @summary Test equality
|
|
308
|
-
*
|
|
309
|
-
* @param {any} val the value to test
|
|
310
|
-
* @method
|
|
311
|
-
*/
|
|
312
|
-
eq(val: any): Condition<M>;
|
|
313
|
-
/**
|
|
314
|
-
* @summary Test difference
|
|
315
|
-
*
|
|
316
|
-
* @param {any} val the value to test
|
|
317
|
-
* @method
|
|
318
|
-
*/
|
|
319
|
-
dif(val: any): Condition<M>;
|
|
320
|
-
/**
|
|
321
|
-
* @summary Test greater than
|
|
322
|
-
*
|
|
323
|
-
* @param {any} val the value to test
|
|
324
|
-
* @method
|
|
325
|
-
*/
|
|
326
|
-
gt(val: any): Condition<M>;
|
|
327
|
-
/**
|
|
328
|
-
* @summary Test lower than
|
|
329
|
-
*
|
|
330
|
-
* @param {any} val the value to test
|
|
331
|
-
* @method
|
|
332
|
-
*/
|
|
333
|
-
lt(val: any): Condition<M>;
|
|
334
|
-
/**
|
|
335
|
-
* @summary Test greater or equal to
|
|
336
|
-
*
|
|
337
|
-
* @param {any} val the value to test
|
|
338
|
-
* @method
|
|
339
|
-
*/
|
|
340
|
-
gte(val: any): Condition<M>;
|
|
341
|
-
/**
|
|
342
|
-
* @summary Test lower or equal to
|
|
343
|
-
*
|
|
344
|
-
* @param {any} val the value to test
|
|
345
|
-
* @method
|
|
346
|
-
*/
|
|
347
|
-
lte(val: any): Condition<M>;
|
|
348
|
-
/**
|
|
349
|
-
* @summary Test value in a range of values
|
|
350
|
-
* @param {any[]} val
|
|
351
|
-
*/
|
|
352
|
-
in(val: any[]): Condition<M>;
|
|
353
|
-
/**
|
|
354
|
-
* @summary Test value is between min and max (inclusive)
|
|
355
|
-
* @param {any} min the minimum value
|
|
356
|
-
* @param {any} max the maximum value
|
|
357
|
-
* @method
|
|
358
|
-
*/
|
|
359
|
-
between(min: any, max: any): Condition<M>;
|
|
360
|
-
/**
|
|
361
|
-
* @summary Test matches {@link RegExp}
|
|
362
|
-
*
|
|
363
|
-
* @param {any} val the value to test
|
|
364
|
-
* @method
|
|
365
|
-
*/
|
|
366
|
-
regexp(val: string | RegExp): Condition<M>;
|
|
367
|
-
/**
|
|
368
|
-
* @summary Test string starts with value
|
|
369
|
-
*
|
|
370
|
-
* @param {string} val the prefix to test
|
|
371
|
-
* @method
|
|
372
|
-
*/
|
|
373
|
-
startsWith(val: string): Condition<M>;
|
|
374
|
-
/**
|
|
375
|
-
* @summary Test string ends with value
|
|
376
|
-
*
|
|
377
|
-
* @param {string} val the suffix to test
|
|
378
|
-
* @method
|
|
379
|
-
*/
|
|
380
|
-
endsWith(val: string): Condition<M>;
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* @description The starting point for creating query conditions
|
|
384
|
-
* @summary Exposes the available operations for building database query conditions
|
|
385
|
-
* @template M - The model type this condition builder operates on
|
|
386
|
-
* @interface ConditionBuilderOption
|
|
387
|
-
* @memberOf module:core
|
|
388
|
-
*/
|
|
389
|
-
export interface ConditionBuilderOption<M extends Model> {
|
|
390
|
-
attribute(attr: keyof M): AttributeOption<M>;
|
|
391
|
-
attr(attr: keyof M): AttributeOption<M>;
|
|
392
|
-
}
|
|
393
|
-
export {};
|
package/lib/query/selectors.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Constructor } from "@decaf-ts/decoration";
|
|
2
|
-
import { OrderDirection } from "../repository";
|
|
3
|
-
import { Model } from "@decaf-ts/decorator-validation";
|
|
4
|
-
export type OrderDirectionInput = OrderDirection | "asc" | "desc" | "ASC" | "DESC";
|
|
5
|
-
/**
|
|
6
|
-
* @description Type for selecting the data source in a query
|
|
7
|
-
* @summary Defines the type for specifying the table or model to query from
|
|
8
|
-
* @template M - The model type this selector operates on
|
|
9
|
-
* @typedef {Constructor<M> | string} FromSelector
|
|
10
|
-
* @memberOf module:core
|
|
11
|
-
*/
|
|
12
|
-
export type FromSelector<M extends Model> = Constructor<M> | string;
|
|
13
|
-
export type GroupBySelector<M extends Model> = keyof M;
|
|
14
|
-
export type OrderBySelector<M extends Model> = [
|
|
15
|
-
keyof M,
|
|
16
|
-
OrderDirectionInput
|
|
17
|
-
];
|
|
18
|
-
/**
|
|
19
|
-
* @description Type for limiting query results
|
|
20
|
-
* @summary Defines the type for specifying the maximum number of results to return
|
|
21
|
-
* @typedef {number} LimitSelector
|
|
22
|
-
* @memberOf module:core
|
|
23
|
-
*/
|
|
24
|
-
export type LimitSelector = number;
|
|
25
|
-
/**
|
|
26
|
-
* @description Type for offsetting query results
|
|
27
|
-
* @summary Defines the type for specifying the number of results to skip
|
|
28
|
-
* @typedef {number} OffsetSelector
|
|
29
|
-
* @memberOf module:core
|
|
30
|
-
*/
|
|
31
|
-
export type OffsetSelector = number;
|
|
32
|
-
/**
|
|
33
|
-
* @description Type for selecting fields in a query
|
|
34
|
-
* @summary Defines the type for specifying which fields to select from a model
|
|
35
|
-
* @template M - The model type this selector operates on
|
|
36
|
-
* @typedef SelectSelector
|
|
37
|
-
* @memberOf module:core
|
|
38
|
-
*/
|
|
39
|
-
export type SelectSelector<M extends Model> = keyof M;
|
package/lib/query/types.d.ts
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { Condition } from "./Condition";
|
|
2
|
-
import { OrderBySelector } from "./selectors";
|
|
3
|
-
import { Model } from "@decaf-ts/decorator-validation";
|
|
4
|
-
import { Constructor } from "@decaf-ts/decoration";
|
|
5
|
-
import { OrderDirection } from "../repository/constants";
|
|
6
|
-
/**
|
|
7
|
-
* @description
|
|
8
|
-
* Options for configuring query building behavior.
|
|
9
|
-
*
|
|
10
|
-
* @summary
|
|
11
|
-
* The `QueryOptions` type defines flags that determine whether certain clauses
|
|
12
|
-
* (limit, offset, order by) are permitted, as well as whether violations
|
|
13
|
-
* should throw an error during query construction.
|
|
14
|
-
*
|
|
15
|
-
* @memberOf module:query
|
|
16
|
-
*/
|
|
17
|
-
export type QueryOptions = {
|
|
18
|
-
allowLimit?: boolean;
|
|
19
|
-
allowOffset?: boolean;
|
|
20
|
-
allowOrderBy?: boolean;
|
|
21
|
-
throws?: boolean;
|
|
22
|
-
};
|
|
23
|
-
export type OrderLimitOffsetExtract = {
|
|
24
|
-
orderBy?: OrderBySelector<any>[];
|
|
25
|
-
limit?: number;
|
|
26
|
-
offset?: number;
|
|
27
|
-
};
|
|
28
|
-
export type DirectionLimitOffset = {
|
|
29
|
-
direction?: OrderDirection;
|
|
30
|
-
order?: OrderBySelector<any>[];
|
|
31
|
-
limit?: number;
|
|
32
|
-
offset?: number;
|
|
33
|
-
bookmark?: string | number;
|
|
34
|
-
};
|
|
35
|
-
export type PreparedStatement<M extends Model> = {
|
|
36
|
-
class: Constructor<M>;
|
|
37
|
-
method: string;
|
|
38
|
-
args: any[];
|
|
39
|
-
params: DirectionLimitOffset;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* @description
|
|
43
|
-
* Structured query object representing parsed query clauses.
|
|
44
|
-
*
|
|
45
|
-
* @summary
|
|
46
|
-
* The `QueryAssist` interface defines the standard structure returned
|
|
47
|
-
* by query builders. It includes actions such as find, optional clauses
|
|
48
|
-
* like select, groupBy, and orderBy, and pagination controls (limit, offset).
|
|
49
|
-
*
|
|
50
|
-
* @template T The entity or record type that conditions may apply to.
|
|
51
|
-
*
|
|
52
|
-
* @interface QueryAssist
|
|
53
|
-
* @memberOf module:query
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* @description
|
|
57
|
-
* Supported query action types for method-based queries.
|
|
58
|
-
*
|
|
59
|
-
* @summary
|
|
60
|
-
* The `QueryAction` type defines the possible actions that can be
|
|
61
|
-
* performed by a query built from a method name.
|
|
62
|
-
*
|
|
63
|
-
* @memberOf module:query
|
|
64
|
-
*/
|
|
65
|
-
export type QueryAction = "find" | "page" | "count" | "sum" | "avg" | "min" | "max" | "distinct" | "group";
|
|
66
|
-
export interface QueryAssist {
|
|
67
|
-
action: QueryAction;
|
|
68
|
-
select: undefined | string[];
|
|
69
|
-
selector?: string;
|
|
70
|
-
where?: Condition<any>;
|
|
71
|
-
groupBy?: string[];
|
|
72
|
-
orderBy?: OrderBySelector<any>[];
|
|
73
|
-
limit: number | undefined;
|
|
74
|
-
offset: number | undefined;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @description
|
|
78
|
-
* Enumeration of supported query clauses for building method-based queries.
|
|
79
|
-
*
|
|
80
|
-
* @summary
|
|
81
|
-
* The `QueryClause` enum defines string literals that represent
|
|
82
|
-
* different segments of a query (e.g., `findBy`, `Select`, `And`, `Or`).
|
|
83
|
-
*
|
|
84
|
-
* @enum QueryClause
|
|
85
|
-
* @memberOf module:query
|
|
86
|
-
*/
|
|
87
|
-
export declare enum QueryClause {
|
|
88
|
-
FIND_BY = "findBy",
|
|
89
|
-
PAGE_BY = "pageBy",
|
|
90
|
-
COUNT_BY = "countBy",
|
|
91
|
-
SUM_BY = "sumBy",
|
|
92
|
-
AVG_BY = "avgBy",
|
|
93
|
-
MIN_BY = "minBy",
|
|
94
|
-
MAX_BY = "maxBy",
|
|
95
|
-
DISTINCT_BY = "distinctBy",
|
|
96
|
-
GROUP_BY_PREFIX = "groupBy",
|
|
97
|
-
SELECT = "Select",
|
|
98
|
-
AND = "And",
|
|
99
|
-
OR = "Or",
|
|
100
|
-
GROUP_BY = "GroupBy",
|
|
101
|
-
ORDER_BY = "OrderBy",
|
|
102
|
-
THEN = "Then",
|
|
103
|
-
THEN_BY = "ThenBy"
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* @description
|
|
107
|
-
* Function signature for parsing operators in query building.
|
|
108
|
-
*
|
|
109
|
-
* @summary
|
|
110
|
-
* The `OperatorParser` type represents a function that takes a field name
|
|
111
|
-
* and arguments, then produces a `Condition` object that can be used in a query.
|
|
112
|
-
*
|
|
113
|
-
* @template T The type of the condition result.
|
|
114
|
-
*
|
|
115
|
-
* @param field {string} - The name of the field being parsed.
|
|
116
|
-
* @param args {any[]} - Additional arguments for operator evaluation.
|
|
117
|
-
*
|
|
118
|
-
* @return {Condition<any>} A condition object representing the parsed operator.
|
|
119
|
-
*
|
|
120
|
-
* @memberOf module:query
|
|
121
|
-
*/
|
|
122
|
-
export type OperatorParser = (field: string, ...args: any) => Condition<any>;
|
|
123
|
-
/**
|
|
124
|
-
* @description
|
|
125
|
-
* Descriptor for fields and their associated operators in query parsing.
|
|
126
|
-
*
|
|
127
|
-
* @summary
|
|
128
|
-
* The `FilterDescriptor` interface defines the structure used when parsing
|
|
129
|
-
* method segments into filterable fields and associated operators.
|
|
130
|
-
*
|
|
131
|
-
* @interface FilterDescriptor
|
|
132
|
-
* @memberOf module:query
|
|
133
|
-
*/
|
|
134
|
-
export interface FilterDescriptor {
|
|
135
|
-
field: string;
|
|
136
|
-
operator?: string;
|
|
137
|
-
}
|
|
138
|
-
export type ViewKey = string | string[];
|
|
139
|
-
export type ViewKind = "view" | "groupBy" | "count" | "sum" | "max" | "min" | "distinct";
|
|
140
|
-
export interface ViewAuthOptions {
|
|
141
|
-
expression?: string;
|
|
142
|
-
field?: string;
|
|
143
|
-
roles?: string[];
|
|
144
|
-
mode?: "any" | "all";
|
|
145
|
-
}
|
|
146
|
-
export interface ViewOptions {
|
|
147
|
-
name?: string;
|
|
148
|
-
key?: ViewKey;
|
|
149
|
-
value?: ViewKey | null;
|
|
150
|
-
condition?: Condition<any> | string;
|
|
151
|
-
auth?: string | ViewAuthOptions;
|
|
152
|
-
compositions?: string[];
|
|
153
|
-
directions?: OrderDirection[];
|
|
154
|
-
}
|
|
155
|
-
export interface ViewMetadata extends ViewOptions {
|
|
156
|
-
kind: ViewKind;
|
|
157
|
-
attribute: string;
|
|
158
|
-
}
|
package/lib/query/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/query/types.ts"],"names":[],"mappings":";;;AA2FA;;;;;;;;;;GAUG;AACH,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACrB,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;IAClB,mCAAoB,CAAA;IACpB,+BAAgB,CAAA;IAChB,+BAAgB,CAAA;IAChB,+BAAgB,CAAA;IAChB,+BAAgB,CAAA;IAChB,yCAA0B,CAAA;IAC1B,0CAA2B,CAAA;IAC3B,gCAAiB,CAAA;IACjB,0BAAW,CAAA;IACX,wBAAS,CAAA;IACT,mCAAoB,CAAA;IACpB,mCAAoB,CAAA;IACpB,4BAAa,CAAA;IACb,iCAAkB,CAAA;AACpB,CAAC,EAjBW,WAAW,2BAAX,WAAW,QAiBtB"}
|
package/lib/query/utils.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { OperatorParser } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* @description
|
|
4
|
-
* Map of supported operators to their corresponding parser functions.
|
|
5
|
-
*
|
|
6
|
-
* @summary
|
|
7
|
-
* The `OperatorsMap` defines a collection of operator names as keys
|
|
8
|
-
* (such as `Equals`, `LessThan`, `Between`, etc.), each mapped to a
|
|
9
|
-
* function that constructs a `Condition` object for that operator.
|
|
10
|
-
* These functions translate query clauses into concrete condition
|
|
11
|
-
* builders, enabling dynamic query construction from method names.
|
|
12
|
-
*
|
|
13
|
-
* @template T The type of the field values used in conditions.
|
|
14
|
-
*
|
|
15
|
-
* @param f {string} - The field name the condition applies to.
|
|
16
|
-
* @param v1 {any} - The value to compare the field against or the lower bound value for range-based operators.
|
|
17
|
-
* @param v2 {any} - The upper bound value for range-based operators.
|
|
18
|
-
*
|
|
19
|
-
* @return {Condition<any>} A condition object representing the operator applied to the field.
|
|
20
|
-
*
|
|
21
|
-
* @function OperatorsMap
|
|
22
|
-
*
|
|
23
|
-
* @mermaid
|
|
24
|
-
* sequenceDiagram
|
|
25
|
-
* participant Client as Caller
|
|
26
|
-
* participant Map as OperatorsMap
|
|
27
|
-
* participant Parser as OperatorParser
|
|
28
|
-
* participant Cond as Condition
|
|
29
|
-
*
|
|
30
|
-
* Client->>Map: Request operator parser ("Between", field, v1, v2)
|
|
31
|
-
* Map->>Parser: Call corresponding operator function
|
|
32
|
-
* Parser->>Cond: Condition.attribute(field)
|
|
33
|
-
* Cond-->>Parser: Condition instance
|
|
34
|
-
* Parser->>Cond: Apply gte(v1)
|
|
35
|
-
* Parser->>Cond: Apply and(lte(v2))
|
|
36
|
-
* Parser-->>Client: Return built Condition
|
|
37
|
-
*
|
|
38
|
-
* @memberOf module:query
|
|
39
|
-
*/
|
|
40
|
-
export declare const OperatorsMap: Record<string, OperatorParser>;
|
package/lib/query/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/query/utils.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACU,QAAA,YAAY,GAAmC;IAC1D,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,qBAAS,CAAC,SAAS,CAAC,CAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACrD,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,qBAAS,CAAC,SAAS,CAAC,CAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpD,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,qBAAS,CAAC,SAAS,CAAC,CAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACvD,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,qBAAS,CAAC,SAAS,CAAC,CAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7D,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,qBAAS,CAAC,SAAS,CAAC,CAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1D,gBAAgB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,qBAAS,CAAC,SAAS,CAAC,CAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAChE,sDAAsD;IACtD,0BAA0B;IAC1B,kCAAkC;IAClC,eAAe;IACf,mDAAmD;IACnD,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,qBAAS,CAAC,SAAS,CAAC,CAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjD,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,qBAAS,CAAC,SAAS,CAAC,CAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;CAC3D,CAAC"}
|