@warlock.js/cascade 4.0.162 → 4.0.164
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/cjs/context/database-data-source-context.d.ts +29 -0
- package/cjs/context/database-data-source-context.d.ts.map +1 -0
- package/cjs/context/database-data-source-context.js +28 -0
- package/cjs/context/database-data-source-context.js.map +1 -0
- package/cjs/context/database-transaction-context.d.ts +35 -0
- package/cjs/context/database-transaction-context.d.ts.map +1 -0
- package/cjs/context/database-transaction-context.js +40 -0
- package/cjs/context/database-transaction-context.js.map +1 -0
- package/cjs/contracts/database-driver.contract.d.ts +450 -0
- package/cjs/contracts/database-driver.contract.d.ts.map +1 -0
- package/cjs/contracts/database-id-generator.contract.d.ts +109 -0
- package/cjs/contracts/database-id-generator.contract.d.ts.map +1 -0
- package/cjs/contracts/database-remover.contract.d.ts +104 -0
- package/cjs/contracts/database-remover.contract.d.ts.map +1 -0
- package/cjs/contracts/database-restorer.contract.d.ts +143 -0
- package/cjs/contracts/database-restorer.contract.d.ts.map +1 -0
- package/cjs/contracts/database-writer.contract.d.ts +119 -0
- package/cjs/contracts/database-writer.contract.d.ts.map +1 -0
- package/cjs/contracts/driver-blueprint.contract.d.ts +49 -0
- package/cjs/contracts/driver-blueprint.contract.d.ts.map +1 -0
- package/cjs/contracts/index.d.ts +10 -0
- package/cjs/contracts/index.d.ts.map +1 -0
- package/cjs/contracts/migration-driver.contract.d.ts +522 -0
- package/cjs/contracts/migration-driver.contract.d.ts.map +1 -0
- package/cjs/contracts/query-builder.contract.d.ts +1609 -0
- package/cjs/contracts/query-builder.contract.d.ts.map +1 -0
- package/cjs/contracts/sync-adapter.contract.d.ts +58 -0
- package/cjs/contracts/sync-adapter.contract.d.ts.map +1 -0
- package/cjs/data-source/data-source-registry.d.ts +108 -0
- package/cjs/data-source/data-source-registry.d.ts.map +1 -0
- package/cjs/data-source/data-source-registry.js +145 -0
- package/cjs/data-source/data-source-registry.js.map +1 -0
- package/cjs/data-source/data-source.d.ts +147 -0
- package/cjs/data-source/data-source.d.ts.map +1 -0
- package/cjs/data-source/data-source.js +83 -0
- package/cjs/data-source/data-source.js.map +1 -0
- package/cjs/database-dirty-tracker.d.ts +252 -0
- package/cjs/database-dirty-tracker.d.ts.map +1 -0
- package/cjs/database-dirty-tracker.js +386 -0
- package/cjs/database-dirty-tracker.js.map +1 -0
- package/cjs/drivers/mongodb/mongodb-blueprint.d.ts +30 -0
- package/cjs/drivers/mongodb/mongodb-blueprint.d.ts.map +1 -0
- package/cjs/drivers/mongodb/mongodb-blueprint.js +51 -0
- package/cjs/drivers/mongodb/mongodb-blueprint.js.map +1 -0
- package/cjs/drivers/mongodb/mongodb-driver.d.ts +325 -0
- package/cjs/drivers/mongodb/mongodb-driver.d.ts.map +1 -0
- package/cjs/drivers/mongodb/mongodb-driver.js +838 -0
- package/cjs/drivers/mongodb/mongodb-driver.js.map +1 -0
- package/cjs/drivers/mongodb/mongodb-id-generator.d.ts +116 -0
- package/cjs/drivers/mongodb/mongodb-id-generator.d.ts.map +1 -0
- package/cjs/drivers/mongodb/mongodb-id-generator.js +149 -0
- package/cjs/drivers/mongodb/mongodb-id-generator.js.map +1 -0
- package/cjs/drivers/mongodb/mongodb-migration-driver.d.ts +317 -0
- package/cjs/drivers/mongodb/mongodb-migration-driver.d.ts.map +1 -0
- package/cjs/drivers/mongodb/mongodb-migration-driver.js +666 -0
- package/cjs/drivers/mongodb/mongodb-migration-driver.js.map +1 -0
- package/cjs/drivers/mongodb/mongodb-query-builder.d.ts +1122 -0
- package/cjs/drivers/mongodb/mongodb-query-builder.d.ts.map +1 -0
- package/cjs/drivers/mongodb/mongodb-query-builder.js +1988 -0
- package/cjs/drivers/mongodb/mongodb-query-builder.js.map +1 -0
- package/cjs/drivers/mongodb/mongodb-query-operations.d.ts +226 -0
- package/cjs/drivers/mongodb/mongodb-query-operations.d.ts.map +1 -0
- package/cjs/drivers/mongodb/mongodb-query-operations.js +270 -0
- package/cjs/drivers/mongodb/mongodb-query-operations.js.map +1 -0
- package/cjs/drivers/mongodb/mongodb-query-parser.d.ts +262 -0
- package/cjs/drivers/mongodb/mongodb-query-parser.d.ts.map +1 -0
- package/cjs/drivers/mongodb/mongodb-query-parser.js +1351 -0
- package/cjs/drivers/mongodb/mongodb-query-parser.js.map +1 -0
- package/cjs/drivers/mongodb/mongodb-sync-adapter.d.ts +79 -0
- package/cjs/drivers/mongodb/mongodb-sync-adapter.d.ts.map +1 -0
- package/cjs/drivers/mongodb/mongodb-sync-adapter.js +146 -0
- package/cjs/drivers/mongodb/mongodb-sync-adapter.js.map +1 -0
- package/cjs/drivers/mongodb/types.d.ts +43 -0
- package/cjs/drivers/mongodb/types.d.ts.map +1 -0
- package/cjs/drivers/postgres/index.d.ts +16 -0
- package/cjs/drivers/postgres/index.d.ts.map +1 -0
- package/cjs/drivers/postgres/postgres-blueprint.d.ts +64 -0
- package/cjs/drivers/postgres/postgres-blueprint.d.ts.map +1 -0
- package/cjs/drivers/postgres/postgres-blueprint.js +121 -0
- package/cjs/drivers/postgres/postgres-blueprint.js.map +1 -0
- package/cjs/drivers/postgres/postgres-dialect.d.ts +136 -0
- package/cjs/drivers/postgres/postgres-dialect.d.ts.map +1 -0
- package/cjs/drivers/postgres/postgres-dialect.js +268 -0
- package/cjs/drivers/postgres/postgres-dialect.js.map +1 -0
- package/cjs/drivers/postgres/postgres-driver.d.ts +432 -0
- package/cjs/drivers/postgres/postgres-driver.d.ts.map +1 -0
- package/cjs/drivers/postgres/postgres-driver.js +1010 -0
- package/cjs/drivers/postgres/postgres-driver.js.map +1 -0
- package/cjs/drivers/postgres/postgres-migration-driver.d.ts +397 -0
- package/cjs/drivers/postgres/postgres-migration-driver.d.ts.map +1 -0
- package/cjs/drivers/postgres/postgres-migration-driver.js +900 -0
- package/cjs/drivers/postgres/postgres-migration-driver.js.map +1 -0
- package/cjs/drivers/postgres/postgres-query-builder.d.ts +254 -0
- package/cjs/drivers/postgres/postgres-query-builder.d.ts.map +1 -0
- package/cjs/drivers/postgres/postgres-query-builder.js +933 -0
- package/cjs/drivers/postgres/postgres-query-builder.js.map +1 -0
- package/cjs/drivers/postgres/postgres-query-parser.d.ts +328 -0
- package/cjs/drivers/postgres/postgres-query-parser.d.ts.map +1 -0
- package/cjs/drivers/postgres/postgres-query-parser.js +868 -0
- package/cjs/drivers/postgres/postgres-query-parser.js.map +1 -0
- package/cjs/drivers/postgres/postgres-sql-serializer.d.ts +37 -0
- package/cjs/drivers/postgres/postgres-sql-serializer.d.ts.map +1 -0
- package/cjs/drivers/postgres/postgres-sql-serializer.js +400 -0
- package/cjs/drivers/postgres/postgres-sql-serializer.js.map +1 -0
- package/cjs/drivers/postgres/postgres-sync-adapter.d.ts +83 -0
- package/cjs/drivers/postgres/postgres-sync-adapter.d.ts.map +1 -0
- package/cjs/drivers/postgres/postgres-sync-adapter.js +197 -0
- package/cjs/drivers/postgres/postgres-sync-adapter.js.map +1 -0
- package/cjs/drivers/postgres/types.d.ts +144 -0
- package/cjs/drivers/postgres/types.d.ts.map +1 -0
- package/cjs/drivers/sql/index.d.ts +10 -0
- package/cjs/drivers/sql/index.d.ts.map +1 -0
- package/cjs/drivers/sql/sql-dialect.contract.d.ts +204 -0
- package/cjs/drivers/sql/sql-dialect.contract.d.ts.map +1 -0
- package/cjs/drivers/sql/sql-types.d.ts +202 -0
- package/cjs/drivers/sql/sql-types.d.ts.map +1 -0
- package/cjs/errors/missing-data-source.error.d.ts +22 -0
- package/cjs/errors/missing-data-source.error.d.ts.map +1 -0
- package/cjs/errors/missing-data-source.error.js +29 -0
- package/cjs/errors/missing-data-source.error.js.map +1 -0
- package/cjs/errors/transaction-rollback.error.d.ts +20 -0
- package/cjs/errors/transaction-rollback.error.d.ts.map +1 -0
- package/cjs/errors/transaction-rollback.error.js +27 -0
- package/cjs/errors/transaction-rollback.error.js.map +1 -0
- package/cjs/events/model-events.d.ts +231 -0
- package/cjs/events/model-events.d.ts.map +1 -0
- package/cjs/events/model-events.js +259 -0
- package/cjs/events/model-events.js.map +1 -0
- package/cjs/expressions/aggregate-expressions.d.ts +215 -0
- package/cjs/expressions/aggregate-expressions.d.ts.map +1 -0
- package/cjs/expressions/aggregate-expressions.js +221 -0
- package/cjs/expressions/aggregate-expressions.js.map +1 -0
- package/cjs/expressions/index.d.ts +2 -0
- package/cjs/expressions/index.d.ts.map +1 -0
- package/cjs/index.d.ts +45 -0
- package/cjs/index.d.ts.map +1 -0
- package/cjs/index.js +1 -0
- package/cjs/index.js.map +1 -0
- package/cjs/migration/column-builder.d.ts +417 -0
- package/cjs/migration/column-builder.d.ts.map +1 -0
- package/cjs/migration/column-builder.js +586 -0
- package/cjs/migration/column-builder.js.map +1 -0
- package/cjs/migration/column-helpers.d.ts +275 -0
- package/cjs/migration/column-helpers.d.ts.map +1 -0
- package/cjs/migration/column-helpers.js +389 -0
- package/cjs/migration/column-helpers.js.map +1 -0
- package/cjs/migration/foreign-key-builder.d.ts +103 -0
- package/cjs/migration/foreign-key-builder.d.ts.map +1 -0
- package/cjs/migration/foreign-key-builder.js +121 -0
- package/cjs/migration/foreign-key-builder.js.map +1 -0
- package/cjs/migration/index.d.ts +7 -0
- package/cjs/migration/index.d.ts.map +1 -0
- package/cjs/migration/migration-runner.d.ts +278 -0
- package/cjs/migration/migration-runner.d.ts.map +1 -0
- package/cjs/migration/migration-runner.js +815 -0
- package/cjs/migration/migration-runner.js.map +1 -0
- package/cjs/migration/migration.d.ts +1992 -0
- package/cjs/migration/migration.d.ts.map +1 -0
- package/cjs/migration/migration.js +2162 -0
- package/cjs/migration/migration.js.map +1 -0
- package/cjs/migration/sql-grammar.d.ts +61 -0
- package/cjs/migration/sql-grammar.d.ts.map +1 -0
- package/cjs/migration/sql-grammar.js +164 -0
- package/cjs/migration/sql-grammar.js.map +1 -0
- package/cjs/migration/sql-serializer.d.ts +22 -0
- package/cjs/migration/sql-serializer.d.ts.map +1 -0
- package/cjs/migration/sql-serializer.js +26 -0
- package/cjs/migration/sql-serializer.js.map +1 -0
- package/cjs/migration/types.d.ts +155 -0
- package/cjs/migration/types.d.ts.map +1 -0
- package/cjs/model/methods/accessor-methods.d.ts +13 -0
- package/cjs/model/methods/accessor-methods.d.ts.map +1 -0
- package/cjs/model/methods/accessor-methods.js +51 -0
- package/cjs/model/methods/accessor-methods.js.map +1 -0
- package/cjs/model/methods/delete-methods.d.ts +10 -0
- package/cjs/model/methods/delete-methods.d.ts.map +1 -0
- package/cjs/model/methods/delete-methods.js +10 -0
- package/cjs/model/methods/delete-methods.js.map +1 -0
- package/cjs/model/methods/dirty-methods.d.ts +10 -0
- package/cjs/model/methods/dirty-methods.d.ts.map +1 -0
- package/cjs/model/methods/dirty-methods.js +15 -0
- package/cjs/model/methods/dirty-methods.js.map +1 -0
- package/cjs/model/methods/hydration-methods.d.ts +10 -0
- package/cjs/model/methods/hydration-methods.d.ts.map +1 -0
- package/cjs/model/methods/hydration-methods.js +57 -0
- package/cjs/model/methods/hydration-methods.js.map +1 -0
- package/cjs/model/methods/instance-event-methods.d.ts +7 -0
- package/cjs/model/methods/instance-event-methods.d.ts.map +1 -0
- package/cjs/model/methods/instance-event-methods.js +15 -0
- package/cjs/model/methods/instance-event-methods.js.map +1 -0
- package/cjs/model/methods/meta-methods.d.ts +7 -0
- package/cjs/model/methods/meta-methods.d.ts.map +1 -0
- package/cjs/model/methods/meta-methods.js +78 -0
- package/cjs/model/methods/meta-methods.js.map +1 -0
- package/cjs/model/methods/query-methods.d.ts +24 -0
- package/cjs/model/methods/query-methods.d.ts.map +1 -0
- package/cjs/model/methods/query-methods.js +164 -0
- package/cjs/model/methods/query-methods.js.map +1 -0
- package/cjs/model/methods/restore-methods.d.ts +10 -0
- package/cjs/model/methods/restore-methods.d.ts.map +1 -0
- package/cjs/model/methods/restore-methods.js +13 -0
- package/cjs/model/methods/restore-methods.js.map +1 -0
- package/cjs/model/methods/scope-methods.d.ts +7 -0
- package/cjs/model/methods/scope-methods.d.ts.map +1 -0
- package/cjs/model/methods/scope-methods.js +15 -0
- package/cjs/model/methods/scope-methods.js.map +1 -0
- package/cjs/model/methods/serialization-methods.d.ts +3 -0
- package/cjs/model/methods/serialization-methods.d.ts.map +1 -0
- package/cjs/model/methods/serialization-methods.js +27 -0
- package/cjs/model/methods/serialization-methods.js.map +1 -0
- package/cjs/model/methods/static-event-methods.d.ts +9 -0
- package/cjs/model/methods/static-event-methods.d.ts.map +1 -0
- package/cjs/model/methods/static-event-methods.js +29 -0
- package/cjs/model/methods/static-event-methods.js.map +1 -0
- package/cjs/model/methods/write-methods.d.ts +10 -0
- package/cjs/model/methods/write-methods.d.ts.map +1 -0
- package/cjs/model/methods/write-methods.js +52 -0
- package/cjs/model/methods/write-methods.js.map +1 -0
- package/cjs/model/model.d.ts +1647 -0
- package/cjs/model/model.d.ts.map +1 -0
- package/cjs/model/model.js +1657 -0
- package/cjs/model/model.js.map +1 -0
- package/cjs/model/model.types.d.ts +44 -0
- package/cjs/model/model.types.d.ts.map +1 -0
- package/cjs/model/register-model.d.ts +81 -0
- package/cjs/model/register-model.d.ts.map +1 -0
- package/cjs/model/register-model.js +94 -0
- package/cjs/model/register-model.js.map +1 -0
- package/cjs/query-builder/query-builder.d.ts +556 -0
- package/cjs/query-builder/query-builder.d.ts.map +1 -0
- package/cjs/query-builder/query-builder.js +1070 -0
- package/cjs/query-builder/query-builder.js.map +1 -0
- package/cjs/relations/helpers.d.ts +156 -0
- package/cjs/relations/helpers.d.ts.map +1 -0
- package/cjs/relations/helpers.js +202 -0
- package/cjs/relations/helpers.js.map +1 -0
- package/cjs/relations/index.d.ts +35 -0
- package/cjs/relations/index.d.ts.map +1 -0
- package/cjs/relations/pivot-operations.d.ts +160 -0
- package/cjs/relations/pivot-operations.d.ts.map +1 -0
- package/cjs/relations/pivot-operations.js +293 -0
- package/cjs/relations/pivot-operations.js.map +1 -0
- package/cjs/relations/relation-hydrator.d.ts +68 -0
- package/cjs/relations/relation-hydrator.d.ts.map +1 -0
- package/cjs/relations/relation-hydrator.js +81 -0
- package/cjs/relations/relation-hydrator.js.map +1 -0
- package/cjs/relations/relation-loader.d.ts +194 -0
- package/cjs/relations/relation-loader.d.ts.map +1 -0
- package/cjs/relations/relation-loader.js +466 -0
- package/cjs/relations/relation-loader.js.map +1 -0
- package/cjs/relations/types.d.ts +306 -0
- package/cjs/relations/types.d.ts.map +1 -0
- package/cjs/remover/database-remover.d.ts +100 -0
- package/cjs/remover/database-remover.d.ts.map +1 -0
- package/cjs/remover/database-remover.js +214 -0
- package/cjs/remover/database-remover.js.map +1 -0
- package/cjs/restorer/database-restorer.d.ts +131 -0
- package/cjs/restorer/database-restorer.d.ts.map +1 -0
- package/cjs/restorer/database-restorer.js +434 -0
- package/cjs/restorer/database-restorer.js.map +1 -0
- package/cjs/sql-database-dirty-tracker.d.ts +13 -0
- package/cjs/sql-database-dirty-tracker.d.ts.map +1 -0
- package/cjs/sql-database-dirty-tracker.js +14 -0
- package/cjs/sql-database-dirty-tracker.js.map +1 -0
- package/cjs/sync/index.d.ts +12 -0
- package/cjs/sync/index.d.ts.map +1 -0
- package/cjs/sync/model-events.d.ts +62 -0
- package/cjs/sync/model-events.d.ts.map +1 -0
- package/cjs/sync/model-events.js +49 -0
- package/cjs/sync/model-events.js.map +1 -0
- package/cjs/sync/model-sync-operation.d.ts +163 -0
- package/cjs/sync/model-sync-operation.d.ts.map +1 -0
- package/cjs/sync/model-sync-operation.js +292 -0
- package/cjs/sync/model-sync-operation.js.map +1 -0
- package/cjs/sync/model-sync.d.ts +130 -0
- package/cjs/sync/model-sync.d.ts.map +1 -0
- package/cjs/sync/model-sync.js +178 -0
- package/cjs/sync/model-sync.js.map +1 -0
- package/cjs/sync/sync-context.d.ts +70 -0
- package/cjs/sync/sync-context.d.ts.map +1 -0
- package/cjs/sync/sync-context.js +101 -0
- package/cjs/sync/sync-context.js.map +1 -0
- package/cjs/sync/sync-manager.d.ts +213 -0
- package/cjs/sync/sync-manager.d.ts.map +1 -0
- package/cjs/sync/sync-manager.js +689 -0
- package/cjs/sync/sync-manager.js.map +1 -0
- package/cjs/sync/types.d.ts +289 -0
- package/cjs/sync/types.d.ts.map +1 -0
- package/cjs/test-migrations/test-enhanced-features.migration.d.ts +15 -0
- package/cjs/test-migrations/test-enhanced-features.migration.d.ts.map +1 -0
- package/cjs/types.d.ts +371 -0
- package/cjs/types.d.ts.map +1 -0
- package/cjs/utils/connect-to-database.d.ts +307 -0
- package/cjs/utils/connect-to-database.d.ts.map +1 -0
- package/cjs/utils/connect-to-database.js +130 -0
- package/cjs/utils/connect-to-database.js.map +1 -0
- package/cjs/utils/database-writer.utils.d.ts +15 -0
- package/cjs/utils/database-writer.utils.d.ts.map +1 -0
- package/cjs/utils/database-writer.utils.js +14 -0
- package/cjs/utils/database-writer.utils.js.map +1 -0
- package/cjs/utils/define-model.js +100 -0
- package/cjs/utils/define-model.js.map +1 -0
- package/cjs/utils/is-valid-date-value.d.ts +5 -0
- package/cjs/utils/is-valid-date-value.d.ts.map +1 -0
- package/cjs/utils/is-valid-date-value.js +25 -0
- package/cjs/utils/is-valid-date-value.js.map +1 -0
- package/cjs/utils/once-connected.d.ts +146 -0
- package/cjs/utils/once-connected.d.ts.map +1 -0
- package/cjs/utils/once-connected.js +251 -0
- package/cjs/utils/once-connected.js.map +1 -0
- package/cjs/validation/database-seal-plugins.d.ts +12 -0
- package/cjs/validation/database-seal-plugins.d.ts.map +1 -0
- package/cjs/validation/database-seal-plugins.js +1 -0
- package/cjs/validation/database-seal-plugins.js.map +1 -0
- package/cjs/validation/database-writer-validation-error.d.ts +97 -0
- package/cjs/validation/database-writer-validation-error.d.ts.map +1 -0
- package/cjs/validation/database-writer-validation-error.js +160 -0
- package/cjs/validation/database-writer-validation-error.js.map +1 -0
- package/cjs/validation/index.d.ts +3 -0
- package/cjs/validation/index.d.ts.map +1 -0
- package/cjs/validation/mutators/embed-mutator.d.ts +9 -0
- package/cjs/validation/mutators/embed-mutator.d.ts.map +1 -0
- package/cjs/validation/mutators/embed-mutator.js +33 -0
- package/cjs/validation/mutators/embed-mutator.js.map +1 -0
- package/cjs/validation/plugins/embed-validator-plugin.d.ts +24 -0
- package/cjs/validation/plugins/embed-validator-plugin.d.ts.map +1 -0
- package/cjs/validation/plugins/embed-validator-plugin.js +18 -0
- package/cjs/validation/plugins/embed-validator-plugin.js.map +1 -0
- package/cjs/validation/rules/database-model-rule.d.ts +7 -0
- package/cjs/validation/rules/database-model-rule.d.ts.map +1 -0
- package/cjs/validation/rules/database-model-rule.js +27 -0
- package/cjs/validation/rules/database-model-rule.js.map +1 -0
- package/cjs/validation/transformers/embed-model-transformer.d.ts +3 -0
- package/cjs/validation/transformers/embed-model-transformer.d.ts.map +1 -0
- package/cjs/validation/transformers/embed-model-transformer.js +18 -0
- package/cjs/validation/transformers/embed-model-transformer.js.map +1 -0
- package/cjs/validation/validators/embed-validator.d.ts +21 -0
- package/cjs/validation/validators/embed-validator.d.ts.map +1 -0
- package/cjs/validation/validators/embed-validator.js +43 -0
- package/cjs/validation/validators/embed-validator.js.map +1 -0
- package/cjs/writer/database-writer.d.ts +181 -0
- package/cjs/writer/database-writer.d.ts.map +1 -0
- package/cjs/writer/database-writer.js +407 -0
- package/cjs/writer/database-writer.js.map +1 -0
- package/esm/data-source/data-source-registry.d.ts +108 -0
- package/esm/data-source/data-source-registry.d.ts.map +1 -0
- package/esm/data-source/data-source-registry.js +145 -0
- package/esm/data-source/data-source-registry.js.map +1 -0
- package/esm/data-source/data-source.d.ts +147 -0
- package/esm/data-source/data-source.d.ts.map +1 -0
- package/esm/data-source/data-source.js +83 -0
- package/esm/data-source/data-source.js.map +1 -0
- package/esm/database-dirty-tracker.d.ts +252 -0
- package/esm/database-dirty-tracker.d.ts.map +1 -0
- package/esm/database-dirty-tracker.js +386 -0
- package/esm/database-dirty-tracker.js.map +1 -0
- package/esm/drivers/mongodb/mongodb-blueprint.d.ts +30 -0
- package/esm/drivers/mongodb/mongodb-blueprint.d.ts.map +1 -0
- package/esm/drivers/mongodb/mongodb-blueprint.js +51 -0
- package/esm/drivers/mongodb/mongodb-blueprint.js.map +1 -0
- package/esm/drivers/mongodb/mongodb-driver.d.ts +325 -0
- package/esm/drivers/mongodb/mongodb-driver.d.ts.map +1 -0
- package/esm/drivers/mongodb/mongodb-driver.js +838 -0
- package/esm/drivers/mongodb/mongodb-driver.js.map +1 -0
- package/esm/drivers/mongodb/mongodb-id-generator.d.ts +116 -0
- package/esm/drivers/mongodb/mongodb-id-generator.d.ts.map +1 -0
- package/esm/drivers/mongodb/mongodb-id-generator.js +149 -0
- package/esm/drivers/mongodb/mongodb-id-generator.js.map +1 -0
- package/esm/drivers/mongodb/mongodb-migration-driver.d.ts +317 -0
- package/esm/drivers/mongodb/mongodb-migration-driver.d.ts.map +1 -0
- package/esm/drivers/mongodb/mongodb-migration-driver.js +666 -0
- package/esm/drivers/mongodb/mongodb-migration-driver.js.map +1 -0
- package/esm/drivers/mongodb/mongodb-query-builder.d.ts +1122 -0
- package/esm/drivers/mongodb/mongodb-query-builder.d.ts.map +1 -0
- package/esm/drivers/mongodb/mongodb-query-builder.js +1988 -0
- package/esm/drivers/mongodb/mongodb-query-builder.js.map +1 -0
- package/esm/drivers/mongodb/mongodb-query-operations.d.ts +226 -0
- package/esm/drivers/mongodb/mongodb-query-operations.d.ts.map +1 -0
- package/esm/drivers/mongodb/mongodb-query-operations.js +270 -0
- package/esm/drivers/mongodb/mongodb-query-operations.js.map +1 -0
- package/esm/drivers/mongodb/mongodb-query-parser.d.ts +262 -0
- package/esm/drivers/mongodb/mongodb-query-parser.d.ts.map +1 -0
- package/esm/drivers/mongodb/mongodb-query-parser.js +1351 -0
- package/esm/drivers/mongodb/mongodb-query-parser.js.map +1 -0
- package/esm/drivers/mongodb/mongodb-sync-adapter.d.ts +79 -0
- package/esm/drivers/mongodb/mongodb-sync-adapter.d.ts.map +1 -0
- package/esm/drivers/mongodb/mongodb-sync-adapter.js +146 -0
- package/esm/drivers/mongodb/mongodb-sync-adapter.js.map +1 -0
- package/esm/drivers/mongodb/types.d.ts +43 -0
- package/esm/drivers/mongodb/types.d.ts.map +1 -0
- package/esm/drivers/postgres/index.d.ts +16 -0
- package/esm/drivers/postgres/index.d.ts.map +1 -0
- package/esm/drivers/postgres/postgres-blueprint.d.ts +64 -0
- package/esm/drivers/postgres/postgres-blueprint.d.ts.map +1 -0
- package/esm/drivers/postgres/postgres-blueprint.js +121 -0
- package/esm/drivers/postgres/postgres-blueprint.js.map +1 -0
- package/esm/drivers/postgres/postgres-dialect.d.ts +136 -0
- package/esm/drivers/postgres/postgres-dialect.d.ts.map +1 -0
- package/esm/drivers/postgres/postgres-dialect.js +268 -0
- package/esm/drivers/postgres/postgres-dialect.js.map +1 -0
- package/esm/drivers/postgres/postgres-driver.d.ts +432 -0
- package/esm/drivers/postgres/postgres-driver.d.ts.map +1 -0
- package/esm/drivers/postgres/postgres-driver.js +1010 -0
- package/esm/drivers/postgres/postgres-driver.js.map +1 -0
- package/esm/drivers/postgres/postgres-migration-driver.d.ts +397 -0
- package/esm/drivers/postgres/postgres-migration-driver.d.ts.map +1 -0
- package/esm/drivers/postgres/postgres-migration-driver.js +900 -0
- package/esm/drivers/postgres/postgres-migration-driver.js.map +1 -0
- package/esm/drivers/postgres/postgres-query-builder.d.ts +254 -0
- package/esm/drivers/postgres/postgres-query-builder.d.ts.map +1 -0
- package/esm/drivers/postgres/postgres-query-builder.js +933 -0
- package/esm/drivers/postgres/postgres-query-builder.js.map +1 -0
- package/esm/drivers/postgres/postgres-query-parser.d.ts +328 -0
- package/esm/drivers/postgres/postgres-query-parser.d.ts.map +1 -0
- package/esm/drivers/postgres/postgres-query-parser.js +868 -0
- package/esm/drivers/postgres/postgres-query-parser.js.map +1 -0
- package/esm/drivers/postgres/postgres-sql-serializer.d.ts +37 -0
- package/esm/drivers/postgres/postgres-sql-serializer.d.ts.map +1 -0
- package/esm/drivers/postgres/postgres-sql-serializer.js +400 -0
- package/esm/drivers/postgres/postgres-sql-serializer.js.map +1 -0
- package/esm/drivers/postgres/postgres-sync-adapter.d.ts +83 -0
- package/esm/drivers/postgres/postgres-sync-adapter.d.ts.map +1 -0
- package/esm/drivers/postgres/postgres-sync-adapter.js +197 -0
- package/esm/drivers/postgres/postgres-sync-adapter.js.map +1 -0
- package/esm/drivers/postgres/types.d.ts +144 -0
- package/esm/drivers/postgres/types.d.ts.map +1 -0
- package/esm/drivers/sql/index.d.ts +10 -0
- package/esm/drivers/sql/index.d.ts.map +1 -0
- package/esm/drivers/sql/sql-dialect.contract.d.ts +204 -0
- package/esm/drivers/sql/sql-dialect.contract.d.ts.map +1 -0
- package/esm/drivers/sql/sql-types.d.ts +202 -0
- package/esm/drivers/sql/sql-types.d.ts.map +1 -0
- package/esm/errors/missing-data-source.error.d.ts +22 -0
- package/esm/errors/missing-data-source.error.d.ts.map +1 -0
- package/esm/errors/missing-data-source.error.js +29 -0
- package/esm/errors/missing-data-source.error.js.map +1 -0
- package/esm/errors/transaction-rollback.error.d.ts +20 -0
- package/esm/errors/transaction-rollback.error.d.ts.map +1 -0
- package/esm/errors/transaction-rollback.error.js +27 -0
- package/esm/errors/transaction-rollback.error.js.map +1 -0
- package/esm/events/model-events.d.ts +231 -0
- package/esm/events/model-events.d.ts.map +1 -0
- package/esm/events/model-events.js +259 -0
- package/esm/events/model-events.js.map +1 -0
- package/esm/expressions/aggregate-expressions.d.ts +215 -0
- package/esm/expressions/aggregate-expressions.d.ts.map +1 -0
- package/esm/expressions/aggregate-expressions.js +221 -0
- package/esm/expressions/aggregate-expressions.js.map +1 -0
- package/esm/expressions/index.d.ts +2 -0
- package/esm/expressions/index.d.ts.map +1 -0
- package/esm/index.d.ts +45 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -0
- package/esm/migration/column-builder.d.ts +417 -0
- package/esm/migration/column-builder.d.ts.map +1 -0
- package/esm/migration/column-builder.js +586 -0
- package/esm/migration/column-builder.js.map +1 -0
- package/esm/migration/column-helpers.d.ts +275 -0
- package/esm/migration/column-helpers.d.ts.map +1 -0
- package/esm/migration/column-helpers.js +389 -0
- package/esm/migration/column-helpers.js.map +1 -0
- package/esm/migration/foreign-key-builder.d.ts +103 -0
- package/esm/migration/foreign-key-builder.d.ts.map +1 -0
- package/esm/migration/foreign-key-builder.js +121 -0
- package/esm/migration/foreign-key-builder.js.map +1 -0
- package/esm/migration/index.d.ts +7 -0
- package/esm/migration/index.d.ts.map +1 -0
- package/esm/migration/migration-runner.d.ts +278 -0
- package/esm/migration/migration-runner.d.ts.map +1 -0
- package/esm/migration/migration-runner.js +815 -0
- package/esm/migration/migration-runner.js.map +1 -0
- package/esm/migration/migration.d.ts +1992 -0
- package/esm/migration/migration.d.ts.map +1 -0
- package/esm/migration/migration.js +2162 -0
- package/esm/migration/migration.js.map +1 -0
- package/esm/migration/sql-grammar.d.ts +61 -0
- package/esm/migration/sql-grammar.d.ts.map +1 -0
- package/esm/migration/sql-grammar.js +164 -0
- package/esm/migration/sql-grammar.js.map +1 -0
- package/esm/migration/sql-serializer.d.ts +22 -0
- package/esm/migration/sql-serializer.d.ts.map +1 -0
- package/esm/migration/sql-serializer.js +26 -0
- package/esm/migration/sql-serializer.js.map +1 -0
- package/esm/migration/types.d.ts +155 -0
- package/esm/migration/types.d.ts.map +1 -0
- package/esm/model/methods/accessor-methods.d.ts +13 -0
- package/esm/model/methods/accessor-methods.d.ts.map +1 -0
- package/esm/model/methods/accessor-methods.js +51 -0
- package/esm/model/methods/accessor-methods.js.map +1 -0
- package/esm/model/methods/delete-methods.d.ts +10 -0
- package/esm/model/methods/delete-methods.d.ts.map +1 -0
- package/esm/model/methods/delete-methods.js +10 -0
- package/esm/model/methods/delete-methods.js.map +1 -0
- package/esm/model/methods/dirty-methods.d.ts +10 -0
- package/esm/model/methods/dirty-methods.d.ts.map +1 -0
- package/esm/model/methods/dirty-methods.js +15 -0
- package/esm/model/methods/dirty-methods.js.map +1 -0
- package/esm/model/methods/hydration-methods.d.ts +10 -0
- package/esm/model/methods/hydration-methods.d.ts.map +1 -0
- package/esm/model/methods/hydration-methods.js +57 -0
- package/esm/model/methods/hydration-methods.js.map +1 -0
- package/esm/model/methods/instance-event-methods.d.ts +7 -0
- package/esm/model/methods/instance-event-methods.d.ts.map +1 -0
- package/esm/model/methods/instance-event-methods.js +15 -0
- package/esm/model/methods/instance-event-methods.js.map +1 -0
- package/esm/model/methods/meta-methods.d.ts +7 -0
- package/esm/model/methods/meta-methods.d.ts.map +1 -0
- package/esm/model/methods/meta-methods.js +78 -0
- package/esm/model/methods/meta-methods.js.map +1 -0
- package/esm/model/methods/query-methods.d.ts +24 -0
- package/esm/model/methods/query-methods.d.ts.map +1 -0
- package/esm/model/methods/query-methods.js +164 -0
- package/esm/model/methods/query-methods.js.map +1 -0
- package/esm/model/methods/restore-methods.d.ts +10 -0
- package/esm/model/methods/restore-methods.d.ts.map +1 -0
- package/esm/model/methods/restore-methods.js +13 -0
- package/esm/model/methods/restore-methods.js.map +1 -0
- package/esm/model/methods/scope-methods.d.ts +7 -0
- package/esm/model/methods/scope-methods.d.ts.map +1 -0
- package/esm/model/methods/scope-methods.js +15 -0
- package/esm/model/methods/scope-methods.js.map +1 -0
- package/esm/model/methods/serialization-methods.d.ts +3 -0
- package/esm/model/methods/serialization-methods.d.ts.map +1 -0
- package/esm/model/methods/serialization-methods.js +27 -0
- package/esm/model/methods/serialization-methods.js.map +1 -0
- package/esm/model/methods/static-event-methods.d.ts +9 -0
- package/esm/model/methods/static-event-methods.d.ts.map +1 -0
- package/esm/model/methods/static-event-methods.js +29 -0
- package/esm/model/methods/static-event-methods.js.map +1 -0
- package/esm/model/methods/write-methods.d.ts +10 -0
- package/esm/model/methods/write-methods.d.ts.map +1 -0
- package/esm/model/methods/write-methods.js +52 -0
- package/esm/model/methods/write-methods.js.map +1 -0
- package/esm/model/model.d.ts +1647 -0
- package/esm/model/model.d.ts.map +1 -0
- package/esm/model/model.js +1657 -0
- package/esm/model/model.js.map +1 -0
- package/esm/model/model.types.d.ts +44 -0
- package/esm/model/model.types.d.ts.map +1 -0
- package/esm/model/register-model.d.ts +81 -0
- package/esm/model/register-model.d.ts.map +1 -0
- package/esm/model/register-model.js +94 -0
- package/esm/model/register-model.js.map +1 -0
- package/esm/query-builder/query-builder.d.ts +556 -0
- package/esm/query-builder/query-builder.d.ts.map +1 -0
- package/esm/query-builder/query-builder.js +1070 -0
- package/esm/query-builder/query-builder.js.map +1 -0
- package/esm/relations/helpers.d.ts +156 -0
- package/esm/relations/helpers.d.ts.map +1 -0
- package/esm/relations/helpers.js +202 -0
- package/esm/relations/helpers.js.map +1 -0
- package/esm/relations/index.d.ts +35 -0
- package/esm/relations/index.d.ts.map +1 -0
- package/esm/relations/pivot-operations.d.ts +160 -0
- package/esm/relations/pivot-operations.d.ts.map +1 -0
- package/esm/relations/pivot-operations.js +293 -0
- package/esm/relations/pivot-operations.js.map +1 -0
- package/esm/relations/relation-hydrator.d.ts +68 -0
- package/esm/relations/relation-hydrator.d.ts.map +1 -0
- package/esm/relations/relation-hydrator.js +81 -0
- package/esm/relations/relation-hydrator.js.map +1 -0
- package/esm/relations/relation-loader.d.ts +194 -0
- package/esm/relations/relation-loader.d.ts.map +1 -0
- package/esm/relations/relation-loader.js +466 -0
- package/esm/relations/relation-loader.js.map +1 -0
- package/esm/relations/types.d.ts +306 -0
- package/esm/relations/types.d.ts.map +1 -0
- package/esm/remover/database-remover.d.ts +100 -0
- package/esm/remover/database-remover.d.ts.map +1 -0
- package/esm/remover/database-remover.js +214 -0
- package/esm/remover/database-remover.js.map +1 -0
- package/esm/restorer/database-restorer.d.ts +131 -0
- package/esm/restorer/database-restorer.d.ts.map +1 -0
- package/esm/restorer/database-restorer.js +434 -0
- package/esm/restorer/database-restorer.js.map +1 -0
- package/esm/sql-database-dirty-tracker.d.ts +13 -0
- package/esm/sql-database-dirty-tracker.d.ts.map +1 -0
- package/esm/sql-database-dirty-tracker.js +14 -0
- package/esm/sql-database-dirty-tracker.js.map +1 -0
- package/esm/sync/index.d.ts +12 -0
- package/esm/sync/index.d.ts.map +1 -0
- package/esm/sync/model-events.d.ts +62 -0
- package/esm/sync/model-events.d.ts.map +1 -0
- package/esm/sync/model-events.js +49 -0
- package/esm/sync/model-events.js.map +1 -0
- package/esm/sync/model-sync-operation.d.ts +163 -0
- package/esm/sync/model-sync-operation.d.ts.map +1 -0
- package/esm/sync/model-sync-operation.js +292 -0
- package/esm/sync/model-sync-operation.js.map +1 -0
- package/esm/sync/model-sync.d.ts +130 -0
- package/esm/sync/model-sync.d.ts.map +1 -0
- package/esm/sync/model-sync.js +178 -0
- package/esm/sync/model-sync.js.map +1 -0
- package/esm/sync/sync-context.d.ts +70 -0
- package/esm/sync/sync-context.d.ts.map +1 -0
- package/esm/sync/sync-context.js +101 -0
- package/esm/sync/sync-context.js.map +1 -0
- package/esm/sync/sync-manager.d.ts +213 -0
- package/esm/sync/sync-manager.d.ts.map +1 -0
- package/esm/sync/sync-manager.js +689 -0
- package/esm/sync/sync-manager.js.map +1 -0
- package/esm/sync/types.d.ts +289 -0
- package/esm/sync/types.d.ts.map +1 -0
- package/esm/test-migrations/test-enhanced-features.migration.d.ts +15 -0
- package/esm/test-migrations/test-enhanced-features.migration.d.ts.map +1 -0
- package/esm/types.d.ts +371 -0
- package/esm/types.d.ts.map +1 -0
- package/esm/utils/connect-to-database.d.ts +307 -0
- package/esm/utils/connect-to-database.d.ts.map +1 -0
- package/esm/utils/connect-to-database.js +130 -0
- package/esm/utils/connect-to-database.js.map +1 -0
- package/esm/utils/database-writer.utils.d.ts +15 -0
- package/esm/utils/database-writer.utils.d.ts.map +1 -0
- package/esm/utils/database-writer.utils.js +14 -0
- package/esm/utils/database-writer.utils.js.map +1 -0
- package/esm/utils/define-model.js +100 -0
- package/esm/utils/define-model.js.map +1 -0
- package/esm/utils/is-valid-date-value.d.ts +5 -0
- package/esm/utils/is-valid-date-value.d.ts.map +1 -0
- package/esm/utils/is-valid-date-value.js +25 -0
- package/esm/utils/is-valid-date-value.js.map +1 -0
- package/esm/utils/once-connected.d.ts +146 -0
- package/esm/utils/once-connected.d.ts.map +1 -0
- package/esm/utils/once-connected.js +251 -0
- package/esm/utils/once-connected.js.map +1 -0
- package/esm/validation/database-seal-plugins.d.ts +12 -0
- package/esm/validation/database-seal-plugins.d.ts.map +1 -0
- package/esm/validation/database-seal-plugins.js +1 -0
- package/esm/validation/database-seal-plugins.js.map +1 -0
- package/esm/validation/database-writer-validation-error.d.ts +97 -0
- package/esm/validation/database-writer-validation-error.d.ts.map +1 -0
- package/esm/validation/database-writer-validation-error.js +160 -0
- package/esm/validation/database-writer-validation-error.js.map +1 -0
- package/esm/validation/index.d.ts +3 -0
- package/esm/validation/index.d.ts.map +1 -0
- package/esm/validation/mutators/embed-mutator.d.ts +9 -0
- package/esm/validation/mutators/embed-mutator.d.ts.map +1 -0
- package/esm/validation/mutators/embed-mutator.js +33 -0
- package/esm/validation/mutators/embed-mutator.js.map +1 -0
- package/esm/validation/plugins/embed-validator-plugin.d.ts +24 -0
- package/esm/validation/plugins/embed-validator-plugin.d.ts.map +1 -0
- package/esm/validation/plugins/embed-validator-plugin.js +18 -0
- package/esm/validation/plugins/embed-validator-plugin.js.map +1 -0
- package/esm/validation/rules/database-model-rule.d.ts +7 -0
- package/esm/validation/rules/database-model-rule.d.ts.map +1 -0
- package/esm/validation/rules/database-model-rule.js +27 -0
- package/esm/validation/rules/database-model-rule.js.map +1 -0
- package/esm/validation/transformers/embed-model-transformer.d.ts +3 -0
- package/esm/validation/transformers/embed-model-transformer.d.ts.map +1 -0
- package/esm/validation/transformers/embed-model-transformer.js +18 -0
- package/esm/validation/transformers/embed-model-transformer.js.map +1 -0
- package/esm/validation/validators/embed-validator.d.ts +21 -0
- package/esm/validation/validators/embed-validator.d.ts.map +1 -0
- package/esm/validation/validators/embed-validator.js +43 -0
- package/esm/validation/validators/embed-validator.js.map +1 -0
- package/esm/writer/database-writer.d.ts +181 -0
- package/esm/writer/database-writer.d.ts.map +1 -0
- package/esm/writer/database-writer.js +407 -0
- package/esm/writer/database-writer.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { DriverContract, IdGeneratorContract } from "../contracts";
|
|
2
|
+
import type { DeleteStrategy, MigrationDefaults, ModelDefaults } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options used when registering a data source.
|
|
5
|
+
*/
|
|
6
|
+
export type DataSourceOptions = {
|
|
7
|
+
/** Unique name identifying the data source. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Driver bound to the data source. */
|
|
10
|
+
driver: DriverContract;
|
|
11
|
+
/** Whether this data source should be considered the default one. */
|
|
12
|
+
isDefault?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Default delete strategy for models using this data source.
|
|
15
|
+
*
|
|
16
|
+
* - MongoDB: Typically `"trash"` (uses RecycleBin collection)
|
|
17
|
+
* - PostgreSQL: Typically `"permanent"` or `"soft"`
|
|
18
|
+
*
|
|
19
|
+
* Can be overridden by model static property or destroy() options.
|
|
20
|
+
*
|
|
21
|
+
* @default undefined (falls back to "permanent")
|
|
22
|
+
*/
|
|
23
|
+
defaultDeleteStrategy?: DeleteStrategy;
|
|
24
|
+
/**
|
|
25
|
+
* Default trash table/collection name for "trash" delete strategy.
|
|
26
|
+
*
|
|
27
|
+
* - MongoDB: Typically `"RecycleBin"`
|
|
28
|
+
* - If not set, defaults to `{table}Trash` pattern
|
|
29
|
+
*
|
|
30
|
+
* Can be overridden by Model.trashTable static property.
|
|
31
|
+
*
|
|
32
|
+
* @default undefined (uses {table}Trash pattern)
|
|
33
|
+
*/
|
|
34
|
+
defaultTrashTable?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Default model configuration for all models using this data source.
|
|
37
|
+
*
|
|
38
|
+
* These defaults override driver defaults but are overridden by
|
|
39
|
+
* individual model static properties.
|
|
40
|
+
*
|
|
41
|
+
* @default undefined
|
|
42
|
+
*/
|
|
43
|
+
modelDefaults?: Partial<ModelDefaults>;
|
|
44
|
+
/**
|
|
45
|
+
* Migration-level defaults (UUID strategy, etc.).
|
|
46
|
+
*
|
|
47
|
+
* These defaults override driver migration defaults but can be
|
|
48
|
+
* overridden by individual migration calls.
|
|
49
|
+
*
|
|
50
|
+
* @default undefined (uses driver defaults)
|
|
51
|
+
*/
|
|
52
|
+
migrationDefaults?: MigrationDefaults;
|
|
53
|
+
/**
|
|
54
|
+
* Migration configuration options.
|
|
55
|
+
*/
|
|
56
|
+
migrations?: {
|
|
57
|
+
/**
|
|
58
|
+
* Whether to wrap migrations in database transactions.
|
|
59
|
+
*
|
|
60
|
+
* Overrides driver defaults:
|
|
61
|
+
* - PostgreSQL default: `true` (DDL is transactional)
|
|
62
|
+
* - MongoDB default: `false` (DDL cannot be transactional)
|
|
63
|
+
*
|
|
64
|
+
* Individual migrations can override this with their own `transactional` property.
|
|
65
|
+
*
|
|
66
|
+
* @default undefined (uses driver default)
|
|
67
|
+
*/
|
|
68
|
+
transactional?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Name of the migrations tracking table/collection.
|
|
71
|
+
*
|
|
72
|
+
* @default "_migrations"
|
|
73
|
+
*/
|
|
74
|
+
table?: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Wrapper that couples a driver with its metadata.
|
|
79
|
+
*
|
|
80
|
+
* A data source represents a database connection with all its associated services.
|
|
81
|
+
* The ID generator (if needed) is provided by the driver itself.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* // MongoDB with auto ID generation
|
|
86
|
+
* const mongoDriver = new MongoDbDriver({
|
|
87
|
+
* host: "localhost",
|
|
88
|
+
* port: 27017,
|
|
89
|
+
* database: "myapp",
|
|
90
|
+
* autoGenerateId: true, // Driver creates its own ID generator
|
|
91
|
+
* });
|
|
92
|
+
*
|
|
93
|
+
* const dataSource = new DataSource({
|
|
94
|
+
* name: "primary",
|
|
95
|
+
* driver: mongoDriver,
|
|
96
|
+
* isDefault: true,
|
|
97
|
+
* });
|
|
98
|
+
*
|
|
99
|
+
* // Access ID generator from driver
|
|
100
|
+
* const idGenerator = dataSource.idGenerator;
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
export declare class DataSource {
|
|
104
|
+
/** Unique name identifying this data source. */
|
|
105
|
+
readonly name: string;
|
|
106
|
+
/** Database driver for executing queries. */
|
|
107
|
+
readonly driver: DriverContract;
|
|
108
|
+
/** Whether this is the default data source. */
|
|
109
|
+
readonly isDefault: boolean;
|
|
110
|
+
/** Default delete strategy for models using this data source. */
|
|
111
|
+
readonly defaultDeleteStrategy?: DeleteStrategy;
|
|
112
|
+
/** Default trash table/collection name for "trash" delete strategy. */
|
|
113
|
+
readonly defaultTrashTable?: string;
|
|
114
|
+
/** Default model configuration for all models using this data source. */
|
|
115
|
+
readonly modelDefaults?: Partial<ModelDefaults>;
|
|
116
|
+
/** Migration-level defaults (UUID strategy, etc.). */
|
|
117
|
+
readonly migrationDefaults?: MigrationDefaults;
|
|
118
|
+
/** Migration configuration options. */
|
|
119
|
+
readonly migrations?: {
|
|
120
|
+
transactional?: boolean;
|
|
121
|
+
table?: string;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Create a new data source.
|
|
125
|
+
*
|
|
126
|
+
* @param options - Configuration options
|
|
127
|
+
*/
|
|
128
|
+
constructor(options: DataSourceOptions);
|
|
129
|
+
/**
|
|
130
|
+
* Get the ID generator from the driver (if available).
|
|
131
|
+
*
|
|
132
|
+
* NoSQL drivers like MongoDB can provide their own ID generator.
|
|
133
|
+
* SQL drivers return undefined as they use native AUTO_INCREMENT.
|
|
134
|
+
*
|
|
135
|
+
* @returns The ID generator instance, or undefined
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```typescript
|
|
139
|
+
* const idGenerator = dataSource.idGenerator;
|
|
140
|
+
* if (idGenerator) {
|
|
141
|
+
* const id = await idGenerator.generateNextId({ table: "users" });
|
|
142
|
+
* }
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
get idGenerator(): IdGeneratorContract | undefined;
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=data-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-source.d.ts","sourceRoot":"","sources":["../../src/data-source/data-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,MAAM,EAAE,cAAc,CAAC;IACvB,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;OASG;IACH,qBAAqB,CAAC,EAAE,cAAc,CAAC;IAEvC;;;;;;;;;OASG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAEvC;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAEtC;;OAEG;IACH,UAAU,CAAC,EAAE;QACX;;;;;;;;;;WAUG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;QAExB;;;;WAIG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,UAAU;IACrB,gDAAgD;IAChD,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B,6CAA6C;IAC7C,SAAgB,MAAM,EAAE,cAAc,CAAC;IAEvC,+CAA+C;IAC/C,SAAgB,SAAS,EAAE,OAAO,CAAC;IAEnC,iEAAiE;IACjE,SAAgB,qBAAqB,CAAC,EAAE,cAAc,CAAC;IAEvD,uEAAuE;IACvE,SAAgB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3C,yEAAyE;IACzE,SAAgB,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAEvD,sDAAsD;IACtD,SAAgB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAEtD,uCAAuC;IACvC,SAAgB,UAAU,CAAC,EAAE;QAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF;;;;OAIG;gBACgB,OAAO,EAAE,iBAAiB;IAW7C;;;;;;;;;;;;;;;OAeG;IACH,IAAW,WAAW,IAAI,mBAAmB,GAAG,SAAS,CAOxD;CACF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapper that couples a driver with its metadata.
|
|
3
|
+
*
|
|
4
|
+
* A data source represents a database connection with all its associated services.
|
|
5
|
+
* The ID generator (if needed) is provided by the driver itself.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // MongoDB with auto ID generation
|
|
10
|
+
* const mongoDriver = new MongoDbDriver({
|
|
11
|
+
* host: "localhost",
|
|
12
|
+
* port: 27017,
|
|
13
|
+
* database: "myapp",
|
|
14
|
+
* autoGenerateId: true, // Driver creates its own ID generator
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* const dataSource = new DataSource({
|
|
18
|
+
* name: "primary",
|
|
19
|
+
* driver: mongoDriver,
|
|
20
|
+
* isDefault: true,
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* // Access ID generator from driver
|
|
24
|
+
* const idGenerator = dataSource.idGenerator;
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
class DataSource {
|
|
28
|
+
/** Unique name identifying this data source. */
|
|
29
|
+
name;
|
|
30
|
+
/** Database driver for executing queries. */
|
|
31
|
+
driver;
|
|
32
|
+
/** Whether this is the default data source. */
|
|
33
|
+
isDefault;
|
|
34
|
+
/** Default delete strategy for models using this data source. */
|
|
35
|
+
defaultDeleteStrategy;
|
|
36
|
+
/** Default trash table/collection name for "trash" delete strategy. */
|
|
37
|
+
defaultTrashTable;
|
|
38
|
+
/** Default model configuration for all models using this data source. */
|
|
39
|
+
modelDefaults;
|
|
40
|
+
/** Migration-level defaults (UUID strategy, etc.). */
|
|
41
|
+
migrationDefaults;
|
|
42
|
+
/** Migration configuration options. */
|
|
43
|
+
migrations;
|
|
44
|
+
/**
|
|
45
|
+
* Create a new data source.
|
|
46
|
+
*
|
|
47
|
+
* @param options - Configuration options
|
|
48
|
+
*/
|
|
49
|
+
constructor(options) {
|
|
50
|
+
this.name = options.name;
|
|
51
|
+
this.driver = options.driver;
|
|
52
|
+
this.isDefault = Boolean(options.isDefault);
|
|
53
|
+
this.defaultDeleteStrategy = options.defaultDeleteStrategy;
|
|
54
|
+
this.defaultTrashTable = options.defaultTrashTable;
|
|
55
|
+
this.modelDefaults = options.modelDefaults;
|
|
56
|
+
this.migrationDefaults = options.migrationDefaults;
|
|
57
|
+
this.migrations = options.migrations;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get the ID generator from the driver (if available).
|
|
61
|
+
*
|
|
62
|
+
* NoSQL drivers like MongoDB can provide their own ID generator.
|
|
63
|
+
* SQL drivers return undefined as they use native AUTO_INCREMENT.
|
|
64
|
+
*
|
|
65
|
+
* @returns The ID generator instance, or undefined
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* const idGenerator = dataSource.idGenerator;
|
|
70
|
+
* if (idGenerator) {
|
|
71
|
+
* const id = await idGenerator.generateNextId({ table: "users" });
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
get idGenerator() {
|
|
76
|
+
// Check if driver has a getIdGenerator method (duck typing)
|
|
77
|
+
const driver = this.driver;
|
|
78
|
+
if (typeof driver.getIdGenerator === "function") {
|
|
79
|
+
return driver.getIdGenerator();
|
|
80
|
+
}
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
}export{DataSource};//# sourceMappingURL=data-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-source.js","sources":["../../src/data-source/data-source.ts"],"sourcesContent":[null],"names":[],"mappings":"AAmFA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;MACU,UAAU,CAAA;;AAEL,IAAA,IAAI,CAAS;;AAGb,IAAA,MAAM,CAAiB;;AAGvB,IAAA,SAAS,CAAU;;AAGnB,IAAA,qBAAqB,CAAkB;;AAGvC,IAAA,iBAAiB,CAAU;;AAG3B,IAAA,aAAa,CAA0B;;AAGvC,IAAA,iBAAiB,CAAqB;;AAGtC,IAAA,UAAU,CAGxB;AAEF;;;;AAIG;AACH,IAAA,WAAA,CAAmB,OAA0B,EAAA;AAC3C,QAAA,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AACzB,QAAA,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAC5C,QAAA,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;AAC3D,QAAA,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;AACnD,QAAA,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;AAC3C,QAAA,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;AACnD,QAAA,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;KACtC;AAED;;;;;;;;;;;;;;;AAeG;AACH,IAAA,IAAW,WAAW,GAAA;;AAEpB,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAa,CAAC;AAClC,QAAA,IAAI,OAAO,MAAM,CAAC,cAAc,KAAK,UAAU,EAAE;AAC/C,YAAA,OAAO,MAAM,CAAC,cAAc,EAAE,CAAC;AAChC,SAAA;AACD,QAAA,OAAO,SAAS,CAAC;KAClB;AACF"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flattened record type representing dot-notation paths mapped to their values.
|
|
3
|
+
*/
|
|
4
|
+
type FlatRecord = Record<string, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* Represents the old and new values of a dirty column.
|
|
7
|
+
*/
|
|
8
|
+
type DirtyColumnValues = {
|
|
9
|
+
oldValue: unknown;
|
|
10
|
+
newValue: unknown;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Tracks changes to model data by maintaining snapshots of initial and current state.
|
|
14
|
+
*
|
|
15
|
+
* The tracker stores both raw (nested) and flattened (dot-notation) versions of the data
|
|
16
|
+
* to accurately detect modifications, additions, and removals at any nesting level.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const tracker = new DatabaseDirtyTracker({ name: "Alice", age: 30 });
|
|
21
|
+
* tracker.mergeChanges({ age: 31 });
|
|
22
|
+
* console.log(tracker.hasChanges()); // true
|
|
23
|
+
* console.log(tracker.getDirtyColumns()); // ["age"]
|
|
24
|
+
* console.log(tracker.getDirtyColumnsWithValues());
|
|
25
|
+
* // { age: { oldValue: 30, newValue: 31 } }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class DatabaseDirtyTracker {
|
|
29
|
+
/**
|
|
30
|
+
* The initial raw data snapshot taken at construction or last reset.
|
|
31
|
+
* Used as the baseline for comparison.
|
|
32
|
+
*/
|
|
33
|
+
protected initialRaw: Record<string, unknown>;
|
|
34
|
+
/**
|
|
35
|
+
* The current raw data snapshot reflecting all changes made via merge/unset.
|
|
36
|
+
*/
|
|
37
|
+
protected currentRaw: Record<string, unknown>;
|
|
38
|
+
/**
|
|
39
|
+
* Flattened version of the initial data using dot-notation keys.
|
|
40
|
+
* Example: { "address.city": "NYC" }
|
|
41
|
+
*/
|
|
42
|
+
protected initialFlattened: FlatRecord;
|
|
43
|
+
/**
|
|
44
|
+
* Flattened version of the current data using dot-notation keys.
|
|
45
|
+
*/
|
|
46
|
+
protected currentFlattened: FlatRecord;
|
|
47
|
+
/**
|
|
48
|
+
* Set of column names (dot-notation paths) that have been modified.
|
|
49
|
+
*/
|
|
50
|
+
protected readonly dirtyColumns: Set<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Set of column names (dot-notation paths) that existed initially but have been removed.
|
|
53
|
+
*/
|
|
54
|
+
protected readonly removedColumns: Set<string>;
|
|
55
|
+
constructor(data: Record<string, unknown>);
|
|
56
|
+
/**
|
|
57
|
+
* Returns the list of dirty columns using dot-notation.
|
|
58
|
+
*
|
|
59
|
+
* A column is considered dirty if its value has changed compared to the initial snapshot.
|
|
60
|
+
*
|
|
61
|
+
* @returns An array of column names (dot-notation paths) that have been modified
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* tracker.mergeChanges({ name: "Bob", "address.city": "LA" });
|
|
66
|
+
* tracker.getDirtyColumns(); // ["name", "address.city"]
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
getDirtyColumns(): string[];
|
|
70
|
+
/**
|
|
71
|
+
* Determines whether there are any tracked changes.
|
|
72
|
+
*
|
|
73
|
+
* Returns `true` if any columns have been modified or removed since the initial snapshot.
|
|
74
|
+
*
|
|
75
|
+
* @returns `true` if there are changes, `false` otherwise
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* const tracker = new DatabaseDirtyTracker({ name: "Alice" });
|
|
80
|
+
* tracker.hasChanges(); // false
|
|
81
|
+
* tracker.mergeChanges({ name: "Bob" });
|
|
82
|
+
* tracker.hasChanges(); // true
|
|
83
|
+
* tracker.unset("name");
|
|
84
|
+
* tracker.hasChanges(); // true (removed column counts as a change)
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
hasChanges(): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Check if the given column is dirty (changed)
|
|
90
|
+
*/
|
|
91
|
+
isDirty(column: string): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Returns the set of columns that have been removed compared to the baseline.
|
|
94
|
+
*
|
|
95
|
+
* A column is considered removed if it existed in the initial snapshot but has been
|
|
96
|
+
* explicitly unset or deleted from the current data.
|
|
97
|
+
*
|
|
98
|
+
* @returns An array of column names (dot-notation paths) that have been removed
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const tracker = new DatabaseDirtyTracker({ name: "Alice", temp: "value" });
|
|
103
|
+
* tracker.unset("temp");
|
|
104
|
+
* tracker.getRemovedColumns(); // ["temp"]
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
getRemovedColumns(): string[];
|
|
108
|
+
/**
|
|
109
|
+
* Provides a mapping of dirty columns to their previous and current values.
|
|
110
|
+
*
|
|
111
|
+
* This is useful for generating audit logs, building partial update payloads,
|
|
112
|
+
* or displaying change summaries to users.
|
|
113
|
+
*
|
|
114
|
+
* @returns A record mapping each dirty column to an object containing oldValue and newValue
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```typescript
|
|
118
|
+
* const tracker = new DatabaseDirtyTracker({ name: "Alice", age: 30 });
|
|
119
|
+
* tracker.mergeChanges({ age: 31 });
|
|
120
|
+
* tracker.getDirtyColumnsWithValues();
|
|
121
|
+
* // { age: { oldValue: 30, newValue: 31 } }
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
getDirtyColumnsWithValues(): Record<string, DirtyColumnValues>;
|
|
125
|
+
/**
|
|
126
|
+
* Replaces the current data snapshot entirely and recomputes the diff.
|
|
127
|
+
*
|
|
128
|
+
* This is useful when you want to replace all current data with a new set,
|
|
129
|
+
* while keeping the initial baseline for comparison.
|
|
130
|
+
*
|
|
131
|
+
* @param data - The new data to set as the current snapshot
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```typescript
|
|
135
|
+
* const tracker = new DatabaseDirtyTracker({ name: "Alice" });
|
|
136
|
+
* tracker.replaceCurrentData({ name: "Bob", email: "bob@example.com" });
|
|
137
|
+
* tracker.getDirtyColumns(); // ["name", "email"]
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
replaceCurrentData(data: Record<string, unknown>): void;
|
|
141
|
+
/**
|
|
142
|
+
* Merges a partial payload into the current snapshot and recomputes the diff.
|
|
143
|
+
*
|
|
144
|
+
* This performs a deep merge, preserving existing nested structures while
|
|
145
|
+
* updating only the specified fields.
|
|
146
|
+
*
|
|
147
|
+
* @param partial - Partial data to merge into the current snapshot
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```typescript
|
|
151
|
+
* const tracker = new DatabaseDirtyTracker({ name: "Alice", address: { city: "NYC" } });
|
|
152
|
+
* tracker.mergeChanges({ address: { zip: "10001" } });
|
|
153
|
+
* // Current data: { name: "Alice", address: { city: "NYC", zip: "10001" } }
|
|
154
|
+
* tracker.getDirtyColumns(); // ["address.zip"]
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
mergeChanges(partial: Record<string, unknown>): void;
|
|
158
|
+
/**
|
|
159
|
+
* Explicitly removes one or more columns from the current data.
|
|
160
|
+
*
|
|
161
|
+
* Supports both single column names and arrays of column names.
|
|
162
|
+
* Columns can be specified using dot-notation for nested paths.
|
|
163
|
+
*
|
|
164
|
+
* @param columns - A single column name or an array of column names to remove
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```typescript
|
|
168
|
+
* tracker.unset("tempField");
|
|
169
|
+
* tracker.unset(["field1", "field2", "nested.field"]);
|
|
170
|
+
* tracker.getRemovedColumns(); // ["tempField", "field1", "field2", "nested.field"]
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
unset(columns: string | string[]): void;
|
|
174
|
+
/**
|
|
175
|
+
* Resets both the initial and current snapshots to the provided data.
|
|
176
|
+
*
|
|
177
|
+
* If no data is provided, the current snapshot becomes the new baseline.
|
|
178
|
+
* This clears all tracked changes and removed columns.
|
|
179
|
+
*
|
|
180
|
+
* @param data - Optional new data to use as the baseline. If omitted, uses current data.
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```typescript
|
|
184
|
+
* const tracker = new DatabaseDirtyTracker({ name: "Alice" });
|
|
185
|
+
* tracker.mergeChanges({ name: "Bob" });
|
|
186
|
+
* tracker.hasChanges(); // true
|
|
187
|
+
* tracker.reset(); // Make current state the new baseline
|
|
188
|
+
* tracker.hasChanges(); // false
|
|
189
|
+
*
|
|
190
|
+
* // Or reset to entirely new data:
|
|
191
|
+
* tracker.reset({ name: "Charlie", age: 25 });
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
reset(data?: Record<string, unknown>): void;
|
|
195
|
+
/**
|
|
196
|
+
* Flattens the given data object.
|
|
197
|
+
* Can be overridden by subclasses to change flattening behavior.
|
|
198
|
+
*/
|
|
199
|
+
protected flattenData(data: Record<string, unknown>): FlatRecord;
|
|
200
|
+
/**
|
|
201
|
+
* Recomputes the dirty and removed column sets by comparing initial and current snapshots.
|
|
202
|
+
*
|
|
203
|
+
* This method is called internally after any operation that modifies the current data.
|
|
204
|
+
* It iterates through all keys in both flattened snapshots and determines which columns
|
|
205
|
+
* have been modified or removed.
|
|
206
|
+
*
|
|
207
|
+
* @protected
|
|
208
|
+
*/
|
|
209
|
+
protected updateDirtyState(): void;
|
|
210
|
+
/**
|
|
211
|
+
* Recursively merges source object into target object, performing a deep merge.
|
|
212
|
+
*
|
|
213
|
+
* For nested objects, the merge is recursive. For arrays and primitives, the source
|
|
214
|
+
* value replaces the target value. All values are cloned to prevent reference sharing.
|
|
215
|
+
*
|
|
216
|
+
* @param target - The object to merge into
|
|
217
|
+
* @param source - The object to merge from
|
|
218
|
+
* @private
|
|
219
|
+
*/
|
|
220
|
+
protected mergeIntoRaw(target: Record<string, unknown>, source: Record<string, unknown>): void;
|
|
221
|
+
/**
|
|
222
|
+
* Deletes a field from the current raw data using a dot-notation path.
|
|
223
|
+
*
|
|
224
|
+
* Supports nested paths (e.g., "address.city") and array indices (e.g., "items.0").
|
|
225
|
+
* If any segment in the path doesn't exist, the operation is a no-op.
|
|
226
|
+
*
|
|
227
|
+
* @param path - The dot-notation path to the field to delete
|
|
228
|
+
* @private
|
|
229
|
+
*/
|
|
230
|
+
protected deleteFromRaw(path: string): void;
|
|
231
|
+
/**
|
|
232
|
+
* Resolves a single segment of a dot-notation path within a container.
|
|
233
|
+
*
|
|
234
|
+
* Handles both object property access and array index access.
|
|
235
|
+
*
|
|
236
|
+
* @param container - The object or array to access
|
|
237
|
+
* @param segment - The property name or array index as a string
|
|
238
|
+
* @returns The value at the specified segment, or undefined if not found
|
|
239
|
+
* @private
|
|
240
|
+
*/
|
|
241
|
+
protected resolveSegment(container: unknown, segment: string): unknown;
|
|
242
|
+
/**
|
|
243
|
+
* Creates a deep clone of the provided data.
|
|
244
|
+
*
|
|
245
|
+
* @param data - The data to clone
|
|
246
|
+
* @returns A deep clone of the data
|
|
247
|
+
* @private
|
|
248
|
+
*/
|
|
249
|
+
protected cloneData<T>(data: T): T;
|
|
250
|
+
}
|
|
251
|
+
export {};
|
|
252
|
+
//# sourceMappingURL=database-dirty-tracker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database-dirty-tracker.d.ts","sourceRoot":"","sources":["../src/database-dirty-tracker.ts"],"names":[],"mappings":"AA4CA;;GAEG;AACH,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C;;GAEG;AACH,KAAK,iBAAiB,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC;AAElE;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,oBAAoB;IAC/B;;;OAGG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE9C;;OAEG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE9C;;;OAGG;IACH,SAAS,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAEvC;;OAEG;IACH,SAAS,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAEvC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,YAAY,cAAqB;IAEpD;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,cAAc,cAAqB;gBAEnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAUhD;;;;;;;;;;;;OAYG;IACI,eAAe,IAAI,MAAM,EAAE;IAIlC;;;;;;;;;;;;;;;;OAgBG;IACI,UAAU,IAAI,OAAO;IAI5B;;OAEG;IACI,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAIvC;;;;;;;;;;;;;;OAcG;IACI,iBAAiB,IAAI,MAAM,EAAE;IAIpC;;;;;;;;;;;;;;;OAeG;IACI,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAgBrE;;;;;;;;;;;;;;OAcG;IACI,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAM9D;;;;;;;;;;;;;;;OAeG;IACI,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAM3D;;;;;;;;;;;;;;OAcG;IACI,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;IAW9C;;;;;;;;;;;;;;;;;;;OAmBG;IACI,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAYlD;;;OAGG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU;IAIhE;;;;;;;;OAQG;IACH,SAAS,CAAC,gBAAgB,IAAI,IAAI;IA0BlC;;;;;;;;;OASG;IACH,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAkB9F;;;;;;;;OAQG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IA8B3C;;;;;;;;;OASG;IACH,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAiBtE;;;;;;OAMG;IACH,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;CAGnC"}
|