drizzle-orm 1.0.0-beta.22-d23690d → 1.0.0-beta.23
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/_relations.cjs +1 -1
- package/_relations.js +1 -1
- package/alias.cjs +2 -2
- package/alias.js +2 -2
- package/arktype/column.cjs +1 -1
- package/arktype/column.js +1 -1
- package/arktype/schema.cjs +1 -1
- package/arktype/schema.js +1 -1
- package/arktype/schema.types.internal.d.ts +1 -1
- package/aws-data-api/common/index.d.cts +1 -1
- package/aws-data-api/common/index.d.ts +1 -1
- package/aws-data-api/pg/driver.cjs +2 -2
- package/aws-data-api/pg/driver.d.ts +3 -3
- package/aws-data-api/pg/driver.js +3 -3
- package/aws-data-api/pg/driver.js.map +1 -1
- package/aws-data-api/pg/migrator.cjs +1 -1
- package/aws-data-api/pg/migrator.js +1 -1
- package/aws-data-api/pg/session.d.ts +1 -1
- package/better-sqlite3/session.d.ts +1 -1
- package/bun-sql/driver.d.ts +1 -1
- package/bun-sql/mysql/driver.cjs +1 -1
- package/bun-sql/mysql/driver.d.ts +1 -1
- package/bun-sql/mysql/driver.js +1 -1
- package/bun-sql/mysql/session.cjs +1 -1
- package/bun-sql/mysql/session.d.ts +1 -1
- package/bun-sql/mysql/session.js +1 -1
- package/bun-sql/postgres/driver.d.ts +1 -1
- package/bun-sql/postgres/migrator.cjs +1 -1
- package/bun-sql/postgres/migrator.js +1 -1
- package/bun-sql/postgres/session.cjs +1 -1
- package/bun-sql/postgres/session.d.ts +2 -2
- package/bun-sql/postgres/session.js +1 -1
- package/bun-sql/sqlite/driver.cjs +1 -1
- package/bun-sql/sqlite/driver.d.ts +1 -1
- package/bun-sql/sqlite/driver.js +1 -1
- package/bun-sql/sqlite/session.cjs +1 -1
- package/bun-sql/sqlite/session.d.ts +2 -2
- package/bun-sql/sqlite/session.js +1 -1
- package/cache/core/cache-effect.cjs +2 -2
- package/cache/core/cache-effect.d.ts +1 -1
- package/cache/core/cache-effect.js +1 -1
- package/cockroach/driver.cjs +1 -1
- package/cockroach/driver.d.ts +1 -1
- package/cockroach/driver.js +1 -1
- package/cockroach/session.cjs +1 -1
- package/cockroach/session.d.ts +1 -1
- package/cockroach/session.js +1 -1
- package/cockroach-core/columns/char.d.ts +1 -1
- package/cockroach-core/columns/common.d.ts +2 -2
- package/cockroach-core/columns/custom.d.ts +1 -1
- package/cockroach-core/columns/date.d.ts +1 -1
- package/cockroach-core/columns/decimal.d.ts +1 -1
- package/cockroach-core/columns/enum.d.ts +1 -1
- package/cockroach-core/columns/geometry.d.ts +1 -1
- package/cockroach-core/columns/string.d.ts +1 -1
- package/cockroach-core/columns/timestamp.d.ts +1 -1
- package/cockroach-core/columns/varchar.d.ts +1 -1
- package/cockroach-core/db.cjs +1 -1
- package/cockroach-core/db.d.ts +3 -3
- package/cockroach-core/db.js +1 -1
- package/cockroach-core/dialect.cjs +5 -5
- package/cockroach-core/dialect.d.ts +2 -2
- package/cockroach-core/dialect.js +5 -5
- package/cockroach-core/index.cjs +12 -12
- package/cockroach-core/index.js +12 -12
- package/cockroach-core/query-builders/delete.cjs +1 -1
- package/cockroach-core/query-builders/delete.d.ts +2 -2
- package/cockroach-core/query-builders/delete.js +1 -1
- package/cockroach-core/query-builders/index.cjs +2 -2
- package/cockroach-core/query-builders/index.js +2 -2
- package/cockroach-core/query-builders/insert.cjs +1 -1
- package/cockroach-core/query-builders/insert.d.ts +2 -2
- package/cockroach-core/query-builders/insert.js +1 -1
- package/cockroach-core/query-builders/query-builder.d.ts +1 -1
- package/cockroach-core/query-builders/select.cjs +4 -4
- package/cockroach-core/query-builders/select.d.ts +3 -3
- package/cockroach-core/query-builders/select.js +4 -4
- package/cockroach-core/query-builders/select.types.d.ts +1 -1
- package/cockroach-core/query-builders/update.cjs +3 -3
- package/cockroach-core/query-builders/update.d.ts +3 -3
- package/cockroach-core/query-builders/update.js +3 -3
- package/cockroach-core/schema.cjs +1 -1
- package/cockroach-core/schema.js +1 -1
- package/cockroach-core/subquery.d.ts +1 -1
- package/cockroach-core/utils.cjs +4 -4
- package/cockroach-core/utils.js +4 -4
- package/cockroach-core/view.cjs +1 -1
- package/cockroach-core/view.js +1 -1
- package/column.cjs +1 -1
- package/column.js +1 -1
- package/d1/session.d.ts +1 -1
- package/durable-sqlite/migrator.cjs +1 -1
- package/durable-sqlite/migrator.js +1 -1
- package/effect-core/index.cjs +1 -1
- package/effect-core/index.js +1 -1
- package/effect-postgres/driver.cjs +2 -2
- package/effect-postgres/driver.d.cts +1 -1
- package/effect-postgres/driver.d.ts +3 -3
- package/effect-postgres/driver.js +2 -2
- package/effect-postgres/migrator.d.cts +1 -1
- package/effect-postgres/migrator.d.ts +1 -1
- package/effect-postgres/session.cjs +1 -1
- package/effect-postgres/session.d.ts +5 -5
- package/effect-postgres/session.js +1 -1
- package/effect-schema/column.cjs +1 -1
- package/effect-schema/column.d.ts +8 -8
- package/effect-schema/column.js +1 -1
- package/effect-schema/column.types.d.ts +15 -15
- package/effect-schema/schema.cjs +1 -1
- package/effect-schema/schema.js +1 -1
- package/effect-schema/schema.types.internal.d.ts +8 -8
- package/expo-sqlite/driver.d.ts +1 -1
- package/expo-sqlite/index.cjs +1 -1
- package/expo-sqlite/index.js +1 -1
- package/expo-sqlite/query.cjs +1 -1
- package/expo-sqlite/query.js +1 -1
- package/expo-sqlite/session.d.ts +1 -1
- package/gel/driver.cjs +1 -1
- package/gel/driver.d.ts +2 -2
- package/gel/driver.js +1 -1
- package/gel/session.cjs +1 -1
- package/gel/session.d.ts +2 -2
- package/gel/session.js +1 -1
- package/gel-core/columns/common.d.ts +1 -1
- package/gel-core/columns/custom.d.ts +1 -1
- package/gel-core/columns/timestamp.d.ts +1 -1
- package/gel-core/db.cjs +1 -1
- package/gel-core/db.d.ts +5 -5
- package/gel-core/db.js +1 -1
- package/gel-core/dialect.cjs +4 -4
- package/gel-core/dialect.d.ts +1 -1
- package/gel-core/dialect.js +4 -4
- package/gel-core/index.cjs +7 -7
- package/gel-core/index.js +7 -7
- package/gel-core/query-builders/delete.cjs +1 -1
- package/gel-core/query-builders/delete.d.ts +3 -3
- package/gel-core/query-builders/delete.js +1 -1
- package/gel-core/query-builders/insert.cjs +1 -1
- package/gel-core/query-builders/insert.d.ts +3 -3
- package/gel-core/query-builders/insert.js +1 -1
- package/gel-core/query-builders/query-builder.cjs +1 -1
- package/gel-core/query-builders/query-builder.d.ts +2 -2
- package/gel-core/query-builders/query-builder.js +1 -1
- package/gel-core/query-builders/query.cjs +1 -1
- package/gel-core/query-builders/query.js +1 -1
- package/gel-core/query-builders/refresh-materialized-view.d.ts +1 -1
- package/gel-core/query-builders/select.cjs +3 -3
- package/gel-core/query-builders/select.d.ts +3 -3
- package/gel-core/query-builders/select.js +3 -3
- package/gel-core/query-builders/select.types.d.ts +1 -1
- package/gel-core/query-builders/update.cjs +2 -2
- package/gel-core/query-builders/update.d.ts +4 -4
- package/gel-core/query-builders/update.js +2 -2
- package/gel-core/session.d.ts +1 -1
- package/gel-core/subquery.d.ts +1 -1
- package/gel-core/utils.cjs +5 -5
- package/gel-core/utils.d.ts +1 -1
- package/gel-core/utils.js +5 -5
- package/index.cjs +7 -7
- package/index.js +7 -7
- package/libsql/session.d.ts +1 -1
- package/mssql-core/columns/char.d.ts +1 -1
- package/mssql-core/columns/common.d.ts +2 -2
- package/mssql-core/columns/custom.d.ts +1 -1
- package/mssql-core/columns/date.d.ts +1 -1
- package/mssql-core/columns/datetime.d.ts +1 -1
- package/mssql-core/columns/datetime2.d.ts +1 -1
- package/mssql-core/columns/datetimeoffset.d.ts +1 -1
- package/mssql-core/columns/decimal.d.ts +1 -1
- package/mssql-core/columns/numeric.d.ts +1 -1
- package/mssql-core/columns/text.d.ts +1 -1
- package/mssql-core/columns/time.d.ts +1 -1
- package/mssql-core/columns/varchar.d.ts +1 -1
- package/mssql-core/db.cjs +1 -1
- package/mssql-core/db.d.ts +1 -1
- package/mssql-core/db.js +1 -1
- package/mssql-core/dialect.cjs +5 -5
- package/mssql-core/dialect.d.ts +1 -1
- package/mssql-core/dialect.js +5 -5
- package/mssql-core/index.cjs +13 -13
- package/mssql-core/index.js +13 -13
- package/mssql-core/query-builders/query-builder.d.ts +2 -2
- package/mssql-core/query-builders/select.cjs +2 -2
- package/mssql-core/query-builders/select.d.ts +2 -2
- package/mssql-core/query-builders/select.js +2 -2
- package/mssql-core/query-builders/select.types.d.ts +1 -1
- package/mssql-core/query-builders/update.d.ts +2 -2
- package/mssql-core/subquery.d.ts +1 -1
- package/mssql-core/utils.cjs +4 -4
- package/mssql-core/utils.js +4 -4
- package/mssql-core/view.cjs +2 -2
- package/mssql-core/view.js +2 -2
- package/mysql-core/columns/bigint.d.ts +1 -1
- package/mysql-core/columns/blob.d.ts +1 -1
- package/mysql-core/columns/char.d.ts +1 -1
- package/mysql-core/columns/common.d.ts +1 -1
- package/mysql-core/columns/custom.d.ts +1 -1
- package/mysql-core/columns/date.d.ts +1 -1
- package/mysql-core/columns/datetime.d.ts +1 -1
- package/mysql-core/columns/decimal.d.ts +1 -1
- package/mysql-core/columns/double.d.ts +1 -1
- package/mysql-core/columns/enum.d.ts +1 -1
- package/mysql-core/columns/float.d.ts +1 -1
- package/mysql-core/columns/int.d.ts +1 -1
- package/mysql-core/columns/mediumint.d.ts +1 -1
- package/mysql-core/columns/smallint.d.ts +1 -1
- package/mysql-core/columns/text.d.ts +1 -1
- package/mysql-core/columns/timestamp.d.ts +1 -1
- package/mysql-core/columns/tinyint.d.ts +1 -1
- package/mysql-core/columns/varchar.d.ts +1 -1
- package/mysql-core/db.cjs +1 -1
- package/mysql-core/db.d.ts +2 -2
- package/mysql-core/db.js +1 -1
- package/mysql-core/dialect.cjs +6 -6
- package/mysql-core/dialect.d.ts +1 -1
- package/mysql-core/dialect.js +6 -6
- package/mysql-core/index.cjs +6 -6
- package/mysql-core/index.js +6 -6
- package/mysql-core/query-builders/delete.d.ts +1 -1
- package/mysql-core/query-builders/insert.d.ts +1 -1
- package/mysql-core/query-builders/select.cjs +4 -4
- package/mysql-core/query-builders/select.d.ts +2 -2
- package/mysql-core/query-builders/select.js +4 -4
- package/mysql-core/query-builders/select.types.d.ts +2 -2
- package/mysql-core/query-builders/update.d.ts +2 -2
- package/mysql-core/subquery.d.ts +1 -1
- package/mysql-core/utils.cjs +5 -5
- package/mysql-core/utils.d.ts +1 -1
- package/mysql-core/utils.js +5 -5
- package/mysql-core/view.cjs +1 -1
- package/mysql-core/view.js +1 -1
- package/mysql-proxy/session.cjs +2 -2
- package/mysql-proxy/session.d.ts +12 -12
- package/mysql-proxy/session.js +6 -6
- package/mysql-proxy/session.js.map +1 -1
- package/mysql2/driver.d.ts +1 -1
- package/mysql2/session.cjs +1 -1
- package/mysql2/session.d.ts +1 -1
- package/mysql2/session.js +1 -1
- package/neon-http/driver.d.ts +2 -2
- package/neon-http/session.d.ts +2 -2
- package/neon-serverless/driver.d.ts +2 -2
- package/neon-serverless/migrator.cjs +1 -1
- package/neon-serverless/migrator.js +1 -1
- package/neon-serverless/session.d.ts +2 -2
- package/netlify-db/driver.d.ts +2 -2
- package/netlify-db/migrator.cjs +1 -1
- package/netlify-db/migrator.js +1 -1
- package/netlify-db/session.d.ts +2 -2
- package/node-mssql/driver.cjs +1 -1
- package/node-mssql/driver.d.ts +1 -1
- package/node-mssql/driver.js +1 -1
- package/node-postgres/driver.cjs +1 -1
- package/node-postgres/driver.js +1 -1
- package/node-postgres/migrator.cjs +1 -1
- package/node-postgres/migrator.js +1 -1
- package/node-postgres/session.cjs +1 -1
- package/node-postgres/session.d.ts +1 -1
- package/node-postgres/session.js +1 -1
- package/node-sqlite/driver.d.ts +1 -1
- package/node-sqlite/session.d.ts +1 -1
- package/op-sqlite/session.d.ts +1 -1
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +4744 -4744
- package/pg-core/async/db.cjs +1 -1
- package/pg-core/async/db.d.ts +3 -3
- package/pg-core/async/db.js +1 -1
- package/pg-core/async/delete.cjs +2 -2
- package/pg-core/async/delete.js +2 -2
- package/pg-core/async/insert.cjs +1 -1
- package/pg-core/async/insert.js +1 -1
- package/pg-core/async/query.cjs +2 -2
- package/pg-core/async/query.js +2 -2
- package/pg-core/async/refresh-materialized-view.cjs +1 -1
- package/pg-core/async/refresh-materialized-view.js +1 -1
- package/pg-core/async/select.cjs +1 -1
- package/pg-core/async/select.js +1 -1
- package/pg-core/async/session.cjs +3 -3
- package/pg-core/async/session.d.ts +1 -1
- package/pg-core/async/session.js +3 -3
- package/pg-core/async/update.d.ts +1 -1
- package/pg-core/columns/common.d.ts +1 -1
- package/pg-core/dialect.cjs +5 -5
- package/pg-core/dialect.d.ts +2 -2
- package/pg-core/dialect.js +5 -5
- package/pg-core/effect/db.cjs +5 -5
- package/pg-core/effect/db.d.cts +1 -1
- package/pg-core/effect/db.d.ts +5 -5
- package/pg-core/effect/db.js +5 -5
- package/pg-core/effect/delete.cjs +1 -1
- package/pg-core/effect/delete.js +1 -1
- package/pg-core/effect/index.cjs +6 -6
- package/pg-core/effect/index.js +6 -6
- package/pg-core/effect/query.cjs +1 -1
- package/pg-core/effect/query.js +1 -1
- package/pg-core/effect/session.cjs +2 -2
- package/pg-core/effect/session.d.cts +1 -1
- package/pg-core/effect/session.d.ts +4 -4
- package/pg-core/effect/session.js +2 -2
- package/pg-core/effect/update.d.ts +1 -1
- package/pg-core/index.cjs +7 -7
- package/pg-core/index.js +7 -7
- package/pg-core/query-builders/delete.d.ts +2 -2
- package/pg-core/query-builders/insert.d.ts +2 -2
- package/pg-core/query-builders/query-builder.cjs +1 -1
- package/pg-core/query-builders/query-builder.d.ts +1 -1
- package/pg-core/query-builders/query-builder.js +1 -1
- package/pg-core/query-builders/select.cjs +2 -2
- package/pg-core/query-builders/select.d.ts +3 -3
- package/pg-core/query-builders/select.js +2 -2
- package/pg-core/query-builders/select.types.d.ts +2 -2
- package/pg-core/query-builders/update.cjs +2 -2
- package/pg-core/query-builders/update.d.ts +3 -3
- package/pg-core/query-builders/update.js +2 -2
- package/pg-core/schema.cjs +1 -1
- package/pg-core/schema.js +1 -1
- package/pg-core/subquery.d.ts +1 -1
- package/pg-core/utils.cjs +4 -4
- package/pg-core/utils.d.ts +1 -1
- package/pg-core/utils.js +4 -4
- package/pg-proxy/driver.d.ts +1 -1
- package/pg-proxy/session.cjs +1 -1
- package/pg-proxy/session.d.ts +1 -1
- package/pg-proxy/session.js +1 -1
- package/pglite/driver.d.ts +2 -2
- package/pglite/migrator.cjs +1 -1
- package/pglite/migrator.js +1 -1
- package/pglite/session.cjs +1 -1
- package/pglite/session.d.ts +2 -2
- package/pglite/session.js +1 -1
- package/planetscale-serverless/driver.d.ts +1 -1
- package/planetscale-serverless/session.cjs +1 -1
- package/planetscale-serverless/session.d.ts +1 -1
- package/planetscale-serverless/session.js +1 -1
- package/postgres-js/migrator.cjs +1 -1
- package/postgres-js/migrator.js +1 -1
- package/postgres-js/session.cjs +1 -1
- package/postgres-js/session.d.ts +1 -1
- package/postgres-js/session.js +1 -1
- package/prisma/mysql/driver.cjs +1 -1
- package/prisma/mysql/driver.js +1 -1
- package/prisma/pg/driver.cjs +1 -1
- package/prisma/pg/driver.js +1 -1
- package/prisma/pg/session.d.ts +1 -1
- package/query-builders/select.types.d.ts +2 -2
- package/relations.cjs +2 -2
- package/relations.js +2 -2
- package/selection-proxy.cjs +1 -1
- package/selection-proxy.js +1 -1
- package/singlestore/driver.cjs +1 -1
- package/singlestore/driver.d.ts +2 -2
- package/singlestore/driver.js +1 -1
- package/singlestore/session.cjs +1 -1
- package/singlestore/session.d.ts +1 -1
- package/singlestore/session.js +1 -1
- package/singlestore-core/columns/bigint.d.ts +1 -1
- package/singlestore-core/columns/char.d.ts +1 -1
- package/singlestore-core/columns/common.d.ts +1 -1
- package/singlestore-core/columns/custom.d.ts +1 -1
- package/singlestore-core/columns/date.d.ts +1 -1
- package/singlestore-core/columns/datetime.d.ts +1 -1
- package/singlestore-core/columns/decimal.d.ts +1 -1
- package/singlestore-core/columns/double.d.ts +1 -1
- package/singlestore-core/columns/enum.d.ts +1 -1
- package/singlestore-core/columns/float.d.ts +1 -1
- package/singlestore-core/columns/int.d.ts +1 -1
- package/singlestore-core/columns/mediumint.d.ts +1 -1
- package/singlestore-core/columns/smallint.d.ts +1 -1
- package/singlestore-core/columns/text.d.ts +1 -1
- package/singlestore-core/columns/timestamp.d.ts +1 -1
- package/singlestore-core/columns/tinyint.d.ts +1 -1
- package/singlestore-core/columns/varchar.d.ts +1 -1
- package/singlestore-core/columns/vector.d.ts +1 -1
- package/singlestore-core/db.cjs +1 -1
- package/singlestore-core/db.d.ts +2 -2
- package/singlestore-core/db.js +1 -1
- package/singlestore-core/dialect.cjs +6 -6
- package/singlestore-core/dialect.d.ts +1 -1
- package/singlestore-core/dialect.js +6 -6
- package/singlestore-core/index.cjs +4 -4
- package/singlestore-core/index.js +4 -4
- package/singlestore-core/query-builders/delete.d.ts +1 -1
- package/singlestore-core/query-builders/select.cjs +1 -1
- package/singlestore-core/query-builders/select.d.ts +1 -1
- package/singlestore-core/query-builders/select.js +1 -1
- package/singlestore-core/query-builders/select.types.d.ts +1 -1
- package/singlestore-core/query-builders/update.d.ts +2 -2
- package/singlestore-core/subquery.d.ts +1 -1
- package/singlestore-core/utils.cjs +2 -2
- package/singlestore-core/utils.d.ts +1 -1
- package/singlestore-core/utils.js +2 -2
- package/singlestore-core/view.cjs +1 -1
- package/singlestore-core/view.js +1 -1
- package/singlestore-proxy/driver.cjs +1 -1
- package/singlestore-proxy/driver.js +1 -1
- package/singlestore-proxy/session.cjs +1 -1
- package/singlestore-proxy/session.d.ts +1 -1
- package/singlestore-proxy/session.js +1 -1
- package/sql/sql.d.ts +1 -1
- package/sqlite-cloud/driver.d.ts +1 -1
- package/sqlite-cloud/session.cjs +1 -1
- package/sqlite-cloud/session.d.ts +2 -2
- package/sqlite-cloud/session.js +1 -1
- package/sqlite-core/columns/blob.d.ts +1 -1
- package/sqlite-core/columns/common.d.ts +1 -1
- package/sqlite-core/columns/custom.d.ts +1 -1
- package/sqlite-core/columns/integer.d.ts +1 -1
- package/sqlite-core/columns/numeric.d.ts +1 -1
- package/sqlite-core/columns/text.d.ts +1 -1
- package/sqlite-core/db.cjs +1 -1
- package/sqlite-core/db.d.ts +2 -2
- package/sqlite-core/db.js +1 -1
- package/sqlite-core/dialect.cjs +6 -6
- package/sqlite-core/dialect.d.ts +2 -2
- package/sqlite-core/dialect.js +6 -6
- package/sqlite-core/index.cjs +5 -5
- package/sqlite-core/index.js +5 -5
- package/sqlite-core/query-builders/delete.d.ts +1 -1
- package/sqlite-core/query-builders/insert.d.ts +1 -1
- package/sqlite-core/query-builders/select.cjs +2 -2
- package/sqlite-core/query-builders/select.d.ts +1 -1
- package/sqlite-core/query-builders/select.js +2 -2
- package/sqlite-core/query-builders/select.types.d.ts +1 -1
- package/sqlite-core/query-builders/update.cjs +2 -2
- package/sqlite-core/query-builders/update.d.ts +2 -2
- package/sqlite-core/query-builders/update.js +2 -2
- package/sqlite-core/session.cjs +1 -1
- package/sqlite-core/session.d.ts +1 -1
- package/sqlite-core/session.js +1 -1
- package/sqlite-core/subquery.d.ts +1 -1
- package/sqlite-core/utils.cjs +4 -4
- package/sqlite-core/utils.d.ts +1 -1
- package/sqlite-core/utils.js +4 -4
- package/sqlite-proxy/session.d.ts +1 -1
- package/tidb-serverless/session.cjs +1 -1
- package/tidb-serverless/session.js +1 -1
- package/tursodatabase/session.cjs +1 -1
- package/tursodatabase/session.d.ts +1 -1
- package/tursodatabase/session.js +1 -1
- package/typebox/column.types.d.ts +1 -1
- package/typebox/schema.cjs +1 -1
- package/typebox/schema.js +1 -1
- package/typebox/schema.types.internal.d.ts +1 -1
- package/typebox-legacy/column.types.d.ts +1 -1
- package/typebox-legacy/schema.cjs +1 -1
- package/typebox-legacy/schema.js +1 -1
- package/typebox-legacy/schema.types.internal.d.ts +1 -1
- package/up-migrations/effect-pg.d.ts +1 -1
- package/up-migrations/pg.d.ts +1 -1
- package/up-migrations/sqlite.d.ts +1 -1
- package/utils.cjs +1 -1
- package/utils.js +1 -1
- package/valibot/column.types.d.ts +1 -1
- package/valibot/schema.cjs +1 -1
- package/valibot/schema.js +1 -1
- package/valibot/schema.types.internal.d.ts +1 -1
- package/vercel-postgres/driver.cjs +1 -1
- package/vercel-postgres/driver.d.ts +2 -2
- package/vercel-postgres/driver.js +1 -1
- package/vercel-postgres/migrator.cjs +1 -1
- package/vercel-postgres/migrator.js +1 -1
- package/vercel-postgres/session.cjs +1 -1
- package/vercel-postgres/session.d.ts +2 -2
- package/vercel-postgres/session.js +1 -1
- package/xata-http/driver.d.ts +1 -1
- package/xata-http/session.d.ts +1 -1
- package/zod/column.types.d.ts +1 -1
- package/zod/schema.cjs +1 -1
- package/zod/schema.js +1 -1
- package/zod/schema.types.internal.d.ts +1 -1
package/_relations.cjs
CHANGED
|
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_entity = require('./entity.cjs');
|
|
4
4
|
const require_column = require('./column.cjs');
|
|
5
|
+
const require_pg_core_primary_keys = require('./pg-core/primary-keys.cjs');
|
|
5
6
|
const require_sql_sql = require('./sql/sql.cjs');
|
|
6
7
|
const require_sql_expressions_conditions = require('./sql/expressions/conditions.cjs');
|
|
7
8
|
const require_sql_expressions_select = require('./sql/expressions/select.cjs');
|
|
8
|
-
const require_pg_core_primary_keys = require('./pg-core/primary-keys.cjs');
|
|
9
9
|
let __table_ts = require("./table.cjs");
|
|
10
10
|
|
|
11
11
|
//#region src/_relations.ts
|
package/_relations.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { entityKind, is } from "./entity.js";
|
|
2
2
|
import { Column } from "./column.js";
|
|
3
|
+
import { PrimaryKeyBuilder } from "./pg-core/primary-keys.js";
|
|
3
4
|
import { SQL, sql } from "./sql/sql.js";
|
|
4
5
|
import { and, between, eq, exists, gt, gte, ilike, inArray, isNotNull, isNull, like, lt, lte, ne, not, notBetween, notExists, notIlike, notInArray, notLike, or } from "./sql/expressions/conditions.js";
|
|
5
6
|
import { asc, desc } from "./sql/expressions/select.js";
|
|
6
|
-
import { PrimaryKeyBuilder } from "./pg-core/primary-keys.js";
|
|
7
7
|
import { Table, getTableUniqueName } from "./table.js";
|
|
8
8
|
|
|
9
9
|
//#region src/_relations.ts
|
package/alias.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_entity = require('./entity.cjs');
|
|
3
2
|
const require_column_common = require('./column-common.cjs');
|
|
3
|
+
const require_entity = require('./entity.cjs');
|
|
4
4
|
const require_column = require('./column.cjs');
|
|
5
|
-
const require_subquery = require('./subquery.cjs');
|
|
6
5
|
const require_table = require('./table.cjs');
|
|
7
6
|
const require_sql_sql = require('./sql/sql.cjs');
|
|
7
|
+
const require_subquery = require('./subquery.cjs');
|
|
8
8
|
const require_view_common = require('./view-common.cjs');
|
|
9
9
|
|
|
10
10
|
//#region src/alias.ts
|
package/alias.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { entityKind, is } from "./entity.js";
|
|
2
1
|
import { OriginalColumn } from "./column-common.js";
|
|
2
|
+
import { entityKind, is } from "./entity.js";
|
|
3
3
|
import { Column } from "./column.js";
|
|
4
|
-
import { Subquery } from "./subquery.js";
|
|
5
4
|
import { Table } from "./table.js";
|
|
6
5
|
import { SQL, View, isSQLWrapper, sql } from "./sql/sql.js";
|
|
6
|
+
import { Subquery } from "./subquery.js";
|
|
7
7
|
import { ViewBaseConfig } from "./view-common.js";
|
|
8
8
|
|
|
9
9
|
//#region src/alias.ts
|
package/arktype/column.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
let __table_ts = require("../table.cjs");
|
|
4
|
-
let __column_ts = require("../column.cjs");
|
|
5
4
|
let __utils_ts = require("../utils.cjs");
|
|
5
|
+
let __column_ts = require("../column.cjs");
|
|
6
6
|
let __column_builder_ts = require("../column-builder.cjs");
|
|
7
7
|
let arktype = require("arktype");
|
|
8
8
|
|
package/arktype/column.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getTableName } from "../table.js";
|
|
2
|
-
import { getColumnTable } from "../column.js";
|
|
3
2
|
import { CONSTANTS } from "../utils.js";
|
|
3
|
+
import { getColumnTable } from "../column.js";
|
|
4
4
|
import { extractExtendedColumnType } from "../column-builder.js";
|
|
5
5
|
import { type } from "arktype";
|
|
6
6
|
|
package/arktype/schema.cjs
CHANGED
|
@@ -4,8 +4,8 @@ const require_utils = require('../utils.cjs');
|
|
|
4
4
|
const require_arktype_column = require('./column.cjs');
|
|
5
5
|
let __entity_ts = require("../entity.cjs");
|
|
6
6
|
let __table_ts = require("../table.cjs");
|
|
7
|
-
let __column_ts = require("../column.cjs");
|
|
8
7
|
let __utils_ts = require("../utils.cjs");
|
|
8
|
+
let __column_ts = require("../column.cjs");
|
|
9
9
|
let __sql_sql_ts = require("../sql/sql.cjs");
|
|
10
10
|
let arktype = require("arktype");
|
|
11
11
|
|
package/arktype/schema.js
CHANGED
|
@@ -2,8 +2,8 @@ import { isWithEnum } from "../utils.js";
|
|
|
2
2
|
import { columnToSchema } from "./column.js";
|
|
3
3
|
import { is } from "../entity.js";
|
|
4
4
|
import { isTable } from "../table.js";
|
|
5
|
-
import { Column } from "../column.js";
|
|
6
5
|
import { getColumns } from "../utils.js";
|
|
6
|
+
import { Column } from "../column.js";
|
|
7
7
|
import { SQL, isView } from "../sql/sql.js";
|
|
8
8
|
import { type } from "arktype";
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ColumnIsGeneratedAlwaysAs, GetSelection } from "../utils.js";
|
|
2
2
|
import { ArktypeNullable, ArktypeOptional, GetArktypeType, HandleColumn } from "./column.types.js";
|
|
3
3
|
import { Table } from "../table.js";
|
|
4
|
-
import { Column } from "../column.js";
|
|
5
4
|
import { DrizzleTypeError, Simplify } from "../utils.js";
|
|
5
|
+
import { Column } from "../column.js";
|
|
6
6
|
import { View } from "../sql/sql.js";
|
|
7
7
|
import { Type, type } from "arktype";
|
|
8
8
|
import { SelectedFieldsFlat } from "../operations.js";
|
|
@@ -4,7 +4,7 @@ import { Field, TypeHint } from "@aws-sdk/client-rds-data";
|
|
|
4
4
|
|
|
5
5
|
//#region src/aws-data-api/common/index.d.ts
|
|
6
6
|
declare const typeHint: { [K in TypeHint]: K };
|
|
7
|
-
declare function getValueFromDataApi(field: Field): string | number | boolean | string[] | Uint8Array<ArrayBufferLike> |
|
|
7
|
+
declare function getValueFromDataApi(field: Field): string | number | boolean | string[] | number[] | Uint8Array<ArrayBufferLike> | boolean[] | _aws_sdk_client_rds_data0.ArrayValue[] | null;
|
|
8
8
|
declare function typingsToAwsTypeHint(typings?: QueryTypingsValue): TypeHint | undefined;
|
|
9
9
|
declare function toValueParam(value: any, typings?: QueryTypingsValue): {
|
|
10
10
|
value: Field;
|
|
@@ -4,7 +4,7 @@ import { Field, TypeHint } from "@aws-sdk/client-rds-data";
|
|
|
4
4
|
|
|
5
5
|
//#region src/aws-data-api/common/index.d.ts
|
|
6
6
|
declare const typeHint: { [K in TypeHint]: K };
|
|
7
|
-
declare function getValueFromDataApi(field: Field): string | number | boolean | string[] | Uint8Array<ArrayBufferLike> |
|
|
7
|
+
declare function getValueFromDataApi(field: Field): string | number | boolean | string[] | number[] | Uint8Array<ArrayBufferLike> | boolean[] | _aws_sdk_client_rds_data0.ArrayValue[] | null;
|
|
8
8
|
declare function typingsToAwsTypeHint(typings?: QueryTypingsValue): TypeHint | undefined;
|
|
9
9
|
declare function toValueParam(value: any, typings?: QueryTypingsValue): {
|
|
10
10
|
value: Field;
|
|
@@ -7,10 +7,10 @@ let __sql_sql_ts = require("../../sql/sql.cjs");
|
|
|
7
7
|
let ___relations_ts = require("../../_relations.cjs");
|
|
8
8
|
___relations_ts = require_runtime.__toESM(___relations_ts);
|
|
9
9
|
let __logger_ts = require("../../logger.cjs");
|
|
10
|
-
let __pg_core_async_db_ts = require("../../pg-core/async/db.cjs");
|
|
11
|
-
let __pg_core_dialect_ts = require("../../pg-core/dialect.cjs");
|
|
12
10
|
let __pg_core_index_ts = require("../../pg-core/index.cjs");
|
|
11
|
+
let __pg_core_async_db_ts = require("../../pg-core/async/db.cjs");
|
|
13
12
|
let _aws_sdk_client_rds_data = require("@aws-sdk/client-rds-data");
|
|
13
|
+
let __pg_core_dialect_ts = require("../../pg-core/dialect.cjs");
|
|
14
14
|
|
|
15
15
|
//#region src/aws-data-api/pg/driver.ts
|
|
16
16
|
var AwsDataApiPgDatabase = class extends __pg_core_async_db_ts.PgAsyncDatabase {
|
|
@@ -3,11 +3,11 @@ import { entityKind } from "../../entity.js";
|
|
|
3
3
|
import { DrizzleConfig, UpdateSet } from "../../utils.js";
|
|
4
4
|
import { SQL, SQLWrapper } from "../../sql/sql.js";
|
|
5
5
|
import { Logger } from "../../logger.js";
|
|
6
|
-
import { PgAsyncDatabase } from "../../pg-core/async/db.js";
|
|
7
|
-
import { PgDialect } from "../../pg-core/dialect.js";
|
|
8
6
|
import { PgInsertConfig, PgTable, TableConfig } from "../../pg-core/index.js";
|
|
7
|
+
import { PgAsyncDatabase } from "../../pg-core/async/db.js";
|
|
9
8
|
import { AnyRelations, EmptyRelations } from "../../relations.js";
|
|
10
9
|
import { RDSDataClient, RDSDataClientConfig } from "@aws-sdk/client-rds-data";
|
|
10
|
+
import { PgDialect as PgDialect$1 } from "../../pg-core/dialect.js";
|
|
11
11
|
import { PgAsyncRaw } from "../../pg-core/async/raw.js";
|
|
12
12
|
|
|
13
13
|
//#region src/aws-data-api/pg/driver.d.ts
|
|
@@ -27,7 +27,7 @@ declare class AwsDataApiPgDatabase<TSchema extends Record<string, unknown> = Rec
|
|
|
27
27
|
static readonly [entityKind]: string;
|
|
28
28
|
execute<TRow extends Record<string, unknown> = Record<string, unknown>>(query: SQLWrapper | string): PgAsyncRaw<AwsDataApiPgQueryResult<TRow>>;
|
|
29
29
|
}
|
|
30
|
-
declare class AwsPgDialect extends PgDialect {
|
|
30
|
+
declare class AwsPgDialect extends PgDialect$1 {
|
|
31
31
|
static readonly [entityKind]: string;
|
|
32
32
|
escapeParam(num: number): string;
|
|
33
33
|
buildInsertQuery({
|
|
@@ -4,10 +4,10 @@ import { Table } from "../../table.js";
|
|
|
4
4
|
import { Param, sql } from "../../sql/sql.js";
|
|
5
5
|
import * as V1 from "../../_relations.js";
|
|
6
6
|
import { DefaultLogger } from "../../logger.js";
|
|
7
|
-
import { PgAsyncDatabase } from "../../pg-core/async/db.js";
|
|
8
|
-
import { PgDialect } from "../../pg-core/dialect.js";
|
|
9
7
|
import { PgColumn } from "../../pg-core/index.js";
|
|
8
|
+
import { PgAsyncDatabase } from "../../pg-core/async/db.js";
|
|
10
9
|
import { RDSDataClient } from "@aws-sdk/client-rds-data";
|
|
10
|
+
import { PgDialect as PgDialect$1 } from "../../pg-core/dialect.js";
|
|
11
11
|
|
|
12
12
|
//#region src/aws-data-api/pg/driver.ts
|
|
13
13
|
var AwsDataApiPgDatabase = class extends PgAsyncDatabase {
|
|
@@ -16,7 +16,7 @@ var AwsDataApiPgDatabase = class extends PgAsyncDatabase {
|
|
|
16
16
|
return super.execute(query);
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
var AwsPgDialect = class extends PgDialect {
|
|
19
|
+
var AwsPgDialect = class extends PgDialect$1 {
|
|
20
20
|
static [entityKind] = "AwsPgDialect";
|
|
21
21
|
escapeParam(num) {
|
|
22
22
|
return `:${num + 1}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.js","names":[],"sources":["../../../src/aws-data-api/pg/driver.ts"],"sourcesContent":["import { RDSDataClient, type RDSDataClientConfig } from '@aws-sdk/client-rds-data';\nimport * as V1 from '~/_relations.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport type { Logger } from '~/logger.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport { PgAsyncDatabase } from '~/pg-core/async/db.ts';\nimport type { PgAsyncRaw } from '~/pg-core/async/raw.ts';\nimport { PgDialect } from '~/pg-core/dialect.ts';\nimport { PgColumn, type PgInsertConfig, type PgTable, type TableConfig } from '~/pg-core/index.ts';\nimport type { AnyRelations, EmptyRelations } from '~/relations.ts';\nimport { Param, type SQL, sql, type SQLWrapper } from '~/sql/sql.ts';\nimport { Table } from '~/table.ts';\nimport type { DrizzleConfig, UpdateSet } from '~/utils.ts';\nimport type { AwsDataApiClient, AwsDataApiPgQueryResult, AwsDataApiPgQueryResultHKT } from './session.ts';\nimport { AwsDataApiSession } from './session.ts';\n\nexport interface PgDriverOptions {\n\tlogger?: Logger;\n\tcache?: Cache;\n\tdatabase: string;\n\tresourceArn: string;\n\tsecretArn: string;\n}\n\nexport interface DrizzleAwsDataApiPgConfig<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n\tTRelations extends AnyRelations = EmptyRelations,\n> extends DrizzleConfig<TSchema, TRelations> {\n\tdatabase: string;\n\tresourceArn: string;\n\tsecretArn: string;\n}\n\nexport class AwsDataApiPgDatabase<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n\tTRelations extends AnyRelations = EmptyRelations,\n> extends PgAsyncDatabase<AwsDataApiPgQueryResultHKT, TSchema, TRelations> {\n\tstatic override readonly [entityKind]: string = 'AwsDataApiPgDatabase';\n\n\toverride execute<\n\t\tTRow extends Record<string, unknown> = Record<string, unknown>,\n\t>(query: SQLWrapper | string): PgAsyncRaw<AwsDataApiPgQueryResult<TRow>> {\n\t\treturn super.execute(query);\n\t}\n}\n\nexport class AwsPgDialect extends PgDialect {\n\tstatic override readonly [entityKind]: string = 'AwsPgDialect';\n\n\toverride escapeParam(num: number): string {\n\t\treturn `:${num + 1}`;\n\t}\n\n\toverride buildInsertQuery(\n\t\t{ table, values, onConflict, returning, select, withList }: PgInsertConfig<PgTable<TableConfig>>,\n\t): SQL<unknown> {\n\t\tconst columns: Record<string, PgColumn> = table[Table.Symbol.Columns];\n\n\t\tif (!select) {\n\t\t\tfor (const value of (values as Record<string, Param | SQL>[])) {\n\t\t\t\tfor (const fieldName of Object.keys(columns)) {\n\t\t\t\t\tconst colValue = value[fieldName];\n\t\t\t\t\tconst column = columns[fieldName];\n\t\t\t\t\tif (\n\t\t\t\t\t\tis(colValue, Param) && colValue.value !== undefined\n\t\t\t\t\t\t&& is(column, PgColumn) && column.dimensions\n\t\t\t\t\t\t&& Array.isArray(colValue.value)\n\t\t\t\t\t) {\n\t\t\t\t\t\tvalue[fieldName] = sql`cast(${colValue} as ${sql.raw(column.getSQLType())})`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn super.buildInsertQuery({ table, values, onConflict, returning, withList });\n\t}\n\n\toverride buildUpdateSet(table: PgTable<TableConfig>, set: UpdateSet): SQL<unknown> {\n\t\tconst columns: Record<string, PgColumn> = table[Table.Symbol.Columns];\n\n\t\tfor (const [colName, colValue] of Object.entries(set)) {\n\t\t\tconst currentColumn = columns[colName];\n\t\t\tif (\n\t\t\t\tcurrentColumn && is(colValue, Param) && colValue.value !== undefined\n\t\t\t\t&& is(currentColumn, PgColumn) && currentColumn.dimensions\n\t\t\t\t&& Array.isArray(colValue.value)\n\t\t\t) {\n\t\t\t\tset[colName] = sql`cast(${colValue} as ${sql.raw(currentColumn.getSQLType())})`;\n\t\t\t}\n\t\t}\n\t\treturn super.buildUpdateSet(table, set);\n\t}\n}\n\nfunction construct<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n\tTRelations extends AnyRelations = EmptyRelations,\n>(\n\tclient: AwsDataApiClient,\n\tconfig: DrizzleAwsDataApiPgConfig<TSchema, TRelations>,\n): AwsDataApiPgDatabase<TSchema, TRelations> & {\n\t$client: AwsDataApiClient;\n} {\n\tconst dialect = new AwsPgDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: V1.RelationalSchemaConfig<V1.TablesRelationalConfig> | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = V1.extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tV1.createTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst relations = config.relations ?? {} as TRelations;\n\tconst session = new AwsDataApiSession(client, dialect, relations, schema, {\n\t\t...config,\n\t\tlogger,\n\t\tcache: config.cache,\n\t}, undefined);\n\tconst db = new AwsDataApiPgDatabase(dialect, session, relations, schema as V1.RelationalSchemaConfig<any>, true);\n\t(<any> db).$client = client;\n\t(<any> db).$cache = config.cache;\n\tif ((<any> db).$cache) {\n\t\t(<any> db).$cache['invalidate'] = config.cache?.onMutate;\n\t}\n\n\treturn db as any;\n}\n\nexport function drizzle<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n\tTRelations extends AnyRelations = EmptyRelations,\n\tTClient extends AwsDataApiClient = RDSDataClient,\n>(\n\t...params: [\n\t\t(\n\t\t\t| (\n\t\t\t\t& DrizzleConfig<TSchema, TRelations>\n\t\t\t\t& {\n\t\t\t\t\tconnection: RDSDataClientConfig & Omit<DrizzleAwsDataApiPgConfig, keyof DrizzleConfig>;\n\t\t\t\t}\n\t\t\t)\n\t\t\t| (\n\t\t\t\t& DrizzleAwsDataApiPgConfig<TSchema, TRelations>\n\t\t\t\t& {\n\t\t\t\t\tclient: TClient;\n\t\t\t\t}\n\t\t\t)\n\t\t),\n\t]\n): AwsDataApiPgDatabase<TSchema, TRelations> & {\n\t$client: TClient;\n} {\n\tif ((params[0] as { client?: TClient }).client) {\n\t\tconst { client, ...drizzleConfig } = params[0] as {\n\t\t\tclient: TClient;\n\t\t} & DrizzleAwsDataApiPgConfig<TSchema, TRelations>;\n\n\t\treturn construct(client, drizzleConfig) as any;\n\t}\n\n\tconst { connection, ...drizzleConfig } = params[0] as {\n\t\tconnection: RDSDataClientConfig & Omit<DrizzleAwsDataApiPgConfig, keyof DrizzleConfig>;\n\t} & DrizzleConfig<TSchema, TRelations>;\n\tconst { resourceArn, database, secretArn, ...rdsConfig } = connection;\n\n\tconst instance = new RDSDataClient(rdsConfig);\n\treturn construct(instance, { resourceArn, database, secretArn, ...drizzleConfig }) as any;\n}\n\nexport namespace drizzle {\n\texport function mock<\n\t\tTSchema extends Record<string, unknown> = Record<string, never>,\n\t\tTRelations extends AnyRelations = EmptyRelations,\n\t>(\n\t\tconfig: DrizzleAwsDataApiPgConfig<TSchema, TRelations>,\n\t): AwsDataApiPgDatabase<TSchema, TRelations> & {\n\t\t$client: '$client is not available on drizzle.mock()';\n\t} {\n\t\treturn construct({} as any, config) as any;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAiCA,IAAa,uBAAb,cAGU,gBAAiE;CAC1E,QAA0B,cAAsB;CAEhD,AAAS,QAEP,OAAuE;AACxE,SAAO,MAAM,QAAQ,MAAM;;;AAI7B,IAAa,eAAb,
|
|
1
|
+
{"version":3,"file":"driver.js","names":["PgDialect"],"sources":["../../../src/aws-data-api/pg/driver.ts"],"sourcesContent":["import { RDSDataClient, type RDSDataClientConfig } from '@aws-sdk/client-rds-data';\nimport * as V1 from '~/_relations.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport type { Logger } from '~/logger.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport { PgAsyncDatabase } from '~/pg-core/async/db.ts';\nimport type { PgAsyncRaw } from '~/pg-core/async/raw.ts';\nimport { PgDialect } from '~/pg-core/dialect.ts';\nimport { PgColumn, type PgInsertConfig, type PgTable, type TableConfig } from '~/pg-core/index.ts';\nimport type { AnyRelations, EmptyRelations } from '~/relations.ts';\nimport { Param, type SQL, sql, type SQLWrapper } from '~/sql/sql.ts';\nimport { Table } from '~/table.ts';\nimport type { DrizzleConfig, UpdateSet } from '~/utils.ts';\nimport type { AwsDataApiClient, AwsDataApiPgQueryResult, AwsDataApiPgQueryResultHKT } from './session.ts';\nimport { AwsDataApiSession } from './session.ts';\n\nexport interface PgDriverOptions {\n\tlogger?: Logger;\n\tcache?: Cache;\n\tdatabase: string;\n\tresourceArn: string;\n\tsecretArn: string;\n}\n\nexport interface DrizzleAwsDataApiPgConfig<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n\tTRelations extends AnyRelations = EmptyRelations,\n> extends DrizzleConfig<TSchema, TRelations> {\n\tdatabase: string;\n\tresourceArn: string;\n\tsecretArn: string;\n}\n\nexport class AwsDataApiPgDatabase<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n\tTRelations extends AnyRelations = EmptyRelations,\n> extends PgAsyncDatabase<AwsDataApiPgQueryResultHKT, TSchema, TRelations> {\n\tstatic override readonly [entityKind]: string = 'AwsDataApiPgDatabase';\n\n\toverride execute<\n\t\tTRow extends Record<string, unknown> = Record<string, unknown>,\n\t>(query: SQLWrapper | string): PgAsyncRaw<AwsDataApiPgQueryResult<TRow>> {\n\t\treturn super.execute(query);\n\t}\n}\n\nexport class AwsPgDialect extends PgDialect {\n\tstatic override readonly [entityKind]: string = 'AwsPgDialect';\n\n\toverride escapeParam(num: number): string {\n\t\treturn `:${num + 1}`;\n\t}\n\n\toverride buildInsertQuery(\n\t\t{ table, values, onConflict, returning, select, withList }: PgInsertConfig<PgTable<TableConfig>>,\n\t): SQL<unknown> {\n\t\tconst columns: Record<string, PgColumn> = table[Table.Symbol.Columns];\n\n\t\tif (!select) {\n\t\t\tfor (const value of (values as Record<string, Param | SQL>[])) {\n\t\t\t\tfor (const fieldName of Object.keys(columns)) {\n\t\t\t\t\tconst colValue = value[fieldName];\n\t\t\t\t\tconst column = columns[fieldName];\n\t\t\t\t\tif (\n\t\t\t\t\t\tis(colValue, Param) && colValue.value !== undefined\n\t\t\t\t\t\t&& is(column, PgColumn) && column.dimensions\n\t\t\t\t\t\t&& Array.isArray(colValue.value)\n\t\t\t\t\t) {\n\t\t\t\t\t\tvalue[fieldName] = sql`cast(${colValue} as ${sql.raw(column.getSQLType())})`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn super.buildInsertQuery({ table, values, onConflict, returning, withList });\n\t}\n\n\toverride buildUpdateSet(table: PgTable<TableConfig>, set: UpdateSet): SQL<unknown> {\n\t\tconst columns: Record<string, PgColumn> = table[Table.Symbol.Columns];\n\n\t\tfor (const [colName, colValue] of Object.entries(set)) {\n\t\t\tconst currentColumn = columns[colName];\n\t\t\tif (\n\t\t\t\tcurrentColumn && is(colValue, Param) && colValue.value !== undefined\n\t\t\t\t&& is(currentColumn, PgColumn) && currentColumn.dimensions\n\t\t\t\t&& Array.isArray(colValue.value)\n\t\t\t) {\n\t\t\t\tset[colName] = sql`cast(${colValue} as ${sql.raw(currentColumn.getSQLType())})`;\n\t\t\t}\n\t\t}\n\t\treturn super.buildUpdateSet(table, set);\n\t}\n}\n\nfunction construct<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n\tTRelations extends AnyRelations = EmptyRelations,\n>(\n\tclient: AwsDataApiClient,\n\tconfig: DrizzleAwsDataApiPgConfig<TSchema, TRelations>,\n): AwsDataApiPgDatabase<TSchema, TRelations> & {\n\t$client: AwsDataApiClient;\n} {\n\tconst dialect = new AwsPgDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: V1.RelationalSchemaConfig<V1.TablesRelationalConfig> | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = V1.extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tV1.createTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst relations = config.relations ?? {} as TRelations;\n\tconst session = new AwsDataApiSession(client, dialect, relations, schema, {\n\t\t...config,\n\t\tlogger,\n\t\tcache: config.cache,\n\t}, undefined);\n\tconst db = new AwsDataApiPgDatabase(dialect, session, relations, schema as V1.RelationalSchemaConfig<any>, true);\n\t(<any> db).$client = client;\n\t(<any> db).$cache = config.cache;\n\tif ((<any> db).$cache) {\n\t\t(<any> db).$cache['invalidate'] = config.cache?.onMutate;\n\t}\n\n\treturn db as any;\n}\n\nexport function drizzle<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n\tTRelations extends AnyRelations = EmptyRelations,\n\tTClient extends AwsDataApiClient = RDSDataClient,\n>(\n\t...params: [\n\t\t(\n\t\t\t| (\n\t\t\t\t& DrizzleConfig<TSchema, TRelations>\n\t\t\t\t& {\n\t\t\t\t\tconnection: RDSDataClientConfig & Omit<DrizzleAwsDataApiPgConfig, keyof DrizzleConfig>;\n\t\t\t\t}\n\t\t\t)\n\t\t\t| (\n\t\t\t\t& DrizzleAwsDataApiPgConfig<TSchema, TRelations>\n\t\t\t\t& {\n\t\t\t\t\tclient: TClient;\n\t\t\t\t}\n\t\t\t)\n\t\t),\n\t]\n): AwsDataApiPgDatabase<TSchema, TRelations> & {\n\t$client: TClient;\n} {\n\tif ((params[0] as { client?: TClient }).client) {\n\t\tconst { client, ...drizzleConfig } = params[0] as {\n\t\t\tclient: TClient;\n\t\t} & DrizzleAwsDataApiPgConfig<TSchema, TRelations>;\n\n\t\treturn construct(client, drizzleConfig) as any;\n\t}\n\n\tconst { connection, ...drizzleConfig } = params[0] as {\n\t\tconnection: RDSDataClientConfig & Omit<DrizzleAwsDataApiPgConfig, keyof DrizzleConfig>;\n\t} & DrizzleConfig<TSchema, TRelations>;\n\tconst { resourceArn, database, secretArn, ...rdsConfig } = connection;\n\n\tconst instance = new RDSDataClient(rdsConfig);\n\treturn construct(instance, { resourceArn, database, secretArn, ...drizzleConfig }) as any;\n}\n\nexport namespace drizzle {\n\texport function mock<\n\t\tTSchema extends Record<string, unknown> = Record<string, never>,\n\t\tTRelations extends AnyRelations = EmptyRelations,\n\t>(\n\t\tconfig: DrizzleAwsDataApiPgConfig<TSchema, TRelations>,\n\t): AwsDataApiPgDatabase<TSchema, TRelations> & {\n\t\t$client: '$client is not available on drizzle.mock()';\n\t} {\n\t\treturn construct({} as any, config) as any;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAiCA,IAAa,uBAAb,cAGU,gBAAiE;CAC1E,QAA0B,cAAsB;CAEhD,AAAS,QAEP,OAAuE;AACxE,SAAO,MAAM,QAAQ,MAAM;;;AAI7B,IAAa,eAAb,cAAkCA,YAAU;CAC3C,QAA0B,cAAsB;CAEhD,AAAS,YAAY,KAAqB;AACzC,SAAO,IAAI,MAAM;;CAGlB,AAAS,iBACR,EAAE,OAAO,QAAQ,YAAY,WAAW,QAAQ,YACjC;EACf,MAAM,UAAoC,MAAM,MAAM,OAAO;AAE7D,MAAI,CAAC,OACJ,MAAK,MAAM,SAAU,OACpB,MAAK,MAAM,aAAa,OAAO,KAAK,QAAQ,EAAE;GAC7C,MAAM,WAAW,MAAM;GACvB,MAAM,SAAS,QAAQ;AACvB,OACC,GAAG,UAAU,MAAM,IAAI,SAAS,UAAU,UACvC,GAAG,QAAQ,SAAS,IAAI,OAAO,cAC/B,MAAM,QAAQ,SAAS,MAAM,CAEhC,OAAM,aAAa,GAAG,QAAQ,SAAS,MAAM,IAAI,IAAI,OAAO,YAAY,CAAC,CAAC;;AAM9E,SAAO,MAAM,iBAAiB;GAAE;GAAO;GAAQ;GAAY;GAAW;GAAU,CAAC;;CAGlF,AAAS,eAAe,OAA6B,KAA8B;EAClF,MAAM,UAAoC,MAAM,MAAM,OAAO;AAE7D,OAAK,MAAM,CAAC,SAAS,aAAa,OAAO,QAAQ,IAAI,EAAE;GACtD,MAAM,gBAAgB,QAAQ;AAC9B,OACC,iBAAiB,GAAG,UAAU,MAAM,IAAI,SAAS,UAAU,UACxD,GAAG,eAAe,SAAS,IAAI,cAAc,cAC7C,MAAM,QAAQ,SAAS,MAAM,CAEhC,KAAI,WAAW,GAAG,QAAQ,SAAS,MAAM,IAAI,IAAI,cAAc,YAAY,CAAC,CAAC;;AAG/E,SAAO,MAAM,eAAe,OAAO,IAAI;;;AAIzC,SAAS,UAIR,QACA,QAGC;CACD,MAAM,UAAU,IAAI,aAAa,EAAE,QAAQ,OAAO,QAAQ,CAAC;CAC3D,IAAI;AACJ,KAAI,OAAO,WAAW,KACrB,UAAS,IAAI,eAAe;UAClB,OAAO,WAAW,MAC5B,UAAS,OAAO;CAGjB,IAAI;AACJ,KAAI,OAAO,QAAQ;EAClB,MAAM,eAAe,GAAG,8BACvB,OAAO,QACP,GAAG,4BACH;AACD,WAAS;GACR,YAAY,OAAO;GACnB,QAAQ,aAAa;GACrB,eAAe,aAAa;GAC5B;;CAGF,MAAM,YAAY,OAAO,aAAa,EAAE;CAMxC,MAAM,KAAK,IAAI,qBAAqB,SALpB,IAAI,kBAAkB,QAAQ,SAAS,WAAW,QAAQ;EACzE,GAAG;EACH;EACA,OAAO,OAAO;EACd,EAAE,OAAU,EACyC,WAAW,QAA0C,KAAK;AAChH,CAAO,GAAI,UAAU;AACrB,CAAO,GAAI,SAAS,OAAO;AAC3B,KAAW,GAAI,OACd,CAAO,GAAI,OAAO,gBAAgB,OAAO,OAAO;AAGjD,QAAO;;AAGR,SAAgB,QAKf,GAAG,QAkBF;AACD,KAAK,OAAO,GAA4B,QAAQ;EAC/C,MAAM,EAAE,QAAQ,GAAG,kBAAkB,OAAO;AAI5C,SAAO,UAAU,QAAQ,cAAc;;CAGxC,MAAM,EAAE,YAAY,GAAG,kBAAkB,OAAO;CAGhD,MAAM,EAAE,aAAa,UAAU,WAAW,GAAG,cAAc;AAG3D,QAAO,UADU,IAAI,cAAc,UAAU,EAClB;EAAE;EAAa;EAAU;EAAW,GAAG;EAAe,CAAC;;;CAI3E,SAAS,KAIf,QAGC;AACD,SAAO,UAAU,EAAE,EAAS,OAAO"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
let __pg_core_async_session_ts = require("../../pg-core/async/session.cjs");
|
|
4
3
|
let __migrator_ts = require("../../migrator.cjs");
|
|
4
|
+
let __pg_core_async_session_ts = require("../../pg-core/async/session.cjs");
|
|
5
5
|
|
|
6
6
|
//#region src/aws-data-api/pg/migrator.ts
|
|
7
7
|
async function migrate(db, config) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { migrate as migrate$1 } from "../../pg-core/async/session.js";
|
|
2
1
|
import { readMigrationFiles } from "../../migrator.js";
|
|
2
|
+
import { migrate as migrate$1 } from "../../pg-core/async/session.js";
|
|
3
3
|
|
|
4
4
|
//#region src/aws-data-api/pg/migrator.ts
|
|
5
5
|
async function migrate(db, config) {
|
|
@@ -2,11 +2,11 @@ import { entityKind } from "../../entity.js";
|
|
|
2
2
|
import { QueryWithTypings, SQL } from "../../sql/sql.js";
|
|
3
3
|
import * as V1 from "../../_relations.js";
|
|
4
4
|
import { Logger } from "../../logger.js";
|
|
5
|
-
import { PgDialect } from "../../pg-core/dialect.js";
|
|
6
5
|
import { PgAsyncPreparedQuery, PgAsyncSession, PgAsyncTransaction } from "../../pg-core/async/session.js";
|
|
7
6
|
import { Cache } from "../../cache/core/cache.js";
|
|
8
7
|
import { AnyRelations } from "../../relations.js";
|
|
9
8
|
import { ExecuteStatementCommandOutput, RDSDataClient } from "@aws-sdk/client-rds-data";
|
|
9
|
+
import { PgDialect } from "../../pg-core/dialect.js";
|
|
10
10
|
import { WithCacheConfig } from "../../cache/core/types.js";
|
|
11
11
|
import { PgQueryResultHKT, PgTransactionConfig, PreparedQueryConfig } from "../../pg-core/session.js";
|
|
12
12
|
import { SelectedFieldsOrdered } from "../../pg-core/query-builders/select.types.js";
|
|
@@ -3,8 +3,8 @@ import { DrizzleTypeError } from "../utils.js";
|
|
|
3
3
|
import { Query } from "../sql/sql.js";
|
|
4
4
|
import * as V1 from "../_relations.js";
|
|
5
5
|
import { Logger } from "../logger.js";
|
|
6
|
-
import { Cache } from "../cache/core/index.js";
|
|
7
6
|
import { SQLiteSyncDialect } from "../sqlite-core/dialect.js";
|
|
7
|
+
import { Cache } from "../cache/core/index.js";
|
|
8
8
|
import { SQLiteTransaction } from "../sqlite-core/index.js";
|
|
9
9
|
import { PreparedQueryConfig as PreparedQueryConfig$1, SQLiteExecuteMethod as SQLiteExecuteMethod$1, SQLitePreparedQuery as SQLitePreparedQuery$1, SQLiteSession as SQLiteSession$1, SQLiteTransactionConfig as SQLiteTransactionConfig$1 } from "../sqlite-core/session.js";
|
|
10
10
|
import { AnyRelations } from "../relations.js";
|
package/bun-sql/driver.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { BunMySqlDatabase, BunMySqlDrizzleConfig } from "./mysql/driver.js";
|
|
|
2
2
|
import { BunSQLDatabase } from "./postgres/driver.js";
|
|
3
3
|
import { BunSQLiteDatabase } from "./sqlite/driver.js";
|
|
4
4
|
import { DrizzleConfig } from "../utils.js";
|
|
5
|
-
import { SQL } from "bun";
|
|
6
5
|
import { AnyRelations, EmptyRelations } from "../relations.js";
|
|
6
|
+
import { SQL } from "bun";
|
|
7
7
|
|
|
8
8
|
//#region src/bun-sql/driver.d.ts
|
|
9
9
|
declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>, TRelations extends AnyRelations = EmptyRelations, TClient extends SQL = SQL>(...params: [string] | [string, DrizzleConfig<TSchema, TRelations>] | [(DrizzleConfig<TSchema, TRelations> & ({
|
package/bun-sql/mysql/driver.cjs
CHANGED
|
@@ -5,10 +5,10 @@ let __entity_ts = require("../../entity.cjs");
|
|
|
5
5
|
let ___relations_ts = require("../../_relations.cjs");
|
|
6
6
|
___relations_ts = require_runtime.__toESM(___relations_ts);
|
|
7
7
|
let __logger_ts = require("../../logger.cjs");
|
|
8
|
-
let bun = require("bun");
|
|
9
8
|
let __errors_ts = require("../../errors.cjs");
|
|
10
9
|
let __mysql_core_db_ts = require("../../mysql-core/db.cjs");
|
|
11
10
|
let __mysql_core_dialect_ts = require("../../mysql-core/dialect.cjs");
|
|
11
|
+
let bun = require("bun");
|
|
12
12
|
|
|
13
13
|
//#region src/bun-sql/mysql/driver.ts
|
|
14
14
|
var BunMySqlDatabase = class extends __mysql_core_db_ts.MySqlDatabase {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BunMySqlPreparedQueryHKT, BunMySqlQueryResultHKT } from "./session.js";
|
|
2
2
|
import { entityKind } from "../../entity.js";
|
|
3
3
|
import { DrizzleConfig } from "../../utils.js";
|
|
4
|
-
import { SQL } from "bun";
|
|
5
4
|
import { MySqlDatabase } from "../../mysql-core/db.js";
|
|
6
5
|
import { Mode } from "../../mysql-core/session.js";
|
|
7
6
|
import { AnyRelations, EmptyRelations } from "../../relations.js";
|
|
7
|
+
import { SQL } from "bun";
|
|
8
8
|
|
|
9
9
|
//#region src/bun-sql/mysql/driver.d.ts
|
|
10
10
|
type BunMySqlDrizzleConfig<TSchema extends Record<string, unknown> = Record<string, never>, TRelations extends AnyRelations = EmptyRelations> = Omit<DrizzleConfig<TSchema, TRelations>, 'schema'> & ({
|
package/bun-sql/mysql/driver.js
CHANGED
|
@@ -2,10 +2,10 @@ import { BunMySqlSession } from "./session.js";
|
|
|
2
2
|
import { entityKind } from "../../entity.js";
|
|
3
3
|
import * as V1 from "../../_relations.js";
|
|
4
4
|
import { DefaultLogger } from "../../logger.js";
|
|
5
|
-
import { SQL } from "bun";
|
|
6
5
|
import { DrizzleError } from "../../errors.js";
|
|
7
6
|
import { MySqlDatabase } from "../../mysql-core/db.js";
|
|
8
7
|
import { MySqlDialect } from "../../mysql-core/dialect.js";
|
|
8
|
+
import { SQL } from "bun";
|
|
9
9
|
|
|
10
10
|
//#region src/bun-sql/mysql/driver.ts
|
|
11
11
|
var BunMySqlDatabase = class extends MySqlDatabase {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
let __entity_ts = require("../../entity.cjs");
|
|
4
|
-
let __column_ts = require("../../column.cjs");
|
|
5
4
|
let __utils_ts = require("../../utils.cjs");
|
|
5
|
+
let __column_ts = require("../../column.cjs");
|
|
6
6
|
let __sql_sql_ts = require("../../sql/sql.cjs");
|
|
7
7
|
let __logger_ts = require("../../logger.cjs");
|
|
8
8
|
let __cache_core_index_ts = require("../../cache/core/index.cjs");
|
|
@@ -4,10 +4,10 @@ import { Query, SQL } from "../../sql/sql.js";
|
|
|
4
4
|
import * as V1 from "../../_relations.js";
|
|
5
5
|
import { Logger } from "../../logger.js";
|
|
6
6
|
import { Cache } from "../../cache/core/index.js";
|
|
7
|
-
import { SQL as SQL$1 } from "bun";
|
|
8
7
|
import { MySqlDialect } from "../../mysql-core/dialect.js";
|
|
9
8
|
import { Mode, MySqlPreparedQuery, MySqlPreparedQueryConfig, MySqlPreparedQueryHKT, MySqlQueryResultHKT, MySqlSession, MySqlTransaction, MySqlTransactionConfig, PreparedQueryKind } from "../../mysql-core/session.js";
|
|
10
9
|
import { AnyRelations } from "../../relations.js";
|
|
10
|
+
import { SQL as SQL$1 } from "bun";
|
|
11
11
|
import { WithCacheConfig } from "../../cache/core/types.js";
|
|
12
12
|
import { SelectedFieldsOrdered } from "../../mysql-core/query-builders/select.types.js";
|
|
13
13
|
|
package/bun-sql/mysql/session.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { entityKind, is } from "../../entity.js";
|
|
2
|
-
import { Column } from "../../column.js";
|
|
3
2
|
import { mapResultRow } from "../../utils.js";
|
|
3
|
+
import { Column } from "../../column.js";
|
|
4
4
|
import { fillPlaceholders } from "../../sql/sql.js";
|
|
5
5
|
import { NoopLogger } from "../../logger.js";
|
|
6
6
|
import { NoopCache } from "../../cache/core/index.js";
|
|
@@ -2,8 +2,8 @@ import { BunSQLQueryResultHKT } from "./session.js";
|
|
|
2
2
|
import { entityKind } from "../../entity.js";
|
|
3
3
|
import { DrizzleConfig } from "../../utils.js";
|
|
4
4
|
import { PgAsyncDatabase } from "../../pg-core/async/db.js";
|
|
5
|
-
import { SQL } from "bun";
|
|
6
5
|
import { AnyRelations, EmptyRelations } from "../../relations.js";
|
|
6
|
+
import { SQL } from "bun";
|
|
7
7
|
|
|
8
8
|
//#region src/bun-sql/postgres/driver.d.ts
|
|
9
9
|
declare class BunSQLDatabase<TSchema extends Record<string, unknown> = Record<string, never>, TRelations extends AnyRelations = EmptyRelations> extends PgAsyncDatabase<BunSQLQueryResultHKT, TSchema, TRelations> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
let __pg_core_async_session_ts = require("../../pg-core/async/session.cjs");
|
|
4
3
|
let __migrator_ts = require("../../migrator.cjs");
|
|
4
|
+
let __pg_core_async_session_ts = require("../../pg-core/async/session.cjs");
|
|
5
5
|
|
|
6
6
|
//#region src/bun-sql/postgres/migrator.ts
|
|
7
7
|
async function migrate(db, config) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { migrate as migrate$1 } from "../../pg-core/async/session.js";
|
|
2
1
|
import { readMigrationFiles } from "../../migrator.js";
|
|
2
|
+
import { migrate as migrate$1 } from "../../pg-core/async/session.js";
|
|
3
3
|
|
|
4
4
|
//#region src/bun-sql/postgres/migrator.ts
|
|
5
5
|
async function migrate(db, config) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
let __entity_ts = require("../../entity.cjs");
|
|
4
|
-
let __tracing_ts = require("../../tracing.cjs");
|
|
5
4
|
let __utils_ts = require("../../utils.cjs");
|
|
6
5
|
let __sql_sql_ts = require("../../sql/sql.cjs");
|
|
6
|
+
let __tracing_ts = require("../../tracing.cjs");
|
|
7
7
|
let __logger_ts = require("../../logger.cjs");
|
|
8
8
|
let __cache_core_index_ts = require("../../cache/core/index.cjs");
|
|
9
9
|
let __pg_core_async_session_ts = require("../../pg-core/async/session.cjs");
|
|
@@ -3,11 +3,11 @@ import { Assume } from "../../utils.js";
|
|
|
3
3
|
import { Query } from "../../sql/sql.js";
|
|
4
4
|
import * as V1 from "../../_relations.js";
|
|
5
5
|
import { Logger } from "../../logger.js";
|
|
6
|
-
import { PgDialect } from "../../pg-core/dialect.js";
|
|
7
6
|
import { Cache } from "../../cache/core/index.js";
|
|
8
7
|
import { PgAsyncPreparedQuery, PgAsyncSession, PgAsyncTransaction } from "../../pg-core/async/session.js";
|
|
9
|
-
import { SQL as SQL$1, SavepointSQL, TransactionSQL } from "bun";
|
|
10
8
|
import { AnyRelations } from "../../relations.js";
|
|
9
|
+
import { PgDialect } from "../../pg-core/dialect.js";
|
|
10
|
+
import { SQL as SQL$1, SavepointSQL, TransactionSQL } from "bun";
|
|
11
11
|
import { WithCacheConfig } from "../../cache/core/types.js";
|
|
12
12
|
import { PgQueryResultHKT, PgTransactionConfig, PreparedQueryConfig } from "../../pg-core/session.js";
|
|
13
13
|
import { SelectedFieldsOrdered } from "../../pg-core/query-builders/select.types.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { entityKind } from "../../entity.js";
|
|
2
|
-
import { tracer } from "../../tracing.js";
|
|
3
2
|
import { mapResultRow } from "../../utils.js";
|
|
4
3
|
import { fillPlaceholders } from "../../sql/sql.js";
|
|
4
|
+
import { tracer } from "../../tracing.js";
|
|
5
5
|
import { NoopLogger } from "../../logger.js";
|
|
6
6
|
import { NoopCache } from "../../cache/core/index.js";
|
|
7
7
|
import { PgAsyncPreparedQuery, PgAsyncSession, PgAsyncTransaction } from "../../pg-core/async/session.js";
|
|
@@ -5,9 +5,9 @@ let __entity_ts = require("../../entity.cjs");
|
|
|
5
5
|
let ___relations_ts = require("../../_relations.cjs");
|
|
6
6
|
___relations_ts = require_runtime.__toESM(___relations_ts);
|
|
7
7
|
let __logger_ts = require("../../logger.cjs");
|
|
8
|
-
let bun = require("bun");
|
|
9
8
|
let __sqlite_core_db_ts = require("../../sqlite-core/db.cjs");
|
|
10
9
|
let __sqlite_core_dialect_ts = require("../../sqlite-core/dialect.cjs");
|
|
10
|
+
let bun = require("bun");
|
|
11
11
|
|
|
12
12
|
//#region src/bun-sql/sqlite/driver.ts
|
|
13
13
|
var BunSQLiteDatabase = class extends __sqlite_core_db_ts.BaseSQLiteDatabase {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BunSQLiteRunResult } from "./session.js";
|
|
2
2
|
import { entityKind } from "../../entity.js";
|
|
3
3
|
import { DrizzleConfig } from "../../utils.js";
|
|
4
|
-
import { SQL } from "bun";
|
|
5
4
|
import { BaseSQLiteDatabase } from "../../sqlite-core/db.js";
|
|
6
5
|
import { AnyRelations, EmptyRelations } from "../../relations.js";
|
|
6
|
+
import { SQL } from "bun";
|
|
7
7
|
|
|
8
8
|
//#region src/bun-sql/sqlite/driver.d.ts
|
|
9
9
|
declare class BunSQLiteDatabase<TSchema extends Record<string, unknown> = Record<string, never>, TRelations extends AnyRelations = EmptyRelations> extends BaseSQLiteDatabase<'async', BunSQLiteRunResult, TSchema, TRelations> {
|
package/bun-sql/sqlite/driver.js
CHANGED
|
@@ -2,9 +2,9 @@ import { BunSQLiteSession } from "./session.js";
|
|
|
2
2
|
import { entityKind } from "../../entity.js";
|
|
3
3
|
import * as V1 from "../../_relations.js";
|
|
4
4
|
import { DefaultLogger } from "../../logger.js";
|
|
5
|
-
import { SQL } from "bun";
|
|
6
5
|
import { BaseSQLiteDatabase } from "../../sqlite-core/db.js";
|
|
7
6
|
import { SQLiteAsyncDialect } from "../../sqlite-core/dialect.js";
|
|
7
|
+
import { SQL } from "bun";
|
|
8
8
|
|
|
9
9
|
//#region src/bun-sql/sqlite/driver.ts
|
|
10
10
|
var BunSQLiteDatabase = class extends BaseSQLiteDatabase {
|
|
@@ -5,9 +5,9 @@ let __utils_ts = require("../../utils.cjs");
|
|
|
5
5
|
let __sql_sql_ts = require("../../sql/sql.cjs");
|
|
6
6
|
let __logger_ts = require("../../logger.cjs");
|
|
7
7
|
let __cache_core_index_ts = require("../../cache/core/index.cjs");
|
|
8
|
-
let __errors_ts = require("../../errors.cjs");
|
|
9
8
|
let __sqlite_core_index_ts = require("../../sqlite-core/index.cjs");
|
|
10
9
|
let __sqlite_core_session_ts = require("../../sqlite-core/session.cjs");
|
|
10
|
+
let __errors_ts = require("../../errors.cjs");
|
|
11
11
|
|
|
12
12
|
//#region src/bun-sql/sqlite/session.ts
|
|
13
13
|
var BunSQLiteSession = class BunSQLiteSession extends __sqlite_core_session_ts.SQLiteSession {
|
|
@@ -2,12 +2,12 @@ import { entityKind } from "../../entity.js";
|
|
|
2
2
|
import { Query, SQL } from "../../sql/sql.js";
|
|
3
3
|
import * as V1 from "../../_relations.js";
|
|
4
4
|
import { Logger } from "../../logger.js";
|
|
5
|
-
import { Cache } from "../../cache/core/index.js";
|
|
6
|
-
import { SQL as SQL$1 } from "bun";
|
|
7
5
|
import { SQLiteAsyncDialect } from "../../sqlite-core/dialect.js";
|
|
6
|
+
import { Cache } from "../../cache/core/index.js";
|
|
8
7
|
import { SQLiteTransaction } from "../../sqlite-core/index.js";
|
|
9
8
|
import { PreparedQueryConfig as PreparedQueryConfig$1, Result, SQLiteExecuteMethod as SQLiteExecuteMethod$1, SQLitePreparedQuery as SQLitePreparedQuery$1, SQLiteSession as SQLiteSession$1, SQLiteTransactionConfig as SQLiteTransactionConfig$1 } from "../../sqlite-core/session.js";
|
|
10
9
|
import { AnyRelations } from "../../relations.js";
|
|
10
|
+
import { SQL as SQL$1 } from "bun";
|
|
11
11
|
import { WithCacheConfig } from "../../cache/core/types.js";
|
|
12
12
|
import { SelectedFieldsOrdered as SelectedFieldsOrdered$1 } from "../../sqlite-core/query-builders/select.types.js";
|
|
13
13
|
|
|
@@ -3,9 +3,9 @@ import { mapResultRow } from "../../utils.js";
|
|
|
3
3
|
import { fillPlaceholders } from "../../sql/sql.js";
|
|
4
4
|
import { NoopLogger } from "../../logger.js";
|
|
5
5
|
import { NoopCache } from "../../cache/core/index.js";
|
|
6
|
-
import { DrizzleError } from "../../errors.js";
|
|
7
6
|
import { SQLiteTransaction } from "../../sqlite-core/index.js";
|
|
8
7
|
import { SQLitePreparedQuery as SQLitePreparedQuery$1, SQLiteSession as SQLiteSession$1 } from "../../sqlite-core/session.js";
|
|
8
|
+
import { DrizzleError } from "../../errors.js";
|
|
9
9
|
|
|
10
10
|
//#region src/bun-sql/sqlite/session.ts
|
|
11
11
|
var BunSQLiteSession = class BunSQLiteSession extends SQLiteSession$1 {
|
|
@@ -2,12 +2,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_cache_core_cache = require('./cache.cjs');
|
|
4
4
|
let __entity_ts = require("../../entity.cjs");
|
|
5
|
+
let effect_Schema = require("effect/Schema");
|
|
6
|
+
effect_Schema = require_runtime.__toESM(effect_Schema);
|
|
5
7
|
let effect_Effect = require("effect/Effect");
|
|
6
8
|
effect_Effect = require_runtime.__toESM(effect_Effect);
|
|
7
9
|
let effect_Layer = require("effect/Layer");
|
|
8
10
|
effect_Layer = require_runtime.__toESM(effect_Layer);
|
|
9
|
-
let effect_Schema = require("effect/Schema");
|
|
10
|
-
effect_Schema = require_runtime.__toESM(effect_Schema);
|
|
11
11
|
|
|
12
12
|
//#region src/cache/core/cache-effect.ts
|
|
13
13
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CacheConfig } from "./types.js";
|
|
2
2
|
import { Cache, MutationOption } from "./cache.js";
|
|
3
3
|
import { entityKind } from "../../entity.js";
|
|
4
|
+
import * as Schema$1 from "effect/Schema";
|
|
4
5
|
import * as Effect from "effect/Effect";
|
|
5
6
|
import * as Layer from "effect/Layer";
|
|
6
|
-
import * as Schema$1 from "effect/Schema";
|
|
7
7
|
|
|
8
8
|
//#region src/cache/core/cache-effect.d.ts
|
|
9
9
|
declare const EffectCache_base: Effect.Service.Class<EffectCache, "drizzle-orm/EffectCache", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NoopCache } from "./cache.js";
|
|
2
2
|
import { entityKind } from "../../entity.js";
|
|
3
|
+
import * as Schema$1 from "effect/Schema";
|
|
3
4
|
import * as Effect from "effect/Effect";
|
|
4
5
|
import * as Layer from "effect/Layer";
|
|
5
|
-
import * as Schema$1 from "effect/Schema";
|
|
6
6
|
|
|
7
7
|
//#region src/cache/core/cache-effect.ts
|
|
8
8
|
/**
|
package/cockroach/driver.cjs
CHANGED
|
@@ -5,10 +5,10 @@ let __entity_ts = require("../entity.cjs");
|
|
|
5
5
|
let ___relations_ts = require("../_relations.cjs");
|
|
6
6
|
___relations_ts = require_runtime.__toESM(___relations_ts);
|
|
7
7
|
let __logger_ts = require("../logger.cjs");
|
|
8
|
+
let __cockroach_core_dialect_ts = require("../cockroach-core/dialect.cjs");
|
|
8
9
|
let pg = require("pg");
|
|
9
10
|
pg = require_runtime.__toESM(pg);
|
|
10
11
|
let __cockroach_core_db_ts = require("../cockroach-core/db.cjs");
|
|
11
|
-
let __cockroach_core_dialect_ts = require("../cockroach-core/dialect.cjs");
|
|
12
12
|
|
|
13
13
|
//#region src/cockroach/driver.ts
|
|
14
14
|
var NodeCockroachDriver = class {
|
package/cockroach/driver.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { entityKind } from "../entity.js";
|
|
|
3
3
|
import { DrizzleConfig } from "../utils.js";
|
|
4
4
|
import * as V1 from "../_relations.js";
|
|
5
5
|
import { Logger } from "../logger.js";
|
|
6
|
+
import { CockroachDialect } from "../cockroach-core/dialect.js";
|
|
6
7
|
import { Pool, PoolConfig } from "pg";
|
|
7
8
|
import { CockroachDatabase } from "../cockroach-core/db.js";
|
|
8
|
-
import { CockroachDialect } from "../cockroach-core/dialect.js";
|
|
9
9
|
|
|
10
10
|
//#region src/cockroach/driver.d.ts
|
|
11
11
|
interface CockroachDriverOptions {
|
package/cockroach/driver.js
CHANGED
|
@@ -2,9 +2,9 @@ import { NodeCockroachSession } from "./session.js";
|
|
|
2
2
|
import { entityKind } from "../entity.js";
|
|
3
3
|
import * as V1 from "../_relations.js";
|
|
4
4
|
import { DefaultLogger } from "../logger.js";
|
|
5
|
+
import { CockroachDialect } from "../cockroach-core/dialect.js";
|
|
5
6
|
import pg from "pg";
|
|
6
7
|
import { CockroachDatabase } from "../cockroach-core/db.js";
|
|
7
|
-
import { CockroachDialect } from "../cockroach-core/dialect.js";
|
|
8
8
|
|
|
9
9
|
//#region src/cockroach/driver.ts
|
|
10
10
|
var NodeCockroachDriver = class {
|
package/cockroach/session.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
let __entity_ts = require("../entity.cjs");
|
|
4
|
-
let __tracing_ts = require("../tracing.cjs");
|
|
5
4
|
let __utils_ts = require("../utils.cjs");
|
|
6
5
|
let __sql_sql_ts = require("../sql/sql.cjs");
|
|
6
|
+
let __tracing_ts = require("../tracing.cjs");
|
|
7
7
|
let __logger_ts = require("../logger.cjs");
|
|
8
8
|
let pg = require("pg");
|
|
9
9
|
pg = require_runtime.__toESM(pg);
|
package/cockroach/session.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { Assume } from "../utils.js";
|
|
|
3
3
|
import { Query, SQL } from "../sql/sql.js";
|
|
4
4
|
import * as V1 from "../_relations.js";
|
|
5
5
|
import { Logger } from "../logger.js";
|
|
6
|
-
import pg, { Client, PoolClient, QueryResult, QueryResultRow } from "pg";
|
|
7
6
|
import { CockroachDialect } from "../cockroach-core/dialect.js";
|
|
7
|
+
import pg, { Client, PoolClient, QueryResult, QueryResultRow } from "pg";
|
|
8
8
|
import { CockroachTransaction } from "../cockroach-core/index.js";
|
|
9
9
|
import { CockroachPreparedQuery, CockroachQueryResultHKT, CockroachSession, CockroachTransactionConfig, PreparedQueryConfig } from "../cockroach-core/session.js";
|
|
10
10
|
import { SelectedFieldsOrdered } from "../cockroach-core/query-builders/select.types.js";
|