@warlock.js/cascade 4.1.7 → 4.1.8
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/esm/cli/commands/migrate-export-sql.mjs +1 -1
- package/esm/cli/commands/migrate-list.mjs +1 -1
- package/esm/cli/commands/migrate-rollback.mjs +1 -1
- package/esm/cli/commands/migrate.mjs +1 -1
- package/esm/cli/connection-from-env.mjs +1 -1
- package/esm/cli/index.mjs +1 -1
- package/esm/cli/load-migrations.mjs +1 -1
- package/esm/cli/printers.mjs +1 -1
- package/esm/cli/setup-logger.mjs +1 -1
- package/esm/cli/with-cli-connection.mjs +1 -1
- package/esm/cli.mjs +1 -1
- package/esm/context/database-data-source-context.d.mts +1 -1
- package/esm/context/database-data-source-context.mjs +1 -1
- package/esm/context/database-transaction-context.d.mts +1 -1
- package/esm/context/database-transaction-context.mjs +1 -1
- package/esm/contracts/database-driver.contract.d.mts +1 -1
- package/esm/contracts/database-id-generator.contract.d.mts +1 -1
- package/esm/contracts/database-remover.contract.d.mts +1 -1
- package/esm/contracts/database-restorer.contract.d.mts +1 -1
- package/esm/contracts/database-writer.contract.d.mts +1 -1
- package/esm/contracts/driver-blueprint.contract.d.mts +1 -1
- package/esm/contracts/migration-driver.contract.d.mts +1 -1
- package/esm/contracts/query-builder.contract.d.mts +1 -1
- package/esm/contracts/sync-adapter.contract.d.mts +1 -1
- package/esm/data-source/data-source-registry.d.mts +1 -1
- package/esm/data-source/data-source-registry.mjs +1 -1
- package/esm/data-source/data-source.d.mts +1 -1
- package/esm/data-source/data-source.mjs +1 -1
- package/esm/database-dirty-tracker.d.mts +1 -1
- package/esm/database-dirty-tracker.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-blueprint.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-driver.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-driver.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-id-generator.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-id-generator.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-migration-driver.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-migration-driver.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-query-builder.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-query-builder.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-query-operations.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-query-operations.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-query-parser.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-query-parser.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-sync-adapter.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-sync-adapter.mjs +1 -1
- package/esm/drivers/mongodb/types.d.mts +1 -1
- package/esm/drivers/postgres/postgres-blueprint.d.mts +1 -1
- package/esm/drivers/postgres/postgres-blueprint.mjs +1 -1
- package/esm/drivers/postgres/postgres-dialect.d.mts +1 -1
- package/esm/drivers/postgres/postgres-dialect.mjs +1 -1
- package/esm/drivers/postgres/postgres-driver.d.mts +1 -1
- package/esm/drivers/postgres/postgres-driver.mjs +1 -1
- package/esm/drivers/postgres/postgres-migration-driver.d.mts +1 -1
- package/esm/drivers/postgres/postgres-migration-driver.mjs +1 -1
- package/esm/drivers/postgres/postgres-query-builder.d.mts +1 -1
- package/esm/drivers/postgres/postgres-query-builder.mjs +1 -1
- package/esm/drivers/postgres/postgres-query-parser.d.mts +1 -1
- package/esm/drivers/postgres/postgres-query-parser.mjs +1 -1
- package/esm/drivers/postgres/postgres-sql-serializer.mjs +1 -1
- package/esm/drivers/postgres/postgres-sync-adapter.d.mts +1 -1
- package/esm/drivers/postgres/postgres-sync-adapter.mjs +1 -1
- package/esm/drivers/postgres/types.d.mts +1 -1
- package/esm/drivers/sql/sql-dialect.contract.d.mts +1 -1
- package/esm/drivers/sql/sql-types.d.mts +1 -1
- package/esm/errors/missing-data-source.error.d.mts +1 -1
- package/esm/errors/missing-data-source.error.mjs +1 -1
- package/esm/errors/transaction-rollback.error.d.mts +1 -1
- package/esm/errors/transaction-rollback.error.mjs +1 -1
- package/esm/events/model-events.d.mts +1 -1
- package/esm/events/model-events.mjs +1 -1
- package/esm/expressions/aggregate-expressions.d.mts +1 -1
- package/esm/expressions/aggregate-expressions.mjs +1 -1
- package/esm/index.d.mts +3 -1
- package/esm/migration/column-builder.d.mts +1 -1
- package/esm/migration/column-builder.mjs +1 -1
- package/esm/migration/column-helpers.d.mts +1 -1
- package/esm/migration/column-helpers.mjs +1 -1
- package/esm/migration/foreign-key-builder.d.mts +1 -1
- package/esm/migration/foreign-key-builder.mjs +1 -1
- package/esm/migration/migration-runner.d.mts +1 -1
- package/esm/migration/migration-runner.mjs +1 -1
- package/esm/migration/migration.d.mts +1 -1
- package/esm/migration/migration.mjs +1 -1
- package/esm/migration/sql-grammar.mjs +1 -1
- package/esm/migration/sql-serializer.d.mts +1 -1
- package/esm/migration/sql-serializer.mjs +1 -1
- package/esm/migration/types.d.mts +1 -1
- package/esm/model/methods/accessor-methods.mjs +1 -1
- package/esm/model/methods/delete-methods.mjs +1 -1
- package/esm/model/methods/dirty-methods.mjs +1 -1
- package/esm/model/methods/hydration-methods.mjs +1 -1
- package/esm/model/methods/instance-event-methods.mjs +1 -1
- package/esm/model/methods/meta-methods.mjs +1 -1
- package/esm/model/methods/pivot-methods.mjs +1 -1
- package/esm/model/methods/query-methods.mjs +1 -1
- package/esm/model/methods/restore-methods.mjs +1 -1
- package/esm/model/methods/scope-methods.mjs +1 -1
- package/esm/model/methods/serialization-methods.mjs +1 -1
- package/esm/model/methods/static-event-methods.mjs +1 -1
- package/esm/model/methods/write-methods.mjs +1 -1
- package/esm/model/model.d.mts +1 -1
- package/esm/model/model.mjs +1 -1
- package/esm/model/model.types.d.mts +1 -1
- package/esm/model/register-model.d.mts +1 -1
- package/esm/model/register-model.mjs +1 -1
- package/esm/model/relation-decorators.d.mts +1 -1
- package/esm/model/relation-decorators.mjs +1 -1
- package/esm/operations/database.d.mts +1 -1
- package/esm/operations/database.mjs +1 -1
- package/esm/operations/migrations.d.mts +1 -1
- package/esm/operations/migrations.mjs +1 -1
- package/esm/query-builder/query-builder.d.mts +1 -1
- package/esm/query-builder/query-builder.mjs +1 -1
- package/esm/relations/key-conventions.mjs +1 -1
- package/esm/relations/pivot-operations.d.mts +1 -1
- package/esm/relations/pivot-operations.mjs +1 -1
- package/esm/relations/relation-hydrator.d.mts +1 -1
- package/esm/relations/relation-hydrator.mjs +1 -1
- package/esm/relations/relation-loader.d.mts +1 -1
- package/esm/relations/relation-loader.mjs +1 -1
- package/esm/relations/types.d.mts +1 -1
- package/esm/remover/database-remover.d.mts +1 -1
- package/esm/remover/database-remover.mjs +1 -1
- package/esm/restorer/database-restorer.d.mts +1 -1
- package/esm/restorer/database-restorer.mjs +1 -1
- package/esm/sql-database-dirty-tracker.d.mts +1 -1
- package/esm/sql-database-dirty-tracker.mjs +1 -1
- package/esm/sync/model-events.mjs +1 -1
- package/esm/sync/model-sync-operation.d.mts +1 -1
- package/esm/sync/model-sync-operation.mjs +1 -1
- package/esm/sync/model-sync.d.mts +1 -1
- package/esm/sync/model-sync.mjs +1 -1
- package/esm/sync/sync-context.d.mts +1 -1
- package/esm/sync/sync-context.mjs +1 -1
- package/esm/sync/sync-manager.d.mts +1 -1
- package/esm/sync/sync-manager.mjs +1 -1
- package/esm/sync/types.d.mts +1 -1
- package/esm/types.d.mts +1 -1
- package/esm/utils/connect-to-database.d.mts +1 -1
- package/esm/utils/connect-to-database.mjs +1 -1
- package/esm/utils/database-writer.utils.d.mts +1 -1
- package/esm/utils/database-writer.utils.mjs +1 -1
- package/esm/utils/define-model.d.mts +1 -1
- package/esm/utils/define-model.mjs +1 -1
- package/esm/utils/is-valid-date-value.mjs +1 -1
- package/esm/utils/once-connected.d.mts +1 -1
- package/esm/utils/once-connected.mjs +1 -1
- package/esm/validation/database-seal-plugins.mjs +1 -1
- package/esm/validation/database-writer-validation-error.d.mts +1 -1
- package/esm/validation/database-writer-validation-error.mjs +1 -1
- package/esm/validation/mutators/embed-mutator.mjs +1 -1
- package/esm/validation/plugins/database-rules-plugin.d.mts +1 -1
- package/esm/validation/plugins/database-rules-plugin.mjs +1 -1
- package/esm/validation/plugins/embed-validator-plugin.d.mts +1 -1
- package/esm/validation/plugins/embed-validator-plugin.mjs +1 -1
- package/esm/validation/rules/database-model-rule.mjs +1 -1
- package/esm/validation/rules/exists-rule.mjs +1 -1
- package/esm/validation/rules/unique-rule.mjs +1 -1
- package/esm/validation/transformers/embed-model-transformer.mjs +1 -1
- package/esm/validation/types.d.mts +1 -1
- package/esm/validation/validators/embed-validator.d.mts +1 -1
- package/esm/validation/validators/embed-validator.mjs +1 -1
- package/esm/writer/database-writer.d.mts +1 -1
- package/esm/writer/database-writer.mjs +1 -1
- package/package.json +4 -4
|
@@ -3,7 +3,7 @@ import { loadMigrations } from "../load-migrations.mjs";
|
|
|
3
3
|
import { withCliConnection } from "../with-cli-connection.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../@warlock.js/cascade/src/cli/commands/migrate-export-sql.ts
|
|
7
7
|
/**
|
|
8
8
|
* `cascade migrate:export-sql` — write phase-ordered `.up.sql` /
|
|
9
9
|
* `.down.sql` files for the registered migrations under
|
|
@@ -3,7 +3,7 @@ import { printExecutedMigrations } from "../printers.mjs";
|
|
|
3
3
|
import { withCliConnection } from "../with-cli-connection.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../@warlock.js/cascade/src/cli/commands/migrate-list.ts
|
|
7
7
|
/**
|
|
8
8
|
* `cascade migrate:list` — print every migration that has been executed
|
|
9
9
|
* against the configured data source. Reads the migrations table directly;
|
|
@@ -4,7 +4,7 @@ import { printRunSummary } from "../printers.mjs";
|
|
|
4
4
|
import { withCliConnection } from "../with-cli-connection.mjs";
|
|
5
5
|
import { defineCommand } from "citty";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../@warlock.js/cascade/src/cli/commands/migrate-rollback.ts
|
|
8
8
|
/**
|
|
9
9
|
* `cascade migrate:rollback` — undo the most recent batch (or every executed
|
|
10
10
|
* migration with `--all`). Migration files are loaded so the runner has the
|
|
@@ -4,7 +4,7 @@ import { printRunSummary } from "../printers.mjs";
|
|
|
4
4
|
import { withCliConnection } from "../with-cli-connection.mjs";
|
|
5
5
|
import { defineCommand } from "citty";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../@warlock.js/cascade/src/cli/commands/migrate.ts
|
|
8
8
|
/**
|
|
9
9
|
* `cascade migrate` — run all pending migrations against the configured
|
|
10
10
|
* data source. With `--fresh` rolls back everything first and re-runs;
|
|
@@ -2,7 +2,7 @@ import { dataSourceRegistry } from "../data-source/data-source-registry.mjs";
|
|
|
2
2
|
import { MongoDbDriver } from "../drivers/mongodb/mongodb-driver.mjs";
|
|
3
3
|
import { PostgresDriver } from "../drivers/postgres/postgres-driver.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/cascade/src/cli/connection-from-env.ts
|
|
6
6
|
const VALID_PRIMARY_KEYS = [
|
|
7
7
|
"uuid",
|
|
8
8
|
"int",
|
package/esm/cli/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { migrateListCommand } from "./commands/migrate-list.mjs";
|
|
|
4
4
|
import { migrateRollbackCommand } from "./commands/migrate-rollback.mjs";
|
|
5
5
|
import { defineCommand } from "citty";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../@warlock.js/cascade/src/cli/index.ts
|
|
8
8
|
/**
|
|
9
9
|
* Root command for the standalone `cascade` CLI binary. Scope is restricted
|
|
10
10
|
* to migration operations — database management (`db:create` etc.) stays in
|
|
@@ -3,7 +3,7 @@ import path from "path";
|
|
|
3
3
|
import fastGlob from "fast-glob";
|
|
4
4
|
import { pathToFileURL } from "url";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../@warlock.js/cascade/src/cli/load-migrations.ts
|
|
7
7
|
const DEFAULT_PATTERN = "./migrations/**/*.{ts,js,mjs,cjs}";
|
|
8
8
|
/**
|
|
9
9
|
* Resolve the migration name from a filename. Mirrors warlock-core's
|
package/esm/cli/printers.mjs
CHANGED
package/esm/cli/setup-logger.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { dataSourceRegistry } from "../data-source/data-source-registry.mjs";
|
|
2
2
|
import { connectFromEnv } from "./connection-from-env.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/cascade/src/cli/with-cli-connection.ts
|
|
5
5
|
/**
|
|
6
6
|
* Run a CLI handler with a live data-source connection.
|
|
7
7
|
*
|
package/esm/cli.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { setLoggerConfig } from "./cli/setup-logger.mjs";
|
|
|
3
3
|
import { loadEnv } from "@mongez/dotenv";
|
|
4
4
|
import { runMain } from "citty";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../@warlock.js/cascade/src/cli.ts
|
|
7
7
|
/**
|
|
8
8
|
* Standalone Cascade CLI entrypoint.
|
|
9
9
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataSource } from "../data-source/data-source.mjs";
|
|
2
2
|
import { Context } from "@warlock.js/context";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/cascade/src/context/database-data-source-context.d.ts
|
|
5
5
|
type DataSourceContextValue = string | DataSource;
|
|
6
6
|
type DataSourceContextStore = {
|
|
7
7
|
dataSource?: DataSourceContextValue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from "@warlock.js/context";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/cascade/src/context/database-transaction-context.d.ts
|
|
4
4
|
interface TransactionContextStore {
|
|
5
5
|
session?: unknown;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context, contextManager } from "@warlock.js/context";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/cascade/src/context/database-transaction-context.ts
|
|
4
4
|
/**
|
|
5
5
|
* Database Transaction Context
|
|
6
6
|
*
|
|
@@ -7,7 +7,7 @@ import { SQLSerializer } from "../migration/sql-serializer.mjs";
|
|
|
7
7
|
import { QueryBuilderContract } from "./query-builder.contract.mjs";
|
|
8
8
|
import { SyncAdapterContract } from "./sync-adapter.contract.mjs";
|
|
9
9
|
|
|
10
|
-
//#region
|
|
10
|
+
//#region ../@warlock.js/cascade/src/contracts/database-driver.contract.d.ts
|
|
11
11
|
/** Supported driver lifecycle events. */
|
|
12
12
|
type DriverEvent = "connected" | "disconnected" | string;
|
|
13
13
|
/** Listener signature for driver lifecycle events. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeleteStrategy } from "../types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/cascade/src/contracts/database-remover.contract.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Remover service contract for deleting models from the database.
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Model } from "../model/model.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/cascade/src/contracts/database-restorer.contract.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Restorer service contract for restoring deleted models from the database.
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UpdateOperations } from "./database-driver.contract.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/cascade/src/contracts/database-writer.contract.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Writer service contract for persisting models to the database.
|
|
6
6
|
*
|
|
@@ -3,7 +3,7 @@ import { TableIndexInformation } from "./driver-blueprint.contract.mjs";
|
|
|
3
3
|
import { DriverContract } from "./database-driver.contract.mjs";
|
|
4
4
|
import { DataSource } from "../data-source/data-source.mjs";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../@warlock.js/cascade/src/contracts/migration-driver.contract.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Column data types supported across all database drivers.
|
|
9
9
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GlobalScopeDefinition, LocalScopeCallback } from "../model/model.types.mjs";
|
|
2
|
-
//#region
|
|
2
|
+
//#region ../@warlock.js/cascade/src/contracts/query-builder.contract.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Ordering direction supported by query builders.
|
|
5
5
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataSource, DataSourceOptions } from "./data-source.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/cascade/src/data-source/data-source-registry.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Event types emitted by the DataSourceRegistry.
|
|
6
6
|
*
|
|
@@ -3,7 +3,7 @@ import { DataSource } from "./data-source.mjs";
|
|
|
3
3
|
import { MissingDataSourceError } from "../errors/missing-data-source.error.mjs";
|
|
4
4
|
import { EventEmitter } from "node:events";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../@warlock.js/cascade/src/data-source/data-source-registry.ts
|
|
7
7
|
/** Maintains registry of named data sources. */
|
|
8
8
|
var DataSourceRegistry = class {
|
|
9
9
|
sources = /* @__PURE__ */ new Map();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DeleteStrategy, MigrationDefaults, ModelDefaults, RelationDefaults } from "../types.mjs";
|
|
2
2
|
import { DriverContract } from "../contracts/database-driver.contract.mjs";
|
|
3
3
|
import { IdGeneratorContract } from "../contracts/database-id-generator.contract.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/cascade/src/data-source/data-source.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Configuration options used when registering a data source.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { areEqual, clone } from "@mongez/reinforcements";
|
|
2
2
|
import { isPlainObject } from "@mongez/supportive-is";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/cascade/src/database-dirty-tracker.ts
|
|
5
5
|
function canBeFlatten(object) {
|
|
6
6
|
return isPlainObject(object);
|
|
7
7
|
}
|
|
@@ -10,7 +10,7 @@ import { IdGeneratorContract } from "../../contracts/database-id-generator.contr
|
|
|
10
10
|
import { MongoDriverOptions } from "./types.mjs";
|
|
11
11
|
import { ClientSession, Db, MongoClient, MongoClientOptions } from "mongodb";
|
|
12
12
|
|
|
13
|
-
//#region
|
|
13
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-driver.d.ts
|
|
14
14
|
declare function isMongoDBDriverLoaded(): boolean | null;
|
|
15
15
|
/**
|
|
16
16
|
* MongoDB driver implementation that fulfils the Cascade driver contract.
|
|
@@ -12,7 +12,7 @@ import { EventEmitter } from "node:events";
|
|
|
12
12
|
import { colors } from "@mongez/copper";
|
|
13
13
|
import { log } from "@warlock.js/logger";
|
|
14
14
|
|
|
15
|
-
//#region
|
|
15
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-driver.ts
|
|
16
16
|
const DEFAULT_TRANSACTION_OPTIONS = {
|
|
17
17
|
readPreference: "primary",
|
|
18
18
|
readConcern: { level: "local" },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GenerateIdOptions, IdGeneratorContract } from "../../contracts/database-id-generator.contract.mjs";
|
|
2
2
|
import { MongoDbDriver } from "./mongodb-driver.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-id-generator.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* MongoDB-specific ID generator for auto-incrementing integer IDs.
|
|
7
7
|
*
|
|
@@ -3,7 +3,7 @@ import { TableIndexInformation } from "../../contracts/driver-blueprint.contract
|
|
|
3
3
|
import { ColumnDefinition, ForeignKeyDefinition, FullTextIndexOptions, GeoIndexOptions, IndexDefinition, MigrationDriverContract, VectorIndexOptions } from "../../contracts/migration-driver.contract.mjs";
|
|
4
4
|
import { MongoDbDriver } from "./mongodb-driver.mjs";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-migration-driver.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* MongoDB-specific migration driver implementation.
|
|
9
9
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { databaseTransactionContext } from "../../context/database-transaction-context.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-migration-driver.ts
|
|
4
4
|
/**
|
|
5
5
|
* MongoDB-specific migration driver implementation.
|
|
6
6
|
*
|
|
@@ -7,7 +7,7 @@ import { MongoQueryParser } from "./mongodb-query-parser.mjs";
|
|
|
7
7
|
import { GenericObject } from "@mongez/reinforcements";
|
|
8
8
|
import { Collection } from "mongodb";
|
|
9
9
|
|
|
10
|
-
//#region
|
|
10
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-query-builder.d.ts
|
|
11
11
|
/**
|
|
12
12
|
* MongoDB-specific query builder implementation using aggregation pipeline.
|
|
13
13
|
*/
|
|
@@ -5,7 +5,7 @@ import { MongoQueryOperations } from "./mongodb-query-operations.mjs";
|
|
|
5
5
|
import { MongoQueryParser } from "./mongodb-query-parser.mjs";
|
|
6
6
|
import { get } from "@mongez/reinforcements";
|
|
7
7
|
|
|
8
|
-
//#region
|
|
8
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-query-builder.ts
|
|
9
9
|
/**
|
|
10
10
|
* MongoDB-specific query builder implementation using aggregation pipeline.
|
|
11
11
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Operation, PipelineStage } from "./types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-query-operations.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Helper class for constructing MongoDB aggregation pipeline operations.
|
|
6
6
|
*
|
|
@@ -2,7 +2,7 @@ import { Operation } from "./types.mjs";
|
|
|
2
2
|
import { MongoQueryBuilder } from "./mongodb-query-builder.mjs";
|
|
3
3
|
import { Collection } from "mongodb";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-query-parser.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Options for configuring the MongoDB query parser.
|
|
8
8
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isAggregateExpression } from "../../expressions/aggregate-expressions.mjs";
|
|
2
2
|
import { colors } from "@mongez/copper";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-query-parser.ts
|
|
5
5
|
/**
|
|
6
6
|
* Parses query builder operations into MongoDB aggregation pipeline.
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SyncAdapterContract, SyncInstruction } from "../../contracts/sync-adapter.contract.mjs";
|
|
2
2
|
import { MongoDbDriver } from "./mongodb-driver.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-sync-adapter.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* MongoDB implementation of the sync adapter.
|
|
7
7
|
* Handles array updates using positional operators and arrayFilters.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region ../@warlock.js/cascade/src/drivers/mongodb/mongodb-sync-adapter.ts
|
|
2
2
|
/**
|
|
3
3
|
* MongoDB implementation of the sync adapter.
|
|
4
4
|
* Handles array updates using positional operators and arrayFilters.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DriverBlueprintContract, TableIndexInformation } from "../../contracts/driver-blueprint.contract.mjs";
|
|
2
2
|
import { PostgresDriver } from "./postgres-driver.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/cascade/src/drivers/postgres/postgres-blueprint.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* PostgreSQL Blueprint.
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AggregateExpression } from "../../expressions/aggregate-expressions.mjs";
|
|
2
2
|
import { SqlDialectContract } from "../sql/sql-dialect.contract.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/cascade/src/drivers/postgres/postgres-dialect.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* PostgreSQL-specific SQL dialect implementation.
|
|
7
7
|
*
|
|
@@ -10,7 +10,7 @@ import { SqlDatabaseDirtyTracker } from "../../sql-database-dirty-tracker.mjs";
|
|
|
10
10
|
import { PostgresDialect } from "./postgres-dialect.mjs";
|
|
11
11
|
import { PostgresPoolConfig, PostgresQueryResult, PostgresTransactionOptions } from "./types.mjs";
|
|
12
12
|
|
|
13
|
-
//#region
|
|
13
|
+
//#region ../@warlock.js/cascade/src/drivers/postgres/postgres-driver.d.ts
|
|
14
14
|
/**
|
|
15
15
|
* Lazily loaded pg module types.
|
|
16
16
|
*/
|
|
@@ -11,7 +11,7 @@ import { PostgresSyncAdapter } from "./postgres-sync-adapter.mjs";
|
|
|
11
11
|
import { colors } from "@mongez/copper";
|
|
12
12
|
import { log } from "@warlock.js/logger";
|
|
13
13
|
|
|
14
|
-
//#region
|
|
14
|
+
//#region ../@warlock.js/cascade/src/drivers/postgres/postgres-driver.ts
|
|
15
15
|
/**
|
|
16
16
|
* PostgreSQL Driver
|
|
17
17
|
*
|
|
@@ -3,7 +3,7 @@ import { TableIndexInformation } from "../../contracts/driver-blueprint.contract
|
|
|
3
3
|
import { ColumnDefinition, ForeignKeyDefinition, FullTextIndexOptions, GeoIndexOptions, IndexDefinition, MigrationDriverContract, VectorIndexOptions } from "../../contracts/migration-driver.contract.mjs";
|
|
4
4
|
import { PostgresDriver } from "./postgres-driver.mjs";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../@warlock.js/cascade/src/drivers/postgres/postgres-migration-driver.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* PostgreSQL Migration Driver.
|
|
9
9
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { databaseTransactionContext } from "../../context/database-transaction-context.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/cascade/src/drivers/postgres/postgres-migration-driver.ts
|
|
4
4
|
/**
|
|
5
5
|
* PostgreSQL Migration Driver
|
|
6
6
|
*
|
|
@@ -4,7 +4,7 @@ import { ModelRef } from "../../model/register-model.mjs";
|
|
|
4
4
|
import { Op, QueryBuilder } from "../../query-builder/query-builder.mjs";
|
|
5
5
|
import { GenericObject } from "@mongez/reinforcements";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../@warlock.js/cascade/src/drivers/postgres/postgres-query-builder.d.ts
|
|
8
8
|
type JoinRelationConfig = {
|
|
9
9
|
alias: string;
|
|
10
10
|
type: "belongsTo" | "hasOne" | "hasMany";
|
|
@@ -6,7 +6,7 @@ import { isAggregateExpression } from "../../expressions/aggregate-expressions.m
|
|
|
6
6
|
import { QueryBuilder } from "../../query-builder/query-builder.mjs";
|
|
7
7
|
import { PostgresQueryParser } from "./postgres-query-parser.mjs";
|
|
8
8
|
|
|
9
|
-
//#region
|
|
9
|
+
//#region ../@warlock.js/cascade/src/drivers/postgres/postgres-query-builder.ts
|
|
10
10
|
/**
|
|
11
11
|
* Cast an Op[] to PostgresParserOperation[] — the shapes are compatible since
|
|
12
12
|
* both have `type: string` and `data: Record<string, unknown>`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DriverQuery } from "../../contracts/query-builder.contract.mjs";
|
|
2
2
|
import { SqlDialectContract } from "../sql/sql-dialect.contract.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/cascade/src/drivers/postgres/postgres-query-parser.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Operation types supported by the query parser.
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SQLSerializer } from "../../migration/sql-serializer.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/cascade/src/drivers/postgres/postgres-sql-serializer.ts
|
|
4
4
|
/**
|
|
5
5
|
* PostgreSQL-specific SQL serializer.
|
|
6
6
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SyncAdapterContract, SyncInstruction } from "../../contracts/sync-adapter.contract.mjs";
|
|
2
2
|
import { PostgresDriver } from "./postgres-driver.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/cascade/src/drivers/postgres/postgres-sync-adapter.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* PostgreSQL Sync Adapter.
|
|
7
7
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AggregateExpression } from "../../expressions/aggregate-expressions.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/cascade/src/drivers/sql/sql-dialect.contract.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Contract that SQL dialects must implement to handle database-specific
|
|
6
6
|
* SQL syntax variations.
|