@decaf-ts/core 0.17.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
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Condition = void 0;
|
|
2
4
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
5
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
5
|
-
|
|
6
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
7
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
8
|
+
else
|
|
9
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
10
|
+
if (d = decorators[i])
|
|
11
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
12
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
13
|
};
|
|
8
14
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
16
|
+
return Reflect.metadata(k, v);
|
|
10
17
|
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Condition = void 0;
|
|
13
18
|
const decorator_validation_1 = require("@decaf-ts/decorator-validation");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
19
|
+
const constants_js_1 = require("./constants.cjs");
|
|
20
|
+
const errors_js_1 = require("./errors.cjs");
|
|
16
21
|
/**
|
|
17
22
|
* @description Represents a logical condition for database queries
|
|
18
23
|
* @summary A class that encapsulates query conditions with support for complex logical operations.
|
|
@@ -84,7 +89,7 @@ class Condition extends decorator_validation_1.Model {
|
|
|
84
89
|
* @return {Condition<M>} A new condition representing the NOT operation
|
|
85
90
|
*/
|
|
86
91
|
not(val) {
|
|
87
|
-
return new Condition(this,
|
|
92
|
+
return new Condition(this, constants_js_1.Operator.NOT, val);
|
|
88
93
|
}
|
|
89
94
|
/**
|
|
90
95
|
* @description Validates the condition and checks for errors
|
|
@@ -102,14 +107,14 @@ class Condition extends decorator_validation_1.Model {
|
|
|
102
107
|
condition: "Both sides of the comparison must be of the same type",
|
|
103
108
|
},
|
|
104
109
|
};
|
|
105
|
-
if (Object.values(
|
|
110
|
+
if (Object.values(constants_js_1.Operator).indexOf(this.operator) === -1)
|
|
106
111
|
return {
|
|
107
112
|
operator: {
|
|
108
113
|
condition: invalidOpMessage,
|
|
109
114
|
},
|
|
110
115
|
};
|
|
111
116
|
// Validate BETWEEN operator has array with 2 values
|
|
112
|
-
if (this.operator ===
|
|
117
|
+
if (this.operator === constants_js_1.Operator.BETWEEN) {
|
|
113
118
|
if (!Array.isArray(this.comparison) ||
|
|
114
119
|
this.comparison.length !== 2) {
|
|
115
120
|
return {
|
|
@@ -122,14 +127,14 @@ class Condition extends decorator_validation_1.Model {
|
|
|
122
127
|
}
|
|
123
128
|
if (this.attr1 instanceof Condition) {
|
|
124
129
|
if (!(this.comparison instanceof Condition) &&
|
|
125
|
-
this.operator !==
|
|
130
|
+
this.operator !== constants_js_1.Operator.NOT)
|
|
126
131
|
return {
|
|
127
132
|
comparison: {
|
|
128
133
|
condition: invalidOpMessage,
|
|
129
134
|
},
|
|
130
135
|
};
|
|
131
|
-
if (Object.values(
|
|
132
|
-
this.operator !==
|
|
136
|
+
if (Object.values(constants_js_1.GroupOperator).indexOf(this.operator) === -1 &&
|
|
137
|
+
this.operator !== constants_js_1.Operator.NOT)
|
|
133
138
|
return {
|
|
134
139
|
operator: {
|
|
135
140
|
condition: invalidOpMessage,
|
|
@@ -155,7 +160,7 @@ class Condition extends decorator_validation_1.Model {
|
|
|
155
160
|
* @return {Condition<M>} A new condition representing the AND operation
|
|
156
161
|
*/
|
|
157
162
|
static and(condition1, condition2) {
|
|
158
|
-
return Condition.group(condition1,
|
|
163
|
+
return Condition.group(condition1, constants_js_1.GroupOperator.AND, condition2);
|
|
159
164
|
}
|
|
160
165
|
/**
|
|
161
166
|
* @description Creates a new condition that combines two conditions with logical OR
|
|
@@ -166,7 +171,7 @@ class Condition extends decorator_validation_1.Model {
|
|
|
166
171
|
* @return {Condition<M>} A new condition representing the OR operation
|
|
167
172
|
*/
|
|
168
173
|
static or(condition1, condition2) {
|
|
169
|
-
return Condition.group(condition1,
|
|
174
|
+
return Condition.group(condition1, constants_js_1.GroupOperator.OR, condition2);
|
|
170
175
|
}
|
|
171
176
|
/**
|
|
172
177
|
* @description Creates a new condition that groups two conditions with a specified operator
|
|
@@ -207,158 +212,160 @@ class Condition extends decorator_validation_1.Model {
|
|
|
207
212
|
* @template M - The model type this condition builder operates on
|
|
208
213
|
* @class ConditionBuilder
|
|
209
214
|
*/
|
|
210
|
-
static {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* @description Sets the attribute for the condition
|
|
218
|
-
* @summary Specifies which model attribute the condition will operate on
|
|
219
|
-
* @param attr - The model attribute to use in the condition
|
|
220
|
-
* @return {AttributeOption<M>} This builder instance for method chaining
|
|
221
|
-
*/
|
|
222
|
-
attribute(attr) {
|
|
223
|
-
this.attr1 = attr;
|
|
224
|
-
return this;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* @description Alias for the attribute method
|
|
228
|
-
* @summary Shorthand method to specify which model attribute the condition will operate on
|
|
229
|
-
* @param attr - The model attribute to use in the condition
|
|
230
|
-
* @return {AttributeOption<M>} This builder instance for method chaining
|
|
231
|
-
*/
|
|
232
|
-
attr(attr) {
|
|
233
|
-
return this.attribute(attr);
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* @description Creates an equality condition
|
|
237
|
-
* @summary Builds a condition that checks if the attribute equals the specified value
|
|
238
|
-
* @param {any} val - The value to compare the attribute against
|
|
239
|
-
* @return {Condition<M>} A new condition representing the equality comparison
|
|
240
|
-
*/
|
|
241
|
-
eq(val) {
|
|
242
|
-
return this.setOp(constants_1.Operator.EQUAL, val);
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* @description Creates an inequality condition
|
|
246
|
-
* @summary Builds a condition that checks if the attribute is different from the specified value
|
|
247
|
-
* @param {any} val - The value to compare the attribute against
|
|
248
|
-
* @return {Condition<M>} A new condition representing the inequality comparison
|
|
249
|
-
*/
|
|
250
|
-
dif(val) {
|
|
251
|
-
return this.setOp(constants_1.Operator.DIFFERENT, val);
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* @description Creates a greater than condition
|
|
255
|
-
* @summary Builds a condition that checks if the attribute is greater than the specified value
|
|
256
|
-
* @param {any} val - The value to compare the attribute against
|
|
257
|
-
* @return {Condition<M>} A new condition representing the greater than comparison
|
|
258
|
-
*/
|
|
259
|
-
gt(val) {
|
|
260
|
-
return this.setOp(constants_1.Operator.BIGGER, val);
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* @description Creates a less than condition
|
|
264
|
-
* @summary Builds a condition that checks if the attribute is less than the specified value
|
|
265
|
-
* @param {any} val - The value to compare the attribute against
|
|
266
|
-
* @return {Condition<M>} A new condition representing the less than comparison
|
|
267
|
-
*/
|
|
268
|
-
lt(val) {
|
|
269
|
-
return this.setOp(constants_1.Operator.SMALLER, val);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* @description Creates a greater than or equal to condition
|
|
273
|
-
* @summary Builds a condition that checks if the attribute is greater than or equal to the specified value
|
|
274
|
-
* @param {any} val - The value to compare the attribute against
|
|
275
|
-
* @return {Condition<M>} A new condition representing the greater than or equal comparison
|
|
276
|
-
*/
|
|
277
|
-
gte(val) {
|
|
278
|
-
return this.setOp(constants_1.Operator.BIGGER_EQ, val);
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* @description Creates a less than or equal to condition
|
|
282
|
-
* @summary Builds a condition that checks if the attribute is less than or equal to the specified value
|
|
283
|
-
* @param {any} val - The value to compare the attribute against
|
|
284
|
-
* @return {Condition<M>} A new condition representing the less than or equal comparison
|
|
285
|
-
*/
|
|
286
|
-
lte(val) {
|
|
287
|
-
return this.setOp(constants_1.Operator.SMALLER_EQ, val);
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* @description Creates an inclusion condition
|
|
291
|
-
* @summary Builds a condition that checks if the attribute value is included in the specified array
|
|
292
|
-
* @param {any[]} arr - The array of values to check against
|
|
293
|
-
* @return {Condition<M>} A new condition representing the inclusion comparison
|
|
294
|
-
*/
|
|
295
|
-
in(arr) {
|
|
296
|
-
return this.setOp(constants_1.Operator.IN, arr);
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* @description Creates a regular expression condition
|
|
300
|
-
* @summary Builds a condition that checks if the attribute matches the specified regular expression pattern
|
|
301
|
-
* @param {any} val - The regular expression pattern to match against
|
|
302
|
-
* @return {Condition<M>} A new condition representing the regular expression comparison
|
|
303
|
-
*/
|
|
304
|
-
regexp(val) {
|
|
305
|
-
return this.setOp(constants_1.Operator.REGEXP, new RegExp(val).source);
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* @description Creates a startsWith string condition
|
|
309
|
-
* @summary Builds a condition that checks if the attribute string starts with the specified prefix
|
|
310
|
-
* @param {string} prefix - The prefix to match at the start of the string
|
|
311
|
-
* @return {Condition<M>} A new condition representing the startsWith comparison
|
|
312
|
-
*/
|
|
313
|
-
startsWith(prefix) {
|
|
314
|
-
return this.setOp(constants_1.Operator.STARTS_WITH, prefix);
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* @description Creates an endsWith string condition
|
|
318
|
-
* @summary Builds a condition that checks if the attribute string ends with the specified suffix
|
|
319
|
-
* @param {string} suffix - The suffix to match at the end of the string
|
|
320
|
-
* @return {Condition<M>} A new condition representing the endsWith comparison
|
|
321
|
-
*/
|
|
322
|
-
endsWith(suffix) {
|
|
323
|
-
return this.setOp(constants_1.Operator.ENDS_WITH, suffix);
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* @description Creates a between condition
|
|
327
|
-
* @summary Builds a condition that checks if the attribute value is between min and max (inclusive)
|
|
328
|
-
* @param {any} min - The minimum value (inclusive)
|
|
329
|
-
* @param {any} max - The maximum value (inclusive)
|
|
330
|
-
* @return {Condition<M>} A new condition representing the between comparison
|
|
331
|
-
*/
|
|
332
|
-
between(min, max) {
|
|
333
|
-
return this.setOp(constants_1.Operator.BETWEEN, [min, max]);
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* @description Sets the operator and comparison value for the condition
|
|
337
|
-
* @summary Private method that configures the condition with the specified operator and value
|
|
338
|
-
* @param {Operator} op - The operator to use for the condition
|
|
339
|
-
* @param {any} val - The value to compare against
|
|
340
|
-
* @return {Condition<M>} A new condition with the specified operator and value
|
|
341
|
-
*/
|
|
342
|
-
setOp(op, val) {
|
|
343
|
-
this.operator = op;
|
|
344
|
-
this.comparison = val;
|
|
345
|
-
return this.build();
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* @description Constructs a Condition instance from the builder's state
|
|
349
|
-
* @summary Finalizes the condition building process by creating a new Condition instance
|
|
350
|
-
* @throws {QueryError} If the condition cannot be built due to invalid parameters
|
|
351
|
-
* @return {Condition<M>} A new condition instance with the configured attributes
|
|
352
|
-
*/
|
|
353
|
-
build() {
|
|
354
|
-
try {
|
|
355
|
-
return new Condition(this.attr1, this.operator, this.comparison);
|
|
215
|
+
static {
|
|
216
|
+
this.Builder = class ConditionBuilder {
|
|
217
|
+
constructor() {
|
|
218
|
+
this.attr1 = undefined;
|
|
219
|
+
this.operator = undefined;
|
|
220
|
+
this.comparison = undefined;
|
|
356
221
|
}
|
|
357
|
-
|
|
358
|
-
|
|
222
|
+
/**
|
|
223
|
+
* @description Sets the attribute for the condition
|
|
224
|
+
* @summary Specifies which model attribute the condition will operate on
|
|
225
|
+
* @param attr - The model attribute to use in the condition
|
|
226
|
+
* @return {AttributeOption<M>} This builder instance for method chaining
|
|
227
|
+
*/
|
|
228
|
+
attribute(attr) {
|
|
229
|
+
this.attr1 = attr;
|
|
230
|
+
return this;
|
|
359
231
|
}
|
|
360
|
-
|
|
361
|
-
|
|
232
|
+
/**
|
|
233
|
+
* @description Alias for the attribute method
|
|
234
|
+
* @summary Shorthand method to specify which model attribute the condition will operate on
|
|
235
|
+
* @param attr - The model attribute to use in the condition
|
|
236
|
+
* @return {AttributeOption<M>} This builder instance for method chaining
|
|
237
|
+
*/
|
|
238
|
+
attr(attr) {
|
|
239
|
+
return this.attribute(attr);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* @description Creates an equality condition
|
|
243
|
+
* @summary Builds a condition that checks if the attribute equals the specified value
|
|
244
|
+
* @param {any} val - The value to compare the attribute against
|
|
245
|
+
* @return {Condition<M>} A new condition representing the equality comparison
|
|
246
|
+
*/
|
|
247
|
+
eq(val) {
|
|
248
|
+
return this.setOp(constants_js_1.Operator.EQUAL, val);
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* @description Creates an inequality condition
|
|
252
|
+
* @summary Builds a condition that checks if the attribute is different from the specified value
|
|
253
|
+
* @param {any} val - The value to compare the attribute against
|
|
254
|
+
* @return {Condition<M>} A new condition representing the inequality comparison
|
|
255
|
+
*/
|
|
256
|
+
dif(val) {
|
|
257
|
+
return this.setOp(constants_js_1.Operator.DIFFERENT, val);
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* @description Creates a greater than condition
|
|
261
|
+
* @summary Builds a condition that checks if the attribute is greater than the specified value
|
|
262
|
+
* @param {any} val - The value to compare the attribute against
|
|
263
|
+
* @return {Condition<M>} A new condition representing the greater than comparison
|
|
264
|
+
*/
|
|
265
|
+
gt(val) {
|
|
266
|
+
return this.setOp(constants_js_1.Operator.BIGGER, val);
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* @description Creates a less than condition
|
|
270
|
+
* @summary Builds a condition that checks if the attribute is less than the specified value
|
|
271
|
+
* @param {any} val - The value to compare the attribute against
|
|
272
|
+
* @return {Condition<M>} A new condition representing the less than comparison
|
|
273
|
+
*/
|
|
274
|
+
lt(val) {
|
|
275
|
+
return this.setOp(constants_js_1.Operator.SMALLER, val);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* @description Creates a greater than or equal to condition
|
|
279
|
+
* @summary Builds a condition that checks if the attribute is greater than or equal to the specified value
|
|
280
|
+
* @param {any} val - The value to compare the attribute against
|
|
281
|
+
* @return {Condition<M>} A new condition representing the greater than or equal comparison
|
|
282
|
+
*/
|
|
283
|
+
gte(val) {
|
|
284
|
+
return this.setOp(constants_js_1.Operator.BIGGER_EQ, val);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* @description Creates a less than or equal to condition
|
|
288
|
+
* @summary Builds a condition that checks if the attribute is less than or equal to the specified value
|
|
289
|
+
* @param {any} val - The value to compare the attribute against
|
|
290
|
+
* @return {Condition<M>} A new condition representing the less than or equal comparison
|
|
291
|
+
*/
|
|
292
|
+
lte(val) {
|
|
293
|
+
return this.setOp(constants_js_1.Operator.SMALLER_EQ, val);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* @description Creates an inclusion condition
|
|
297
|
+
* @summary Builds a condition that checks if the attribute value is included in the specified array
|
|
298
|
+
* @param {any[]} arr - The array of values to check against
|
|
299
|
+
* @return {Condition<M>} A new condition representing the inclusion comparison
|
|
300
|
+
*/
|
|
301
|
+
in(arr) {
|
|
302
|
+
return this.setOp(constants_js_1.Operator.IN, arr);
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* @description Creates a regular expression condition
|
|
306
|
+
* @summary Builds a condition that checks if the attribute matches the specified regular expression pattern
|
|
307
|
+
* @param {any} val - The regular expression pattern to match against
|
|
308
|
+
* @return {Condition<M>} A new condition representing the regular expression comparison
|
|
309
|
+
*/
|
|
310
|
+
regexp(val) {
|
|
311
|
+
return this.setOp(constants_js_1.Operator.REGEXP, new RegExp(val).source);
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* @description Creates a startsWith string condition
|
|
315
|
+
* @summary Builds a condition that checks if the attribute string starts with the specified prefix
|
|
316
|
+
* @param {string} prefix - The prefix to match at the start of the string
|
|
317
|
+
* @return {Condition<M>} A new condition representing the startsWith comparison
|
|
318
|
+
*/
|
|
319
|
+
startsWith(prefix) {
|
|
320
|
+
return this.setOp(constants_js_1.Operator.STARTS_WITH, prefix);
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* @description Creates an endsWith string condition
|
|
324
|
+
* @summary Builds a condition that checks if the attribute string ends with the specified suffix
|
|
325
|
+
* @param {string} suffix - The suffix to match at the end of the string
|
|
326
|
+
* @return {Condition<M>} A new condition representing the endsWith comparison
|
|
327
|
+
*/
|
|
328
|
+
endsWith(suffix) {
|
|
329
|
+
return this.setOp(constants_js_1.Operator.ENDS_WITH, suffix);
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* @description Creates a between condition
|
|
333
|
+
* @summary Builds a condition that checks if the attribute value is between min and max (inclusive)
|
|
334
|
+
* @param {any} min - The minimum value (inclusive)
|
|
335
|
+
* @param {any} max - The maximum value (inclusive)
|
|
336
|
+
* @return {Condition<M>} A new condition representing the between comparison
|
|
337
|
+
*/
|
|
338
|
+
between(min, max) {
|
|
339
|
+
return this.setOp(constants_js_1.Operator.BETWEEN, [min, max]);
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* @description Sets the operator and comparison value for the condition
|
|
343
|
+
* @summary Private method that configures the condition with the specified operator and value
|
|
344
|
+
* @param {Operator} op - The operator to use for the condition
|
|
345
|
+
* @param {any} val - The value to compare against
|
|
346
|
+
* @return {Condition<M>} A new condition with the specified operator and value
|
|
347
|
+
*/
|
|
348
|
+
setOp(op, val) {
|
|
349
|
+
this.operator = op;
|
|
350
|
+
this.comparison = val;
|
|
351
|
+
return this.build();
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* @description Constructs a Condition instance from the builder's state
|
|
355
|
+
* @summary Finalizes the condition building process by creating a new Condition instance
|
|
356
|
+
* @throws {QueryError} If the condition cannot be built due to invalid parameters
|
|
357
|
+
* @return {Condition<M>} A new condition instance with the configured attributes
|
|
358
|
+
*/
|
|
359
|
+
build() {
|
|
360
|
+
try {
|
|
361
|
+
return new Condition(this.attr1, this.operator, this.comparison);
|
|
362
|
+
}
|
|
363
|
+
catch (e) {
|
|
364
|
+
throw new errors_js_1.QueryError(e);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
}
|
|
362
369
|
/**
|
|
363
370
|
* @description Creates a new condition builder
|
|
364
371
|
* @summary Factory method that returns a new instance of the condition builder
|
|
@@ -385,4 +392,5 @@ __decorate([
|
|
|
385
392
|
(0, decorator_validation_1.required)(),
|
|
386
393
|
__metadata("design:type", Object)
|
|
387
394
|
], Condition.prototype, "comparison", void 0);
|
|
395
|
+
//# sourceMappingURL=Condition.js.map
|
|
388
396
|
//# sourceMappingURL=Condition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Condition.js","sourceRoot":"","sources":["Condition.js"],"names":[],"mappings":";;;AAAA,IAAI,UAAU,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,UAAU,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI;IACjF,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC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AM,CAAC;CACpC,EAAE,SAAS,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5C,UAAU,CAAC;IACP,IAAA,+BAAQ,GAAE;IACV,UAAU,CAAC,aAAa,EAAE,MAAM,CAAC;CACpC,EAAE,SAAS,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;AAC9C,qCAAqC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MethodQueryBuilder = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const types_js_1 = require("./types.cjs");
|
|
5
|
+
const utils_js_1 = require("./utils.cjs");
|
|
6
6
|
const db_decorators_1 = require("@decaf-ts/db-decorators");
|
|
7
7
|
const logging_1 = require("@decaf-ts/logging");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const constants_js_1 = require("./../repository/constants.cjs");
|
|
9
|
+
const errors_js_1 = require("./errors.cjs");
|
|
10
10
|
const lowerFirst = (str) => str.charAt(0).toLowerCase() + str.slice(1);
|
|
11
11
|
/**
|
|
12
12
|
* @description
|
|
@@ -71,17 +71,19 @@ class MethodQueryBuilder extends logging_1.LoggedClass {
|
|
|
71
71
|
* @description
|
|
72
72
|
* Map of query prefixes to their corresponding actions.
|
|
73
73
|
*/
|
|
74
|
-
static {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
74
|
+
static {
|
|
75
|
+
this.prefixMap = {
|
|
76
|
+
[types_js_1.QueryClause.FIND_BY]: "find",
|
|
77
|
+
[types_js_1.QueryClause.PAGE_BY]: "page",
|
|
78
|
+
[types_js_1.QueryClause.COUNT_BY]: "count",
|
|
79
|
+
[types_js_1.QueryClause.SUM_BY]: "sum",
|
|
80
|
+
[types_js_1.QueryClause.AVG_BY]: "avg",
|
|
81
|
+
[types_js_1.QueryClause.MIN_BY]: "min",
|
|
82
|
+
[types_js_1.QueryClause.MAX_BY]: "max",
|
|
83
|
+
[types_js_1.QueryClause.DISTINCT_BY]: "distinct",
|
|
84
|
+
[types_js_1.QueryClause.GROUP_BY_PREFIX]: "group",
|
|
85
|
+
};
|
|
86
|
+
}
|
|
85
87
|
/**
|
|
86
88
|
* @description
|
|
87
89
|
* Determines the action and prefix length from a method name.
|
|
@@ -170,10 +172,10 @@ class MethodQueryBuilder extends logging_1.LoggedClass {
|
|
|
170
172
|
*
|
|
171
173
|
* @return {string} The extracted core string used for building conditions.
|
|
172
174
|
*/
|
|
173
|
-
static extractCore(methodName, prefix =
|
|
175
|
+
static extractCore(methodName, prefix = types_js_1.QueryClause.FIND_BY) {
|
|
174
176
|
const afterPrefix = methodName.substring(prefix.length);
|
|
175
177
|
// For aggregation methods (not findBy or pageBy), we need to skip the selector field
|
|
176
|
-
const isAggregationPrefix = prefix !==
|
|
178
|
+
const isAggregationPrefix = prefix !== types_js_1.QueryClause.FIND_BY && prefix !== types_js_1.QueryClause.PAGE_BY;
|
|
177
179
|
if (isAggregationPrefix) {
|
|
178
180
|
// For aggregation methods, we need to find where actual conditions start
|
|
179
181
|
// Conditions are indicated by And|Or AFTER the selector field
|
|
@@ -209,7 +211,7 @@ class MethodQueryBuilder extends logging_1.LoggedClass {
|
|
|
209
211
|
}
|
|
210
212
|
static getFieldsFromMethodName(methodName) {
|
|
211
213
|
const actionInfo = this.getActionFromMethodName(methodName);
|
|
212
|
-
const prefix = actionInfo?.prefix ||
|
|
214
|
+
const prefix = actionInfo?.prefix || types_js_1.QueryClause.FIND_BY;
|
|
213
215
|
const core = this.extractCore(methodName, prefix);
|
|
214
216
|
if (!core)
|
|
215
217
|
return [];
|
|
@@ -235,16 +237,16 @@ class MethodQueryBuilder extends logging_1.LoggedClass {
|
|
|
235
237
|
* @return {string[] | undefined} An array of selected fields or `undefined` if no select clause exists.
|
|
236
238
|
*/
|
|
237
239
|
static extractSelect(methodName) {
|
|
238
|
-
const selectIndex = methodName.indexOf(
|
|
240
|
+
const selectIndex = methodName.indexOf(types_js_1.QueryClause.SELECT);
|
|
239
241
|
if (selectIndex === -1)
|
|
240
242
|
return undefined;
|
|
241
|
-
const afterSelect = methodName.substring(selectIndex +
|
|
243
|
+
const afterSelect = methodName.substring(selectIndex + types_js_1.QueryClause.SELECT.length);
|
|
242
244
|
// Search for next Then, GroupBy, OrderBy...
|
|
243
245
|
const match = afterSelect.match(/(Then[A-Z]|OrderBy|GroupBy|Limit|Offset)/);
|
|
244
246
|
const selectPart = match
|
|
245
247
|
? afterSelect.substring(0, match.index)
|
|
246
248
|
: afterSelect;
|
|
247
|
-
return selectPart.split(
|
|
249
|
+
return selectPart.split(types_js_1.QueryClause.AND).map(lowerFirst).filter(Boolean);
|
|
248
250
|
}
|
|
249
251
|
/**
|
|
250
252
|
* @description
|
|
@@ -260,12 +262,12 @@ class MethodQueryBuilder extends logging_1.LoggedClass {
|
|
|
260
262
|
*/
|
|
261
263
|
static extractGroupBy(methodName) {
|
|
262
264
|
// First check for the standard "GroupBy" clause (e.g., findByActiveGroupByCountry)
|
|
263
|
-
const groupByIndex = methodName.indexOf(
|
|
265
|
+
const groupByIndex = methodName.indexOf(types_js_1.QueryClause.GROUP_BY);
|
|
264
266
|
if (groupByIndex !== -1) {
|
|
265
|
-
const after = methodName.substring(groupByIndex +
|
|
266
|
-
const groupByPart = after.split(
|
|
267
|
+
const after = methodName.substring(groupByIndex + types_js_1.QueryClause.GROUP_BY.length);
|
|
268
|
+
const groupByPart = after.split(types_js_1.QueryClause.ORDER_BY)[0];
|
|
267
269
|
return groupByPart
|
|
268
|
-
.split(
|
|
270
|
+
.split(types_js_1.QueryClause.THEN_BY)
|
|
269
271
|
.map(lowerFirst)
|
|
270
272
|
.filter(Boolean);
|
|
271
273
|
}
|
|
@@ -274,12 +276,12 @@ class MethodQueryBuilder extends logging_1.LoggedClass {
|
|
|
274
276
|
const actionInfo = this.getActionFromMethodName(methodName);
|
|
275
277
|
if (actionInfo?.action === "group") {
|
|
276
278
|
const afterPrefix = methodName.substring(actionInfo.prefix.length);
|
|
277
|
-
const thenByIndex = afterPrefix.indexOf(
|
|
279
|
+
const thenByIndex = afterPrefix.indexOf(types_js_1.QueryClause.THEN_BY);
|
|
278
280
|
if (thenByIndex === -1)
|
|
279
281
|
return undefined;
|
|
280
|
-
const afterThenBy = afterPrefix.substring(thenByIndex +
|
|
282
|
+
const afterThenBy = afterPrefix.substring(thenByIndex + types_js_1.QueryClause.THEN_BY.length);
|
|
281
283
|
// Split by ThenBy to get multiple group fields
|
|
282
|
-
const parts = afterThenBy.split(
|
|
284
|
+
const parts = afterThenBy.split(types_js_1.QueryClause.THEN_BY);
|
|
283
285
|
// Also stop at OrderBy, Limit, Offset
|
|
284
286
|
const result = [];
|
|
285
287
|
for (const part of parts) {
|
|
@@ -342,7 +344,7 @@ class MethodQueryBuilder extends logging_1.LoggedClass {
|
|
|
342
344
|
let where;
|
|
343
345
|
conditions.forEach((token, idx) => {
|
|
344
346
|
const { field, operator } = this.parseFieldAndOperator(token);
|
|
345
|
-
const parser = operator ?
|
|
347
|
+
const parser = operator ? utils_js_1.OperatorsMap[operator] : utils_js_1.OperatorsMap.Equals;
|
|
346
348
|
if (!parser)
|
|
347
349
|
throw new Error(`Unsupported operator ${operator}`);
|
|
348
350
|
const conditionValue = values[idx];
|
|
@@ -353,7 +355,7 @@ class MethodQueryBuilder extends logging_1.LoggedClass {
|
|
|
353
355
|
where =
|
|
354
356
|
idx === 0
|
|
355
357
|
? condition
|
|
356
|
-
: operators[idx - 1] ===
|
|
358
|
+
: operators[idx - 1] === types_js_1.QueryClause.AND
|
|
357
359
|
? where.and(condition)
|
|
358
360
|
: where.or(condition);
|
|
359
361
|
});
|
|
@@ -372,7 +374,7 @@ class MethodQueryBuilder extends logging_1.LoggedClass {
|
|
|
372
374
|
* @return {FilterDescriptor} An object containing the field name and operator.
|
|
373
375
|
*/
|
|
374
376
|
static parseFieldAndOperator(str) {
|
|
375
|
-
for (const operator of Object.keys(
|
|
377
|
+
for (const operator of Object.keys(utils_js_1.OperatorsMap)) {
|
|
376
378
|
if (str.endsWith(operator)) {
|
|
377
379
|
const field = str.slice(0, -operator.length);
|
|
378
380
|
return { field: lowerFirst(field), operator };
|
|
@@ -394,16 +396,16 @@ class MethodQueryBuilder extends logging_1.LoggedClass {
|
|
|
394
396
|
if (!direction && !field)
|
|
395
397
|
return;
|
|
396
398
|
if (direction && !field)
|
|
397
|
-
throw new
|
|
399
|
+
throw new errors_js_1.QueryError(`Expected OrderBy clause, but no sortable field was found in method name.`);
|
|
398
400
|
// Field present, but direction is undefined → ignore OrderBy
|
|
399
401
|
if (!direction && field) {
|
|
400
402
|
log.debug("Ignoring OrderBy clause because direction is undefined.");
|
|
401
403
|
return;
|
|
402
404
|
}
|
|
403
405
|
// Both present → validate direction
|
|
404
|
-
const allowedDirections = Object.values(
|
|
406
|
+
const allowedDirections = Object.values(constants_js_1.OrderDirection);
|
|
405
407
|
if (!allowedDirections.includes(direction)) {
|
|
406
|
-
throw new
|
|
408
|
+
throw new errors_js_1.QueryError(`Invalid OrderBy direction ${direction}. Expected one of: ${Object.values(constants_js_1.OrderDirection).join(", ")}.`);
|
|
407
409
|
}
|
|
408
410
|
return [[field, direction]];
|
|
409
411
|
}
|
|
@@ -445,4 +447,5 @@ class MethodQueryBuilder extends logging_1.LoggedClass {
|
|
|
445
447
|
}
|
|
446
448
|
}
|
|
447
449
|
exports.MethodQueryBuilder = MethodQueryBuilder;
|
|
450
|
+
//# sourceMappingURL=MethodQueryBuilder.js.map
|
|
448
451
|
//# sourceMappingURL=MethodQueryBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MethodQueryBuilder.js","sourceRoot":"","sources":["MethodQueryBuilder.js"],"names":[],"mappings":";;;AAAA,yCAA0C;AAC1C,yCAA0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