@decaf-ts/core 0.18.0 → 0.19.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/lib/cjs/auth/constants.cjs +2 -2
- package/lib/cjs/auth/constants.cjs.map +1 -0
- package/lib/cjs/auth/decorators.cjs +1 -0
- package/lib/cjs/auth/decorators.cjs.map +1 -0
- package/lib/cjs/auth/index.cjs +1 -0
- package/lib/cjs/auth/index.cjs.map +1 -0
- package/lib/cjs/fs/FilesystemAdapter.cjs +40 -39
- package/lib/cjs/fs/FilesystemAdapter.cjs.map +1 -0
- package/lib/cjs/fs/FsDispatch.cjs +3 -2
- package/lib/cjs/fs/FsDispatch.cjs.map +1 -0
- package/lib/cjs/fs/helpers.cjs +1 -0
- package/lib/cjs/fs/helpers.cjs.map +1 -0
- package/lib/cjs/fs/index.cjs +1 -0
- package/lib/cjs/fs/index.cjs.map +1 -0
- package/lib/cjs/fs/indexStore.cjs +8 -7
- package/lib/cjs/fs/indexStore.cjs.map +1 -0
- package/lib/cjs/fs/locks/FilesystemLock.cjs +3 -2
- package/lib/cjs/fs/locks/FilesystemLock.cjs.map +1 -0
- package/lib/cjs/fs/locks/FilesystemMultiLock.cjs +5 -4
- package/lib/cjs/fs/locks/FilesystemMultiLock.cjs.map +1 -0
- package/lib/cjs/fs/types.cjs +1 -0
- package/lib/cjs/fs/types.cjs.map +1 -0
- package/lib/cjs/identity/decorators.cjs +11 -10
- package/lib/cjs/identity/decorators.cjs.map +1 -0
- package/lib/cjs/identity/index.cjs +1 -0
- package/lib/cjs/identity/index.cjs.map +1 -0
- package/lib/cjs/index.cjs +4 -3
- package/lib/cjs/index.cjs.map +1 -0
- package/lib/cjs/interfaces/ContextuallyLogged.cjs +1 -0
- package/lib/cjs/interfaces/ContextuallyLogged.cjs.map +1 -0
- package/lib/cjs/interfaces/ErrorParser.cjs +1 -0
- package/lib/cjs/interfaces/ErrorParser.cjs.map +1 -0
- package/lib/cjs/interfaces/Executor.cjs +1 -0
- package/lib/cjs/interfaces/Executor.cjs.map +1 -0
- package/lib/cjs/interfaces/Observable.cjs +1 -0
- package/lib/cjs/interfaces/Observable.cjs.map +1 -0
- package/lib/cjs/interfaces/Observer.cjs +1 -0
- package/lib/cjs/interfaces/Observer.cjs.map +1 -0
- package/lib/cjs/interfaces/Paginatable.cjs +1 -0
- package/lib/cjs/interfaces/Paginatable.cjs.map +1 -0
- package/lib/cjs/interfaces/Queriable.cjs +1 -0
- package/lib/cjs/interfaces/Queriable.cjs.map +1 -0
- package/lib/cjs/interfaces/RawExecutor.cjs +1 -0
- package/lib/cjs/interfaces/RawExecutor.cjs.map +1 -0
- package/lib/cjs/interfaces/SequenceOptions.cjs +1 -0
- package/lib/cjs/interfaces/SequenceOptions.cjs.map +1 -0
- package/lib/cjs/interfaces/index.cjs +1 -0
- package/lib/cjs/interfaces/index.cjs.map +1 -0
- package/lib/cjs/migrations/Migration.cjs +16 -15
- package/lib/cjs/migrations/Migration.cjs.map +1 -0
- package/lib/cjs/migrations/MigrationService.cjs +38 -37
- package/lib/cjs/migrations/MigrationService.cjs.map +1 -0
- package/lib/cjs/migrations/MigrationTaskBuilder.cjs +3 -2
- package/lib/cjs/migrations/MigrationTaskBuilder.cjs.map +1 -0
- package/lib/cjs/migrations/MigrationTasks.cjs +22 -17
- package/lib/cjs/migrations/MigrationTasks.cjs.map +1 -0
- package/lib/cjs/migrations/MigrationVersioning.cjs +1 -0
- package/lib/cjs/migrations/MigrationVersioning.cjs.map +1 -0
- package/lib/cjs/migrations/SemverMigrationVersioning.cjs +1 -0
- package/lib/cjs/migrations/SemverMigrationVersioning.cjs.map +1 -0
- package/lib/cjs/migrations/StandardMigrationVersioning.cjs +1 -0
- package/lib/cjs/migrations/StandardMigrationVersioning.cjs.map +1 -0
- package/lib/cjs/migrations/constants.cjs +3 -2
- package/lib/cjs/migrations/constants.cjs.map +1 -0
- package/lib/cjs/migrations/decorators.cjs +10 -9
- package/lib/cjs/migrations/decorators.cjs.map +1 -0
- package/lib/cjs/migrations/index.cjs +6 -5
- package/lib/cjs/migrations/index.cjs.map +1 -0
- package/lib/cjs/migrations/types.cjs +1 -0
- package/lib/cjs/migrations/types.cjs.map +1 -0
- package/lib/cjs/model/BaseModel.cjs +14 -8
- package/lib/cjs/model/BaseModel.cjs.map +1 -0
- package/lib/cjs/model/SequenceModel.cjs +19 -13
- package/lib/cjs/model/SequenceModel.cjs.map +1 -0
- package/lib/cjs/model/construction.cjs +27 -26
- package/lib/cjs/model/construction.cjs.map +1 -0
- package/lib/cjs/model/decorators.cjs +48 -47
- package/lib/cjs/model/decorators.cjs.map +1 -0
- package/lib/cjs/model/index.cjs +1 -0
- package/lib/cjs/model/index.cjs.map +1 -0
- package/lib/cjs/model/indexing.cjs +6 -5
- package/lib/cjs/model/indexing.cjs.map +1 -0
- package/lib/cjs/model/types.cjs +1 -0
- package/lib/cjs/model/types.cjs.map +1 -0
- package/lib/cjs/overrides/Metadata.cjs +1 -0
- package/lib/cjs/overrides/Metadata.cjs.map +1 -0
- package/lib/cjs/overrides/Model.cjs +1 -0
- package/lib/cjs/overrides/Model.cjs.map +1 -0
- package/lib/cjs/overrides/ModelBuilder.cjs +1 -0
- package/lib/cjs/overrides/ModelBuilder.cjs.map +1 -0
- package/lib/cjs/overrides/index.cjs +1 -0
- package/lib/cjs/overrides/index.cjs.map +1 -0
- package/lib/cjs/overrides/injectables.cjs +1 -0
- package/lib/cjs/overrides/injectables.cjs.map +1 -0
- package/lib/cjs/overrides/overrides.cjs +22 -21
- package/lib/cjs/overrides/overrides.cjs.map +1 -0
- package/lib/cjs/persistence/Adapter.cjs +47 -41
- package/lib/cjs/persistence/Adapter.cjs.map +1 -0
- package/lib/cjs/persistence/Context.cjs +10 -7
- package/lib/cjs/persistence/Context.cjs.map +1 -0
- package/lib/cjs/persistence/ContextLock.cjs +1 -0
- package/lib/cjs/persistence/ContextLock.cjs.map +1 -0
- package/lib/cjs/persistence/Dispatch.cjs +15 -14
- package/lib/cjs/persistence/Dispatch.cjs.map +1 -0
- package/lib/cjs/persistence/ObserverHandler.cjs +3 -2
- package/lib/cjs/persistence/ObserverHandler.cjs.map +1 -0
- package/lib/cjs/persistence/Sequence.cjs +19 -18
- package/lib/cjs/persistence/Sequence.cjs.map +1 -0
- package/lib/cjs/persistence/constants.cjs +14 -21
- package/lib/cjs/persistence/constants.cjs.map +1 -0
- package/lib/cjs/persistence/decorators.cjs +6 -5
- package/lib/cjs/persistence/decorators.cjs.map +1 -0
- package/lib/cjs/persistence/errors.cjs +1 -0
- package/lib/cjs/persistence/errors.cjs.map +1 -0
- package/lib/cjs/persistence/event-filters.cjs +5 -4
- package/lib/cjs/persistence/event-filters.cjs.map +1 -0
- package/lib/cjs/persistence/generators.cjs +1 -0
- package/lib/cjs/persistence/generators.cjs.map +1 -0
- package/lib/cjs/persistence/index.cjs +1 -0
- package/lib/cjs/persistence/index.cjs.map +1 -0
- package/lib/cjs/persistence/transactions.cjs +9 -8
- package/lib/cjs/persistence/transactions.cjs.map +1 -0
- package/lib/cjs/persistence/types.cjs +1 -0
- package/lib/cjs/persistence/types.cjs.map +1 -0
- package/lib/cjs/query/Condition.cjs +173 -165
- package/lib/cjs/query/Condition.cjs.map +1 -0
- package/lib/cjs/query/MethodQueryBuilder.cjs +37 -34
- package/lib/cjs/query/MethodQueryBuilder.cjs.map +1 -0
- package/lib/cjs/query/Paginator.cjs +28 -27
- package/lib/cjs/query/Paginator.cjs.map +1 -0
- package/lib/cjs/query/Statement.cjs +90 -84
- package/lib/cjs/query/Statement.cjs.map +1 -0
- package/lib/cjs/query/constants.cjs +5 -21
- package/lib/cjs/query/constants.cjs.map +1 -0
- package/lib/cjs/query/decorators.cjs +16 -15
- package/lib/cjs/query/decorators.cjs.map +1 -0
- package/lib/cjs/query/errors.cjs +1 -0
- package/lib/cjs/query/errors.cjs.map +1 -0
- package/lib/cjs/query/index.cjs +1 -0
- package/lib/cjs/query/index.cjs.map +1 -0
- package/lib/cjs/query/options.cjs +1 -0
- package/lib/cjs/query/options.cjs.map +1 -0
- package/lib/cjs/query/selectors.cjs +1 -0
- package/lib/cjs/query/selectors.cjs.map +1 -0
- package/lib/cjs/query/types.cjs +2 -13
- package/lib/cjs/query/types.cjs.map +1 -0
- package/lib/cjs/query/utils.cjs +10 -9
- package/lib/cjs/query/utils.cjs.map +1 -0
- package/lib/cjs/ram/RamAdapter.cjs +21 -20
- package/lib/cjs/ram/RamAdapter.cjs.map +1 -0
- package/lib/cjs/ram/RamPaginator.cjs +3 -2
- package/lib/cjs/ram/RamPaginator.cjs.map +1 -0
- package/lib/cjs/ram/RamStatement.cjs +38 -37
- package/lib/cjs/ram/RamStatement.cjs.map +1 -0
- package/lib/cjs/ram/constants.cjs +1 -0
- package/lib/cjs/ram/constants.cjs.map +1 -0
- package/lib/cjs/ram/handlers.cjs +3 -2
- package/lib/cjs/ram/handlers.cjs.map +1 -0
- package/lib/cjs/ram/index.cjs +8 -7
- package/lib/cjs/ram/index.cjs.map +1 -0
- package/lib/cjs/ram/types.cjs +1 -0
- package/lib/cjs/ram/types.cjs.map +1 -0
- package/lib/cjs/repository/Repository.cjs +85 -79
- package/lib/cjs/repository/Repository.cjs.map +1 -0
- package/lib/cjs/repository/constants.cjs +5 -20
- package/lib/cjs/repository/constants.cjs.map +1 -0
- package/lib/cjs/repository/decorators.cjs +7 -6
- package/lib/cjs/repository/decorators.cjs.map +1 -0
- package/lib/cjs/repository/errors.cjs +1 -0
- package/lib/cjs/repository/errors.cjs.map +1 -0
- package/lib/cjs/repository/index.cjs +1 -0
- package/lib/cjs/repository/index.cjs.map +1 -0
- package/lib/cjs/repository/injectables.cjs +14 -13
- package/lib/cjs/repository/injectables.cjs.map +1 -0
- package/lib/cjs/repository/types.cjs +1 -0
- package/lib/cjs/repository/types.cjs.map +1 -0
- package/lib/cjs/repository/utils.cjs +3 -2
- package/lib/cjs/repository/utils.cjs.map +1 -0
- package/lib/cjs/services/ModelService.cjs +36 -30
- package/lib/cjs/services/ModelService.cjs.map +1 -0
- package/lib/cjs/services/PersistenceService.cjs +9 -8
- package/lib/cjs/services/PersistenceService.cjs.map +1 -0
- package/lib/cjs/services/index.cjs +1 -0
- package/lib/cjs/services/index.cjs.map +1 -0
- package/lib/cjs/services/services.cjs +37 -31
- package/lib/cjs/services/services.cjs.map +1 -0
- package/lib/cjs/tasks/CleanUpTask.cjs +30 -24
- package/lib/cjs/tasks/CleanUpTask.cjs.map +1 -0
- package/lib/cjs/tasks/TaskContext.cjs +16 -15
- package/lib/cjs/tasks/TaskContext.cjs.map +1 -0
- package/lib/cjs/tasks/TaskEngine.cjs +112 -111
- package/lib/cjs/tasks/TaskEngine.cjs.map +1 -0
- package/lib/cjs/tasks/TaskErrors.cjs +1 -0
- package/lib/cjs/tasks/TaskErrors.cjs.map +1 -0
- package/lib/cjs/tasks/TaskEventBus.cjs +7 -6
- package/lib/cjs/tasks/TaskEventBus.cjs.map +1 -0
- package/lib/cjs/tasks/TaskEventService.cjs +8 -7
- package/lib/cjs/tasks/TaskEventService.cjs.map +1 -0
- package/lib/cjs/tasks/TaskHandler.cjs +5 -4
- package/lib/cjs/tasks/TaskHandler.cjs.map +1 -0
- package/lib/cjs/tasks/TaskHandlerRegistry.cjs +1 -0
- package/lib/cjs/tasks/TaskHandlerRegistry.cjs.map +1 -0
- package/lib/cjs/tasks/TaskService.cjs +43 -37
- package/lib/cjs/tasks/TaskService.cjs.map +1 -0
- package/lib/cjs/tasks/TaskStateChangeError.cjs +1 -0
- package/lib/cjs/tasks/TaskStateChangeError.cjs.map +1 -0
- package/lib/cjs/tasks/TaskTracker.cjs +62 -61
- package/lib/cjs/tasks/TaskTracker.cjs.map +1 -0
- package/lib/cjs/tasks/builder.cjs +30 -24
- package/lib/cjs/tasks/builder.cjs.map +1 -0
- package/lib/cjs/tasks/constants.cjs +6 -10
- package/lib/cjs/tasks/constants.cjs.map +1 -0
- package/lib/cjs/tasks/decorators.cjs +5 -4
- package/lib/cjs/tasks/decorators.cjs.map +1 -0
- package/lib/cjs/tasks/index.cjs +6 -5
- package/lib/cjs/tasks/index.cjs.map +1 -0
- package/lib/cjs/tasks/logging.cjs +12 -11
- package/lib/cjs/tasks/logging.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskBackoffModel.cjs +16 -10
- package/lib/cjs/tasks/models/TaskBackoffModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskErrorModel.cjs +11 -5
- package/lib/cjs/tasks/models/TaskErrorModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskEventModel.cjs +29 -23
- package/lib/cjs/tasks/models/TaskEventModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskIOSerializer.cjs +4 -3
- package/lib/cjs/tasks/models/TaskIOSerializer.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskLogEntryModel.cjs +11 -5
- package/lib/cjs/tasks/models/TaskLogEntryModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskModel.cjs +72 -66
- package/lib/cjs/tasks/models/TaskModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskStepResultModel.cjs +14 -8
- package/lib/cjs/tasks/models/TaskStepResultModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskStepSpecModel.cjs +11 -5
- package/lib/cjs/tasks/models/TaskStepSpecModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/index.cjs +1 -0
- package/lib/cjs/tasks/models/index.cjs.map +1 -0
- package/lib/cjs/tasks/types.cjs +1 -0
- package/lib/cjs/tasks/types.cjs.map +1 -0
- package/lib/cjs/tasks/utils.cjs +6 -5
- package/lib/cjs/tasks/utils.cjs.map +1 -0
- package/lib/cjs/utils/ContextualLoggedClass.cjs +5 -4
- package/lib/cjs/utils/ContextualLoggedClass.cjs.map +1 -0
- package/lib/cjs/utils/decorators.cjs +9 -8
- package/lib/cjs/utils/decorators.cjs.map +1 -0
- package/lib/cjs/utils/errors.cjs +1 -0
- package/lib/cjs/utils/errors.cjs.map +1 -0
- package/lib/cjs/utils/index.cjs +1 -0
- package/lib/cjs/utils/index.cjs.map +1 -0
- package/lib/cjs/utils/throttling.cjs +4 -3
- package/lib/cjs/utils/throttling.cjs.map +1 -0
- package/lib/cjs/utils/types.cjs +1 -0
- package/lib/cjs/utils/types.cjs.map +1 -0
- package/lib/cjs/utils/utils.cjs +3 -2
- package/lib/cjs/utils/utils.cjs.map +1 -0
- package/lib/cjs/workers/TaskEngine.cjs +30 -29
- package/lib/cjs/workers/TaskEngine.cjs.map +1 -0
- package/lib/cjs/workers/WorkThreadEnvironment.cjs +1 -0
- package/lib/cjs/workers/WorkThreadEnvironment.cjs.map +1 -0
- package/lib/cjs/workers/index.cjs +1 -0
- package/lib/cjs/workers/index.cjs.map +1 -0
- package/lib/cjs/workers/messages.cjs +1 -0
- package/lib/cjs/workers/messages.cjs.map +1 -0
- package/lib/cjs/workers/types.cjs +1 -0
- package/lib/cjs/workers/types.cjs.map +1 -0
- package/lib/cjs/workers/workerThread.cjs +18 -17
- package/lib/cjs/workers/workerThread.cjs.map +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/types/auth/constants.d.cts +5 -0
- package/lib/types/auth/constants.d.mts +5 -0
- package/lib/types/auth/decorators.d.cts +5 -0
- package/lib/types/auth/decorators.d.mts +5 -0
- package/lib/types/auth/index.d.cts +2 -0
- package/lib/types/auth/index.d.mts +2 -0
- package/lib/types/fs/FilesystemAdapter.d.cts +70 -0
- package/lib/types/fs/FilesystemAdapter.d.mts +70 -0
- package/lib/types/fs/FsDispatch.d.cts +7 -0
- package/lib/types/fs/FsDispatch.d.mts +7 -0
- package/lib/types/fs/helpers.d.cts +17 -0
- package/lib/types/fs/helpers.d.mts +17 -0
- package/lib/types/fs/index.d.cts +4 -0
- package/lib/types/fs/index.d.mts +4 -0
- package/lib/types/fs/indexStore.d.cts +28 -0
- package/lib/types/fs/indexStore.d.mts +28 -0
- package/lib/types/fs/locks/FilesystemLock.d.cts +13 -0
- package/lib/types/fs/locks/FilesystemLock.d.mts +13 -0
- package/lib/types/fs/locks/FilesystemMultiLock.d.cts +8 -0
- package/lib/types/fs/locks/FilesystemMultiLock.d.mts +8 -0
- package/lib/types/fs/types.d.cts +40 -0
- package/lib/types/fs/types.d.mts +40 -0
- package/lib/types/identity/decorators.d.cts +72 -0
- package/lib/types/identity/decorators.d.mts +72 -0
- package/lib/types/identity/index.d.cts +6 -0
- package/lib/types/identity/index.d.mts +6 -0
- package/lib/types/index.d.cts +34 -0
- package/lib/types/index.d.mts +34 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/interfaces/ContextuallyLogged.d.cts +8 -0
- package/lib/types/interfaces/ContextuallyLogged.d.mts +8 -0
- package/lib/types/interfaces/ErrorParser.d.cts +16 -0
- package/lib/types/interfaces/ErrorParser.d.mts +16 -0
- package/lib/types/interfaces/Executor.d.cts +16 -0
- package/lib/types/interfaces/Executor.d.mts +16 -0
- package/lib/types/interfaces/Observable.d.cts +33 -0
- package/lib/types/interfaces/Observable.d.mts +33 -0
- package/lib/types/interfaces/Observer.d.cts +15 -0
- package/lib/types/interfaces/Observer.d.mts +15 -0
- package/lib/types/interfaces/Paginatable.d.cts +20 -0
- package/lib/types/interfaces/Paginatable.d.mts +20 -0
- package/lib/types/interfaces/Queriable.d.cts +47 -0
- package/lib/types/interfaces/Queriable.d.mts +47 -0
- package/lib/types/interfaces/RawExecutor.d.cts +28 -0
- package/lib/types/interfaces/RawExecutor.d.mts +28 -0
- package/lib/types/interfaces/SequenceOptions.d.cts +79 -0
- package/lib/types/interfaces/SequenceOptions.d.mts +79 -0
- package/lib/types/interfaces/index.d.cts +12 -0
- package/lib/types/interfaces/index.d.mts +12 -0
- package/lib/types/migrations/Migration.d.cts +19 -0
- package/lib/types/migrations/Migration.d.mts +19 -0
- package/lib/types/migrations/MigrationService.d.cts +63 -0
- package/lib/types/migrations/MigrationService.d.mts +63 -0
- package/lib/types/migrations/MigrationTaskBuilder.d.cts +10 -0
- package/lib/types/migrations/MigrationTaskBuilder.d.mts +10 -0
- package/lib/types/migrations/MigrationTasks.d.cts +9 -0
- package/lib/types/migrations/MigrationTasks.d.mts +9 -0
- package/lib/types/migrations/MigrationVersioning.d.cts +7 -0
- package/lib/types/migrations/MigrationVersioning.d.mts +7 -0
- package/lib/types/migrations/SemverMigrationVersioning.d.cts +10 -0
- package/lib/types/migrations/SemverMigrationVersioning.d.mts +10 -0
- package/lib/types/migrations/StandardMigrationVersioning.d.cts +12 -0
- package/lib/types/migrations/StandardMigrationVersioning.d.mts +12 -0
- package/lib/types/migrations/constants.d.cts +2 -0
- package/lib/types/migrations/constants.d.mts +2 -0
- package/lib/types/migrations/decorators.d.cts +12 -0
- package/lib/types/migrations/decorators.d.mts +12 -0
- package/lib/types/migrations/index.d.cts +15 -0
- package/lib/types/migrations/index.d.mts +15 -0
- package/lib/types/migrations/types.d.cts +46 -0
- package/lib/types/migrations/types.d.mts +46 -0
- package/lib/types/model/BaseModel.d.cts +37 -0
- package/lib/types/model/BaseModel.d.mts +37 -0
- package/lib/types/model/SequenceModel.d.cts +32 -0
- package/lib/types/model/SequenceModel.d.mts +32 -0
- package/lib/types/model/construction.d.cts +455 -0
- package/lib/types/model/construction.d.mts +455 -0
- package/lib/types/model/decorators.d.cts +237 -0
- package/lib/types/model/decorators.d.mts +237 -0
- package/lib/types/model/index.d.cts +11 -0
- package/lib/types/model/index.d.mts +11 -0
- package/lib/types/model/indexing.d.cts +20 -0
- package/lib/types/model/indexing.d.mts +20 -0
- package/lib/types/model/types.d.cts +60 -0
- package/lib/types/model/types.d.mts +60 -0
- package/lib/types/overrides/Metadata.d.cts +22 -0
- package/lib/types/overrides/Metadata.d.mts +22 -0
- package/lib/types/overrides/Model.d.cts +94 -0
- package/lib/types/overrides/Model.d.mts +94 -0
- package/lib/types/overrides/ModelBuilder.d.cts +31 -0
- package/lib/types/overrides/ModelBuilder.d.mts +31 -0
- package/lib/types/overrides/index.d.cts +11 -0
- package/lib/types/overrides/index.d.mts +11 -0
- package/lib/types/overrides/injectables.d.cts +10 -0
- package/lib/types/overrides/injectables.d.mts +10 -0
- package/lib/types/overrides/overrides.d.cts +1 -0
- package/lib/types/overrides/overrides.d.mts +1 -0
- package/lib/types/persistence/Adapter.d.cts +469 -0
- package/lib/types/persistence/Adapter.d.mts +469 -0
- package/lib/types/persistence/Context.d.cts +16 -0
- package/lib/types/persistence/Context.d.mts +16 -0
- package/lib/types/persistence/ContextLock.d.cts +18 -0
- package/lib/types/persistence/ContextLock.d.mts +18 -0
- package/lib/types/persistence/Dispatch.d.cts +128 -0
- package/lib/types/persistence/Dispatch.d.mts +128 -0
- package/lib/types/persistence/ObserverHandler.d.cts +111 -0
- package/lib/types/persistence/ObserverHandler.d.mts +111 -0
- package/lib/types/persistence/Sequence.d.cts +126 -0
- package/lib/types/persistence/Sequence.d.mts +126 -0
- package/lib/types/persistence/constants.d.cts +74 -0
- package/lib/types/persistence/constants.d.mts +74 -0
- package/lib/types/persistence/decorators.d.cts +28 -0
- package/lib/types/persistence/decorators.d.mts +28 -0
- package/lib/types/persistence/errors.d.cts +33 -0
- package/lib/types/persistence/errors.d.mts +33 -0
- package/lib/types/persistence/event-filters.d.cts +20 -0
- package/lib/types/persistence/event-filters.d.mts +20 -0
- package/lib/types/persistence/generators.d.cts +14 -0
- package/lib/types/persistence/generators.d.mts +14 -0
- package/lib/types/persistence/index.d.cts +18 -0
- package/lib/types/persistence/index.d.mts +18 -0
- package/lib/types/persistence/transactions.d.cts +4 -0
- package/lib/types/persistence/transactions.d.mts +4 -0
- package/lib/types/persistence/types.d.cts +86 -0
- package/lib/types/persistence/types.d.mts +86 -0
- package/lib/types/query/Condition.d.cts +131 -0
- package/lib/types/query/Condition.d.mts +131 -0
- package/lib/types/query/MethodQueryBuilder.d.cts +185 -0
- package/lib/types/query/MethodQueryBuilder.d.mts +185 -0
- package/lib/types/query/Paginator.d.cts +105 -0
- package/lib/types/query/Paginator.d.mts +105 -0
- package/lib/types/query/Statement.d.cts +136 -0
- package/lib/types/query/Statement.d.mts +136 -0
- package/lib/types/query/constants.d.cts +69 -0
- package/lib/types/query/constants.d.mts +69 -0
- package/lib/types/query/decorators.d.cts +8 -0
- package/lib/types/query/decorators.d.mts +8 -0
- package/lib/types/query/errors.d.cts +21 -0
- package/lib/types/query/errors.d.mts +21 -0
- package/lib/types/query/index.d.cts +16 -0
- package/lib/types/query/index.d.mts +16 -0
- package/lib/types/query/options.d.cts +393 -0
- package/lib/types/query/options.d.mts +393 -0
- package/lib/types/query/selectors.d.cts +39 -0
- package/lib/types/query/selectors.d.mts +39 -0
- package/lib/types/query/types.d.cts +158 -0
- package/lib/types/query/types.d.mts +158 -0
- package/lib/types/query/utils.d.cts +40 -0
- package/lib/types/query/utils.d.mts +40 -0
- package/lib/types/ram/RamAdapter.d.cts +341 -0
- package/lib/types/ram/RamAdapter.d.mts +341 -0
- package/lib/types/ram/RamPaginator.d.cts +54 -0
- package/lib/types/ram/RamPaginator.d.mts +54 -0
- package/lib/types/ram/RamStatement.d.cts +92 -0
- package/lib/types/ram/RamStatement.d.mts +92 -0
- package/lib/types/ram/constants.d.cts +8 -0
- package/lib/types/ram/constants.d.mts +8 -0
- package/lib/types/ram/handlers.d.cts +24 -0
- package/lib/types/ram/handlers.d.mts +24 -0
- package/lib/types/ram/index.d.cts +12 -0
- package/lib/types/ram/index.d.mts +12 -0
- package/lib/types/ram/types.d.cts +50 -0
- package/lib/types/ram/types.d.mts +50 -0
- package/lib/types/repository/Repository.d.cts +501 -0
- package/lib/types/repository/Repository.d.mts +501 -0
- package/lib/types/repository/constants.d.cts +36 -0
- package/lib/types/repository/constants.d.mts +36 -0
- package/lib/types/repository/decorators.d.cts +30 -0
- package/lib/types/repository/decorators.d.mts +30 -0
- package/lib/types/repository/errors.d.cts +19 -0
- package/lib/types/repository/errors.d.mts +19 -0
- package/lib/types/repository/index.d.cts +12 -0
- package/lib/types/repository/index.d.mts +12 -0
- package/lib/types/repository/injectables.d.cts +95 -0
- package/lib/types/repository/injectables.d.mts +95 -0
- package/lib/types/repository/types.d.cts +28 -0
- package/lib/types/repository/types.d.mts +28 -0
- package/lib/types/repository/utils.d.cts +36 -0
- package/lib/types/repository/utils.d.mts +36 -0
- package/lib/types/services/ModelService.d.cts +45 -0
- package/lib/types/services/ModelService.d.mts +45 -0
- package/lib/types/services/PersistenceService.d.cts +17 -0
- package/lib/types/services/PersistenceService.d.mts +17 -0
- package/lib/types/services/index.d.cts +8 -0
- package/lib/types/services/index.d.mts +8 -0
- package/lib/types/services/services.d.cts +96 -0
- package/lib/types/services/services.d.mts +96 -0
- package/lib/types/tasks/CleanUpTask.d.cts +15 -0
- package/lib/types/tasks/CleanUpTask.d.mts +15 -0
- package/lib/types/tasks/TaskContext.d.cts +30 -0
- package/lib/types/tasks/TaskContext.d.mts +30 -0
- package/lib/types/tasks/TaskEngine.d.cts +97 -0
- package/lib/types/tasks/TaskEngine.d.mts +97 -0
- package/lib/types/tasks/TaskErrors.d.cts +65 -0
- package/lib/types/tasks/TaskErrors.d.mts +65 -0
- package/lib/types/tasks/TaskEventBus.d.cts +17 -0
- package/lib/types/tasks/TaskEventBus.d.mts +17 -0
- package/lib/types/tasks/TaskEventService.d.cts +7 -0
- package/lib/types/tasks/TaskEventService.d.mts +7 -0
- package/lib/types/tasks/TaskHandler.d.cts +12 -0
- package/lib/types/tasks/TaskHandler.d.mts +12 -0
- package/lib/types/tasks/TaskHandlerRegistry.d.cts +8 -0
- package/lib/types/tasks/TaskHandlerRegistry.d.mts +8 -0
- package/lib/types/tasks/TaskService.d.cts +65 -0
- package/lib/types/tasks/TaskService.d.mts +65 -0
- package/lib/types/tasks/TaskStateChangeError.d.cts +11 -0
- package/lib/types/tasks/TaskStateChangeError.d.mts +11 -0
- package/lib/types/tasks/TaskTracker.d.cts +47 -0
- package/lib/types/tasks/TaskTracker.d.mts +47 -0
- package/lib/types/tasks/builder.d.cts +72 -0
- package/lib/types/tasks/builder.d.mts +72 -0
- package/lib/types/tasks/constants.d.cts +31 -0
- package/lib/types/tasks/constants.d.mts +31 -0
- package/lib/types/tasks/decorators.d.cts +4 -0
- package/lib/types/tasks/decorators.d.mts +4 -0
- package/lib/types/tasks/index.d.cts +23 -0
- package/lib/types/tasks/index.d.mts +23 -0
- package/lib/types/tasks/logging.d.cts +31 -0
- package/lib/types/tasks/logging.d.mts +31 -0
- package/lib/types/tasks/models/TaskBackoffModel.d.cts +9 -0
- package/lib/types/tasks/models/TaskBackoffModel.d.mts +9 -0
- package/lib/types/tasks/models/TaskErrorModel.d.cts +8 -0
- package/lib/types/tasks/models/TaskErrorModel.d.mts +8 -0
- package/lib/types/tasks/models/TaskEventModel.d.cts +11 -0
- package/lib/types/tasks/models/TaskEventModel.d.mts +11 -0
- package/lib/types/tasks/models/TaskIOSerializer.d.cts +33 -0
- package/lib/types/tasks/models/TaskIOSerializer.d.mts +33 -0
- package/lib/types/tasks/models/TaskLogEntryModel.d.cts +10 -0
- package/lib/types/tasks/models/TaskLogEntryModel.d.mts +10 -0
- package/lib/types/tasks/models/TaskModel.d.cts +43 -0
- package/lib/types/tasks/models/TaskModel.d.mts +43 -0
- package/lib/types/tasks/models/TaskStepResultModel.d.cts +9 -0
- package/lib/types/tasks/models/TaskStepResultModel.d.mts +9 -0
- package/lib/types/tasks/models/TaskStepSpecModel.d.cts +9 -0
- package/lib/types/tasks/models/TaskStepSpecModel.d.mts +9 -0
- package/lib/types/tasks/models/index.d.cts +8 -0
- package/lib/types/tasks/models/index.d.mts +8 -0
- package/lib/types/tasks/types.d.cts +71 -0
- package/lib/types/tasks/types.d.mts +71 -0
- package/lib/types/tasks/utils.d.cts +5 -0
- package/lib/types/tasks/utils.d.mts +5 -0
- package/lib/types/utils/ContextualLoggedClass.d.cts +37 -0
- package/lib/types/utils/ContextualLoggedClass.d.mts +37 -0
- package/lib/types/utils/decorators.d.cts +27 -0
- package/lib/types/utils/decorators.d.mts +27 -0
- package/lib/types/utils/errors.d.cts +56 -0
- package/lib/types/utils/errors.d.mts +56 -0
- package/lib/types/utils/index.d.cts +11 -0
- package/lib/types/utils/index.d.mts +11 -0
- package/lib/types/utils/throttling.d.cts +9 -0
- package/lib/types/utils/throttling.d.mts +9 -0
- package/lib/types/utils/types.d.cts +23 -0
- package/lib/types/utils/types.d.mts +23 -0
- package/lib/types/utils/utils.d.cts +22 -0
- package/lib/types/utils/utils.d.mts +22 -0
- package/lib/types/workers/TaskEngine.d.cts +40 -0
- package/lib/types/workers/TaskEngine.d.mts +40 -0
- package/lib/types/workers/WorkThreadEnvironment.d.cts +35 -0
- package/lib/types/workers/WorkThreadEnvironment.d.mts +35 -0
- package/lib/types/workers/index.d.cts +5 -0
- package/lib/types/workers/index.d.mts +5 -0
- package/lib/types/workers/messages.d.cts +69 -0
- package/lib/types/workers/messages.d.mts +69 -0
- package/lib/types/workers/types.d.cts +41 -0
- package/lib/types/workers/types.d.mts +41 -0
- package/lib/types/workers/workerThread.d.cts +1 -0
- package/lib/types/workers/workerThread.d.mts +1 -0
- package/package.json +4 -4
- package/lib/cjs/auth/constants.js.map +0 -1
- package/lib/cjs/auth/decorators.js.map +0 -1
- package/lib/cjs/auth/index.js.map +0 -1
- package/lib/cjs/fs/FilesystemAdapter.js.map +0 -1
- package/lib/cjs/fs/FsDispatch.js.map +0 -1
- package/lib/cjs/fs/helpers.js.map +0 -1
- package/lib/cjs/fs/index.js.map +0 -1
- package/lib/cjs/fs/indexStore.js.map +0 -1
- package/lib/cjs/fs/locks/FilesystemLock.js.map +0 -1
- package/lib/cjs/fs/locks/FilesystemMultiLock.js.map +0 -1
- package/lib/cjs/fs/types.js.map +0 -1
- package/lib/cjs/identity/decorators.js.map +0 -1
- package/lib/cjs/identity/index.js.map +0 -1
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/interfaces/ContextuallyLogged.js.map +0 -1
- package/lib/cjs/interfaces/ErrorParser.js.map +0 -1
- package/lib/cjs/interfaces/Executor.js.map +0 -1
- package/lib/cjs/interfaces/Observable.js.map +0 -1
- package/lib/cjs/interfaces/Observer.js.map +0 -1
- package/lib/cjs/interfaces/Paginatable.js.map +0 -1
- package/lib/cjs/interfaces/Queriable.js.map +0 -1
- package/lib/cjs/interfaces/RawExecutor.js.map +0 -1
- package/lib/cjs/interfaces/SequenceOptions.js.map +0 -1
- package/lib/cjs/interfaces/index.js.map +0 -1
- package/lib/cjs/migrations/Migration.js.map +0 -1
- package/lib/cjs/migrations/MigrationService.js.map +0 -1
- package/lib/cjs/migrations/MigrationTaskBuilder.js.map +0 -1
- package/lib/cjs/migrations/MigrationTasks.js.map +0 -1
- package/lib/cjs/migrations/MigrationVersioning.js.map +0 -1
- package/lib/cjs/migrations/SemverMigrationVersioning.js.map +0 -1
- package/lib/cjs/migrations/StandardMigrationVersioning.js.map +0 -1
- package/lib/cjs/migrations/constants.js.map +0 -1
- package/lib/cjs/migrations/decorators.js.map +0 -1
- package/lib/cjs/migrations/index.js.map +0 -1
- package/lib/cjs/migrations/types.js.map +0 -1
- package/lib/cjs/model/BaseModel.js.map +0 -1
- package/lib/cjs/model/SequenceModel.js.map +0 -1
- package/lib/cjs/model/construction.js.map +0 -1
- package/lib/cjs/model/decorators.js.map +0 -1
- package/lib/cjs/model/index.js.map +0 -1
- package/lib/cjs/model/indexing.js.map +0 -1
- package/lib/cjs/model/types.js.map +0 -1
- package/lib/cjs/overrides/Metadata.js.map +0 -1
- package/lib/cjs/overrides/Model.js.map +0 -1
- package/lib/cjs/overrides/ModelBuilder.js.map +0 -1
- package/lib/cjs/overrides/index.js.map +0 -1
- package/lib/cjs/overrides/injectables.js.map +0 -1
- package/lib/cjs/overrides/overrides.js.map +0 -1
- package/lib/cjs/persistence/Adapter.js.map +0 -1
- package/lib/cjs/persistence/Context.js.map +0 -1
- package/lib/cjs/persistence/ContextLock.js.map +0 -1
- package/lib/cjs/persistence/Dispatch.js.map +0 -1
- package/lib/cjs/persistence/ObserverHandler.js.map +0 -1
- package/lib/cjs/persistence/Sequence.js.map +0 -1
- package/lib/cjs/persistence/constants.js.map +0 -1
- package/lib/cjs/persistence/decorators.js.map +0 -1
- package/lib/cjs/persistence/errors.js.map +0 -1
- package/lib/cjs/persistence/event-filters.js.map +0 -1
- package/lib/cjs/persistence/generators.js.map +0 -1
- package/lib/cjs/persistence/index.js.map +0 -1
- package/lib/cjs/persistence/transactions.js.map +0 -1
- package/lib/cjs/persistence/types.js.map +0 -1
- package/lib/cjs/query/Condition.js.map +0 -1
- package/lib/cjs/query/MethodQueryBuilder.js.map +0 -1
- package/lib/cjs/query/Paginator.js.map +0 -1
- package/lib/cjs/query/Statement.js.map +0 -1
- package/lib/cjs/query/constants.js.map +0 -1
- package/lib/cjs/query/decorators.js.map +0 -1
- package/lib/cjs/query/errors.js.map +0 -1
- package/lib/cjs/query/index.js.map +0 -1
- package/lib/cjs/query/options.js.map +0 -1
- package/lib/cjs/query/selectors.js.map +0 -1
- package/lib/cjs/query/types.js.map +0 -1
- package/lib/cjs/query/utils.js.map +0 -1
- package/lib/cjs/ram/RamAdapter.js.map +0 -1
- package/lib/cjs/ram/RamPaginator.js.map +0 -1
- package/lib/cjs/ram/RamStatement.js.map +0 -1
- package/lib/cjs/ram/constants.js.map +0 -1
- package/lib/cjs/ram/handlers.js.map +0 -1
- package/lib/cjs/ram/index.js.map +0 -1
- package/lib/cjs/ram/types.js.map +0 -1
- package/lib/cjs/repository/Repository.js.map +0 -1
- package/lib/cjs/repository/constants.js.map +0 -1
- package/lib/cjs/repository/decorators.js.map +0 -1
- package/lib/cjs/repository/errors.js.map +0 -1
- package/lib/cjs/repository/index.js.map +0 -1
- package/lib/cjs/repository/injectables.js.map +0 -1
- package/lib/cjs/repository/types.js.map +0 -1
- package/lib/cjs/repository/utils.js.map +0 -1
- package/lib/cjs/services/ModelService.js.map +0 -1
- package/lib/cjs/services/PersistenceService.js.map +0 -1
- package/lib/cjs/services/index.js.map +0 -1
- package/lib/cjs/services/services.js.map +0 -1
- package/lib/cjs/tasks/CleanUpTask.js.map +0 -1
- package/lib/cjs/tasks/TaskContext.js.map +0 -1
- package/lib/cjs/tasks/TaskEngine.js.map +0 -1
- package/lib/cjs/tasks/TaskErrors.js.map +0 -1
- package/lib/cjs/tasks/TaskEventBus.js.map +0 -1
- package/lib/cjs/tasks/TaskEventService.js.map +0 -1
- package/lib/cjs/tasks/TaskHandler.js.map +0 -1
- package/lib/cjs/tasks/TaskHandlerRegistry.js.map +0 -1
- package/lib/cjs/tasks/TaskService.js.map +0 -1
- package/lib/cjs/tasks/TaskStateChangeError.js.map +0 -1
- package/lib/cjs/tasks/TaskTracker.js.map +0 -1
- package/lib/cjs/tasks/builder.js.map +0 -1
- package/lib/cjs/tasks/constants.js.map +0 -1
- package/lib/cjs/tasks/decorators.js.map +0 -1
- package/lib/cjs/tasks/index.js.map +0 -1
- package/lib/cjs/tasks/logging.js.map +0 -1
- package/lib/cjs/tasks/models/TaskBackoffModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskErrorModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskEventModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskIOSerializer.js.map +0 -1
- package/lib/cjs/tasks/models/TaskLogEntryModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskStepResultModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskStepSpecModel.js.map +0 -1
- package/lib/cjs/tasks/models/index.js.map +0 -1
- package/lib/cjs/tasks/types.js.map +0 -1
- package/lib/cjs/tasks/utils.js.map +0 -1
- package/lib/cjs/utils/ContextualLoggedClass.js.map +0 -1
- package/lib/cjs/utils/decorators.js.map +0 -1
- package/lib/cjs/utils/errors.js.map +0 -1
- package/lib/cjs/utils/index.js.map +0 -1
- package/lib/cjs/utils/throttling.js.map +0 -1
- package/lib/cjs/utils/types.js.map +0 -1
- package/lib/cjs/utils/utils.js.map +0 -1
- package/lib/cjs/workers/TaskEngine.js.map +0 -1
- package/lib/cjs/workers/WorkThreadEnvironment.js.map +0 -1
- package/lib/cjs/workers/index.js.map +0 -1
- package/lib/cjs/workers/messages.js.map +0 -1
- package/lib/cjs/workers/types.js.map +0 -1
- package/lib/cjs/workers/workerThread.js.map +0 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Comparison operators for query conditions
|
|
3
|
+
* @summary Enum defining the available operators for comparing values in database queries
|
|
4
|
+
* @enum {string}
|
|
5
|
+
* @readonly
|
|
6
|
+
* @memberOf module:core
|
|
7
|
+
*/
|
|
8
|
+
export declare enum Operator {
|
|
9
|
+
/** Equal comparison (=) */
|
|
10
|
+
EQUAL = "EQUAL",
|
|
11
|
+
/** Not equal comparison (!=) */
|
|
12
|
+
DIFFERENT = "DIFFERENT",
|
|
13
|
+
/** Greater than comparison (>) */
|
|
14
|
+
BIGGER = "BIGGER",
|
|
15
|
+
/** Greater than or equal comparison (>=) */
|
|
16
|
+
BIGGER_EQ = "BIGGER_EQ",
|
|
17
|
+
/** Less than comparison (<) */
|
|
18
|
+
SMALLER = "SMALLER",
|
|
19
|
+
/** Less than or equal comparison (<=) */
|
|
20
|
+
SMALLER_EQ = "SMALLER_EQ",
|
|
21
|
+
/** Between comparison (BETWEEN) */
|
|
22
|
+
BETWEEN = "BETWEEN",
|
|
23
|
+
/** Negation operator (NOT) */
|
|
24
|
+
NOT = "NOT",
|
|
25
|
+
/** Inclusion operator (IN) */
|
|
26
|
+
IN = "IN",
|
|
27
|
+
/** Regular expression matching */
|
|
28
|
+
REGEXP = "REGEXP",
|
|
29
|
+
/** String starts-with comparison */
|
|
30
|
+
STARTS_WITH = "STARTS_WITH",
|
|
31
|
+
/** String ends-with comparison */
|
|
32
|
+
ENDS_WITH = "ENDS_WITH",
|
|
33
|
+
GROUP_BY = "group-by",
|
|
34
|
+
COUNT = "count",
|
|
35
|
+
SUM = "sum",
|
|
36
|
+
MAX = "v_max",
|
|
37
|
+
MIN = "v_min",
|
|
38
|
+
DISTINCT = "distinct",
|
|
39
|
+
VIEW = "view"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @description Logical operators for combining query conditions
|
|
43
|
+
* @summary Enum defining the available operators for grouping multiple conditions in database queries
|
|
44
|
+
* @enum {string}
|
|
45
|
+
* @readonly
|
|
46
|
+
* @memberOf module:core
|
|
47
|
+
*/
|
|
48
|
+
export declare enum GroupOperator {
|
|
49
|
+
/** Logical AND operator - all conditions must be true */
|
|
50
|
+
AND = "AND",
|
|
51
|
+
/** Logical OR operator - at least one condition must be true */
|
|
52
|
+
OR = "OR"
|
|
53
|
+
}
|
|
54
|
+
export declare enum PreparedStatementKeys {
|
|
55
|
+
LIST_BY = "listBy",
|
|
56
|
+
FIND_BY = "findBy",
|
|
57
|
+
FIND_BY_PAGINATE = "findByPaginate",
|
|
58
|
+
FIND_ONE_BY = "findOneBy",
|
|
59
|
+
PAGE_BY = "paginateBy",
|
|
60
|
+
FIND = "find",
|
|
61
|
+
PAGE = "page",
|
|
62
|
+
COUNT_OF = "countOf",
|
|
63
|
+
MAX_OF = "maxOf",
|
|
64
|
+
MIN_OF = "minOf",
|
|
65
|
+
AVG_OF = "avgOf",
|
|
66
|
+
SUM_OF = "sumOf",
|
|
67
|
+
DISTINCT_OF = "distinctOf",
|
|
68
|
+
GROUP_OF = "groupOf"
|
|
69
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Comparison operators for query conditions
|
|
3
|
+
* @summary Enum defining the available operators for comparing values in database queries
|
|
4
|
+
* @enum {string}
|
|
5
|
+
* @readonly
|
|
6
|
+
* @memberOf module:core
|
|
7
|
+
*/
|
|
8
|
+
export declare enum Operator {
|
|
9
|
+
/** Equal comparison (=) */
|
|
10
|
+
EQUAL = "EQUAL",
|
|
11
|
+
/** Not equal comparison (!=) */
|
|
12
|
+
DIFFERENT = "DIFFERENT",
|
|
13
|
+
/** Greater than comparison (>) */
|
|
14
|
+
BIGGER = "BIGGER",
|
|
15
|
+
/** Greater than or equal comparison (>=) */
|
|
16
|
+
BIGGER_EQ = "BIGGER_EQ",
|
|
17
|
+
/** Less than comparison (<) */
|
|
18
|
+
SMALLER = "SMALLER",
|
|
19
|
+
/** Less than or equal comparison (<=) */
|
|
20
|
+
SMALLER_EQ = "SMALLER_EQ",
|
|
21
|
+
/** Between comparison (BETWEEN) */
|
|
22
|
+
BETWEEN = "BETWEEN",
|
|
23
|
+
/** Negation operator (NOT) */
|
|
24
|
+
NOT = "NOT",
|
|
25
|
+
/** Inclusion operator (IN) */
|
|
26
|
+
IN = "IN",
|
|
27
|
+
/** Regular expression matching */
|
|
28
|
+
REGEXP = "REGEXP",
|
|
29
|
+
/** String starts-with comparison */
|
|
30
|
+
STARTS_WITH = "STARTS_WITH",
|
|
31
|
+
/** String ends-with comparison */
|
|
32
|
+
ENDS_WITH = "ENDS_WITH",
|
|
33
|
+
GROUP_BY = "group-by",
|
|
34
|
+
COUNT = "count",
|
|
35
|
+
SUM = "sum",
|
|
36
|
+
MAX = "v_max",
|
|
37
|
+
MIN = "v_min",
|
|
38
|
+
DISTINCT = "distinct",
|
|
39
|
+
VIEW = "view"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @description Logical operators for combining query conditions
|
|
43
|
+
* @summary Enum defining the available operators for grouping multiple conditions in database queries
|
|
44
|
+
* @enum {string}
|
|
45
|
+
* @readonly
|
|
46
|
+
* @memberOf module:core
|
|
47
|
+
*/
|
|
48
|
+
export declare enum GroupOperator {
|
|
49
|
+
/** Logical AND operator - all conditions must be true */
|
|
50
|
+
AND = "AND",
|
|
51
|
+
/** Logical OR operator - at least one condition must be true */
|
|
52
|
+
OR = "OR"
|
|
53
|
+
}
|
|
54
|
+
export declare enum PreparedStatementKeys {
|
|
55
|
+
LIST_BY = "listBy",
|
|
56
|
+
FIND_BY = "findBy",
|
|
57
|
+
FIND_BY_PAGINATE = "findByPaginate",
|
|
58
|
+
FIND_ONE_BY = "findOneBy",
|
|
59
|
+
PAGE_BY = "paginateBy",
|
|
60
|
+
FIND = "find",
|
|
61
|
+
PAGE = "page",
|
|
62
|
+
COUNT_OF = "countOf",
|
|
63
|
+
MAX_OF = "maxOf",
|
|
64
|
+
MIN_OF = "minOf",
|
|
65
|
+
AVG_OF = "avgOf",
|
|
66
|
+
SUM_OF = "sumOf",
|
|
67
|
+
DISTINCT_OF = "distinctOf",
|
|
68
|
+
GROUP_OF = "groupOf"
|
|
69
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QueryOptions, ViewKind, ViewOptions } from "./types.cjs";
|
|
2
|
+
import { PersistenceKeys } from "../persistence/constants.cjs";
|
|
3
|
+
import { Operator } from "./constants.cjs";
|
|
4
|
+
export declare function defaultQueryAttr(): (obj: object, prop?: any) => void;
|
|
5
|
+
export declare function prepared(): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
6
|
+
export declare function query(options?: QueryOptions): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
7
|
+
export declare function applyViewDecorator(metaKey: PersistenceKeys | Operator, kind: ViewKind, opts?: ViewOptions): (target: any, attr: any) => void;
|
|
8
|
+
export declare function view<OPTS extends ViewOptions>(opts?: OPTS): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QueryOptions, ViewKind, ViewOptions } from "./types.js";
|
|
2
|
+
import { PersistenceKeys } from "../persistence/constants.js";
|
|
3
|
+
import { Operator } from "./constants.js";
|
|
4
|
+
export declare function defaultQueryAttr(): (obj: object, prop?: any) => void;
|
|
5
|
+
export declare function prepared(): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
6
|
+
export declare function query(options?: QueryOptions): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
7
|
+
export declare function applyViewDecorator(metaKey: PersistenceKeys | Operator, kind: ViewKind, opts?: ViewOptions): (target: any, attr: any) => void;
|
|
8
|
+
export declare function view<OPTS extends ViewOptions>(opts?: OPTS): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InternalError } from "@decaf-ts/db-decorators";
|
|
2
|
+
/**
|
|
3
|
+
* @description Error thrown during query operations
|
|
4
|
+
* @summary Represents errors that occur during query building or execution
|
|
5
|
+
* @param {string | Error} msg - The error message or Error object
|
|
6
|
+
* @class QueryError
|
|
7
|
+
* @category Errors
|
|
8
|
+
*/
|
|
9
|
+
export declare class QueryError extends InternalError {
|
|
10
|
+
constructor(msg: string | Error);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @description Error thrown during pagination operations
|
|
14
|
+
* @summary Represents errors that occur during pagination setup or execution
|
|
15
|
+
* @param {string | Error} msg - The error message or Error object
|
|
16
|
+
* @class PagingError
|
|
17
|
+
* @category Errors
|
|
18
|
+
*/
|
|
19
|
+
export declare class PagingError extends InternalError {
|
|
20
|
+
constructor(msg: string | Error);
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InternalError } from "@decaf-ts/db-decorators";
|
|
2
|
+
/**
|
|
3
|
+
* @description Error thrown during query operations
|
|
4
|
+
* @summary Represents errors that occur during query building or execution
|
|
5
|
+
* @param {string | Error} msg - The error message or Error object
|
|
6
|
+
* @class QueryError
|
|
7
|
+
* @category Errors
|
|
8
|
+
*/
|
|
9
|
+
export declare class QueryError extends InternalError {
|
|
10
|
+
constructor(msg: string | Error);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @description Error thrown during pagination operations
|
|
14
|
+
* @summary Represents errors that occur during pagination setup or execution
|
|
15
|
+
* @param {string | Error} msg - The error message or Error object
|
|
16
|
+
* @class PagingError
|
|
17
|
+
* @category Errors
|
|
18
|
+
*/
|
|
19
|
+
export declare class PagingError extends InternalError {
|
|
20
|
+
constructor(msg: string | Error);
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Exports for the query module.
|
|
3
|
+
* @summary This file exports all the necessary components for the query functionality, including Condition, constants, errors, and more.
|
|
4
|
+
* @module core/query
|
|
5
|
+
*/
|
|
6
|
+
export * from "./Condition.cjs";
|
|
7
|
+
export * from "./constants.cjs";
|
|
8
|
+
export * from "./errors.cjs";
|
|
9
|
+
export * from "./options.cjs";
|
|
10
|
+
export * from "./Paginator.cjs";
|
|
11
|
+
export * from "./selectors.cjs";
|
|
12
|
+
export * from "./Statement.cjs";
|
|
13
|
+
export * from "./decorators.cjs";
|
|
14
|
+
export * from "./MethodQueryBuilder.cjs";
|
|
15
|
+
export * from "./types.cjs";
|
|
16
|
+
export * from "./utils.cjs";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Exports for the query module.
|
|
3
|
+
* @summary This file exports all the necessary components for the query functionality, including Condition, constants, errors, and more.
|
|
4
|
+
* @module core/query
|
|
5
|
+
*/
|
|
6
|
+
export * from "./Condition.js";
|
|
7
|
+
export * from "./constants.js";
|
|
8
|
+
export * from "./errors.js";
|
|
9
|
+
export * from "./options.js";
|
|
10
|
+
export * from "./Paginator.js";
|
|
11
|
+
export * from "./selectors.js";
|
|
12
|
+
export * from "./Statement.js";
|
|
13
|
+
export * from "./decorators.js";
|
|
14
|
+
export * from "./MethodQueryBuilder.js";
|
|
15
|
+
export * from "./types.js";
|
|
16
|
+
export * from "./utils.js";
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { GroupBySelector, LimitSelector, OffsetSelector, OrderBySelector, OrderDirectionInput, SelectSelector } from "./selectors.cjs";
|
|
2
|
+
import { Executor } from "../interfaces/index.cjs";
|
|
3
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
4
|
+
import { Condition } from "./Condition.cjs";
|
|
5
|
+
import { Paginatable } from "../interfaces/Paginatable.cjs";
|
|
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 {};
|