drizzle-orm 0.39.2-8628c8a → 0.39.2-c7c31ad
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 +328 -0
- package/_relations.cjs.map +1 -0
- package/_relations.d.cts +215 -0
- package/_relations.d.ts +215 -0
- package/_relations.js +316 -0
- package/_relations.js.map +1 -0
- package/alias.cjs.map +1 -1
- package/alias.d.cts +3 -3
- package/alias.d.ts +3 -3
- package/alias.js.map +1 -1
- package/aws-data-api/pg/driver.cjs +19 -5
- package/aws-data-api/pg/driver.cjs.map +1 -1
- package/aws-data-api/pg/driver.d.cts +9 -8
- package/aws-data-api/pg/driver.d.ts +9 -8
- package/aws-data-api/pg/driver.js +9 -8
- package/aws-data-api/pg/driver.js.map +1 -1
- package/aws-data-api/pg/migrator.cjs.map +1 -1
- package/aws-data-api/pg/migrator.d.cts +2 -1
- package/aws-data-api/pg/migrator.d.ts +2 -1
- package/aws-data-api/pg/migrator.js.map +1 -1
- package/aws-data-api/pg/session.cjs +67 -4
- package/aws-data-api/pg/session.cjs.map +1 -1
- package/aws-data-api/pg/session.d.cts +13 -8
- package/aws-data-api/pg/session.d.ts +13 -8
- package/aws-data-api/pg/session.js +67 -4
- package/aws-data-api/pg/session.js.map +1 -1
- package/better-sqlite3/driver.cjs +12 -5
- package/better-sqlite3/driver.cjs.map +1 -1
- package/better-sqlite3/driver.d.cts +7 -6
- package/better-sqlite3/driver.d.ts +7 -6
- package/better-sqlite3/driver.js +12 -8
- package/better-sqlite3/driver.js.map +1 -1
- package/better-sqlite3/migrator.cjs.map +1 -1
- package/better-sqlite3/migrator.d.cts +2 -1
- package/better-sqlite3/migrator.d.ts +2 -1
- package/better-sqlite3/migrator.js.map +1 -1
- package/better-sqlite3/session.cjs +49 -4
- package/better-sqlite3/session.cjs.map +1 -1
- package/better-sqlite3/session.d.cts +14 -8
- package/better-sqlite3/session.d.ts +14 -8
- package/better-sqlite3/session.js +49 -4
- package/better-sqlite3/session.js.map +1 -1
- package/bun-sql/driver.cjs +16 -5
- package/bun-sql/driver.cjs.map +1 -1
- package/bun-sql/driver.d.cts +7 -6
- package/bun-sql/driver.d.ts +7 -6
- package/bun-sql/driver.js +6 -8
- package/bun-sql/driver.js.map +1 -1
- package/bun-sql/migrator.cjs.map +1 -1
- package/bun-sql/migrator.d.cts +2 -1
- package/bun-sql/migrator.d.ts +2 -1
- package/bun-sql/migrator.js.map +1 -1
- package/bun-sql/session.cjs +50 -6
- package/bun-sql/session.cjs.map +1 -1
- package/bun-sql/session.d.cts +14 -9
- package/bun-sql/session.d.ts +14 -9
- package/bun-sql/session.js +50 -6
- package/bun-sql/session.js.map +1 -1
- package/bun-sqlite/driver.cjs +22 -5
- package/bun-sqlite/driver.cjs.map +1 -1
- package/bun-sqlite/driver.d.cts +7 -6
- package/bun-sqlite/driver.d.ts +7 -6
- package/bun-sqlite/driver.js +12 -8
- package/bun-sqlite/driver.js.map +1 -1
- package/bun-sqlite/migrator.cjs.map +1 -1
- package/bun-sqlite/migrator.d.cts +2 -1
- package/bun-sqlite/migrator.d.ts +2 -1
- package/bun-sqlite/migrator.js.map +1 -1
- package/bun-sqlite/session.cjs +49 -4
- package/bun-sqlite/session.cjs.map +1 -1
- package/bun-sqlite/session.d.cts +14 -8
- package/bun-sqlite/session.d.ts +14 -8
- package/bun-sqlite/session.js +49 -4
- package/bun-sqlite/session.js.map +1 -1
- package/column-builder.cjs.map +1 -1
- package/column-builder.d.cts +5 -6
- package/column-builder.d.ts +5 -6
- package/column-builder.js.map +1 -1
- package/d1/driver.cjs +22 -5
- package/d1/driver.cjs.map +1 -1
- package/d1/driver.d.cts +3 -2
- package/d1/driver.d.ts +3 -2
- package/d1/driver.js +12 -8
- package/d1/driver.js.map +1 -1
- package/d1/migrator.cjs.map +1 -1
- package/d1/migrator.d.cts +2 -1
- package/d1/migrator.d.ts +2 -1
- package/d1/migrator.js.map +1 -1
- package/d1/session.cjs +50 -8
- package/d1/session.cjs.map +1 -1
- package/d1/session.d.cts +15 -8
- package/d1/session.d.ts +15 -8
- package/d1/session.js +50 -8
- package/d1/session.js.map +1 -1
- package/durable-sqlite/driver.cjs +16 -5
- package/durable-sqlite/driver.cjs.map +1 -1
- package/durable-sqlite/driver.d.cts +3 -2
- package/durable-sqlite/driver.d.ts +3 -2
- package/durable-sqlite/driver.js +6 -8
- package/durable-sqlite/driver.js.map +1 -1
- package/durable-sqlite/migrator.cjs.map +1 -1
- package/durable-sqlite/migrator.d.cts +2 -1
- package/durable-sqlite/migrator.d.ts +2 -1
- package/durable-sqlite/migrator.js.map +1 -1
- package/durable-sqlite/session.cjs +46 -4
- package/durable-sqlite/session.cjs.map +1 -1
- package/durable-sqlite/session.d.cts +14 -8
- package/durable-sqlite/session.d.ts +14 -8
- package/durable-sqlite/session.js +46 -4
- package/durable-sqlite/session.js.map +1 -1
- package/expo-sqlite/driver.cjs +22 -5
- package/expo-sqlite/driver.cjs.map +1 -1
- package/expo-sqlite/driver.d.cts +3 -2
- package/expo-sqlite/driver.d.ts +3 -2
- package/expo-sqlite/driver.js +12 -8
- package/expo-sqlite/driver.js.map +1 -1
- package/expo-sqlite/migrator.cjs.map +1 -1
- package/expo-sqlite/migrator.d.cts +3 -2
- package/expo-sqlite/migrator.d.ts +3 -2
- package/expo-sqlite/migrator.js.map +1 -1
- package/expo-sqlite/query.cjs +13 -2
- package/expo-sqlite/query.cjs.map +1 -1
- package/expo-sqlite/query.d.cts +2 -1
- package/expo-sqlite/query.d.ts +2 -1
- package/expo-sqlite/query.js +3 -2
- package/expo-sqlite/query.js.map +1 -1
- package/expo-sqlite/session.cjs +47 -4
- package/expo-sqlite/session.cjs.map +1 -1
- package/expo-sqlite/session.d.cts +14 -8
- package/expo-sqlite/session.d.ts +14 -8
- package/expo-sqlite/session.js +47 -4
- package/expo-sqlite/session.js.map +1 -1
- package/libsql/driver-core.cjs +22 -5
- package/libsql/driver-core.cjs.map +1 -1
- package/libsql/driver-core.d.cts +2 -1
- package/libsql/driver-core.d.ts +2 -1
- package/libsql/driver-core.js +12 -8
- package/libsql/driver-core.js.map +1 -1
- package/libsql/driver.cjs.map +1 -1
- package/libsql/driver.d.cts +6 -5
- package/libsql/driver.d.ts +6 -5
- package/libsql/driver.js.map +1 -1
- package/libsql/http/index.cjs.map +1 -1
- package/libsql/http/index.d.cts +6 -5
- package/libsql/http/index.d.ts +6 -5
- package/libsql/http/index.js.map +1 -1
- package/libsql/migrator.cjs.map +1 -1
- package/libsql/migrator.d.cts +2 -1
- package/libsql/migrator.d.ts +2 -1
- package/libsql/migrator.js.map +1 -1
- package/libsql/node/index.cjs.map +1 -1
- package/libsql/node/index.d.cts +6 -5
- package/libsql/node/index.d.ts +6 -5
- package/libsql/node/index.js.map +1 -1
- package/libsql/session.cjs +56 -4
- package/libsql/session.cjs.map +1 -1
- package/libsql/session.d.cts +15 -9
- package/libsql/session.d.ts +15 -9
- package/libsql/session.js +56 -4
- package/libsql/session.js.map +1 -1
- package/libsql/sqlite3/index.cjs.map +1 -1
- package/libsql/sqlite3/index.d.cts +6 -5
- package/libsql/sqlite3/index.d.ts +6 -5
- package/libsql/sqlite3/index.js.map +1 -1
- package/libsql/wasm/index.cjs.map +1 -1
- package/libsql/wasm/index.d.cts +6 -5
- package/libsql/wasm/index.d.ts +6 -5
- package/libsql/wasm/index.js.map +1 -1
- package/libsql/web/index.cjs.map +1 -1
- package/libsql/web/index.d.cts +6 -5
- package/libsql/web/index.d.ts +6 -5
- package/libsql/web/index.js.map +1 -1
- package/libsql/ws/index.cjs.map +1 -1
- package/libsql/ws/index.d.cts +6 -5
- package/libsql/ws/index.d.ts +6 -5
- package/libsql/ws/index.js.map +1 -1
- package/mysql-core/db.cjs +30 -6
- package/mysql-core/db.cjs.map +1 -1
- package/mysql-core/db.d.cts +15 -8
- package/mysql-core/db.d.ts +15 -8
- package/mysql-core/db.js +29 -5
- package/mysql-core/db.js.map +1 -1
- package/mysql-core/dialect.cjs +187 -15
- package/mysql-core/dialect.cjs.map +1 -1
- package/mysql-core/dialect.d.cts +36 -13
- package/mysql-core/dialect.d.ts +36 -13
- package/mysql-core/dialect.js +185 -22
- package/mysql-core/dialect.js.map +1 -1
- package/mysql-core/query-builders/_query.cjs +149 -0
- package/mysql-core/query-builders/_query.cjs.map +1 -0
- package/mysql-core/query-builders/_query.d.cts +44 -0
- package/mysql-core/query-builders/_query.d.ts +44 -0
- package/mysql-core/query-builders/_query.js +114 -0
- package/mysql-core/query-builders/_query.js.map +1 -0
- package/mysql-core/query-builders/count.cjs.map +1 -1
- package/mysql-core/query-builders/count.d.cts +1 -1
- package/mysql-core/query-builders/count.d.ts +1 -1
- package/mysql-core/query-builders/count.js.map +1 -1
- package/mysql-core/query-builders/query.cjs +18 -31
- package/mysql-core/query-builders/query.cjs.map +1 -1
- package/mysql-core/query-builders/query.d.cts +8 -10
- package/mysql-core/query-builders/query.d.ts +8 -10
- package/mysql-core/query-builders/query.js +18 -31
- package/mysql-core/query-builders/query.js.map +1 -1
- package/mysql-core/session.cjs +3 -2
- package/mysql-core/session.cjs.map +1 -1
- package/mysql-core/session.d.cts +10 -7
- package/mysql-core/session.d.ts +10 -7
- package/mysql-core/session.js +3 -2
- package/mysql-core/session.js.map +1 -1
- package/mysql-proxy/driver.cjs +22 -5
- package/mysql-proxy/driver.cjs.map +1 -1
- package/mysql-proxy/driver.d.cts +3 -2
- package/mysql-proxy/driver.d.ts +3 -2
- package/mysql-proxy/driver.js +12 -8
- package/mysql-proxy/driver.js.map +1 -1
- package/mysql-proxy/migrator.cjs.map +1 -1
- package/mysql-proxy/migrator.d.cts +2 -1
- package/mysql-proxy/migrator.d.ts +2 -1
- package/mysql-proxy/migrator.js.map +1 -1
- package/mysql-proxy/session.cjs +27 -2
- package/mysql-proxy/session.cjs.map +1 -1
- package/mysql-proxy/session.d.cts +13 -8
- package/mysql-proxy/session.d.ts +13 -8
- package/mysql-proxy/session.js +27 -2
- package/mysql-proxy/session.js.map +1 -1
- package/mysql2/driver.cjs +24 -7
- package/mysql2/driver.cjs.map +1 -1
- package/mysql2/driver.d.cts +10 -9
- package/mysql2/driver.d.ts +10 -9
- package/mysql2/driver.js +14 -10
- package/mysql2/driver.js.map +1 -1
- package/mysql2/migrator.cjs.map +1 -1
- package/mysql2/migrator.d.cts +2 -1
- package/mysql2/migrator.d.ts +2 -1
- package/mysql2/migrator.js.map +1 -1
- package/mysql2/session.cjs +30 -2
- package/mysql2/session.cjs.map +1 -1
- package/mysql2/session.d.cts +13 -8
- package/mysql2/session.d.ts +13 -8
- package/mysql2/session.js +30 -2
- package/mysql2/session.js.map +1 -1
- package/neon-http/driver.cjs +21 -7
- package/neon-http/driver.cjs.map +1 -1
- package/neon-http/driver.d.cts +10 -9
- package/neon-http/driver.d.ts +10 -9
- package/neon-http/driver.js +11 -7
- package/neon-http/driver.js.map +1 -1
- package/neon-http/migrator.cjs.map +1 -1
- package/neon-http/migrator.d.cts +2 -1
- package/neon-http/migrator.d.ts +2 -1
- package/neon-http/migrator.js.map +1 -1
- package/neon-http/session.cjs +32 -2
- package/neon-http/session.cjs.map +1 -1
- package/neon-http/session.d.cts +13 -8
- package/neon-http/session.d.ts +13 -8
- package/neon-http/session.js +32 -2
- package/neon-http/session.js.map +1 -1
- package/neon-serverless/driver.cjs +18 -7
- package/neon-serverless/driver.cjs.map +1 -1
- package/neon-serverless/driver.d.cts +9 -8
- package/neon-serverless/driver.d.ts +9 -8
- package/neon-serverless/driver.js +8 -10
- package/neon-serverless/driver.js.map +1 -1
- package/neon-serverless/migrator.cjs.map +1 -1
- package/neon-serverless/migrator.d.cts +2 -1
- package/neon-serverless/migrator.d.ts +2 -1
- package/neon-serverless/migrator.js.map +1 -1
- package/neon-serverless/session.cjs +40 -5
- package/neon-serverless/session.cjs.map +1 -1
- package/neon-serverless/session.d.cts +13 -8
- package/neon-serverless/session.d.ts +13 -8
- package/neon-serverless/session.js +40 -5
- package/neon-serverless/session.js.map +1 -1
- package/node-postgres/driver.cjs +13 -7
- package/node-postgres/driver.cjs.map +1 -1
- package/node-postgres/driver.d.cts +9 -8
- package/node-postgres/driver.d.ts +9 -8
- package/node-postgres/driver.js +13 -10
- package/node-postgres/driver.js.map +1 -1
- package/node-postgres/migrator.cjs.map +1 -1
- package/node-postgres/migrator.d.cts +2 -1
- package/node-postgres/migrator.d.ts +2 -1
- package/node-postgres/migrator.js.map +1 -1
- package/node-postgres/session.cjs +45 -4
- package/node-postgres/session.cjs.map +1 -1
- package/node-postgres/session.d.cts +13 -8
- package/node-postgres/session.d.ts +13 -8
- package/node-postgres/session.js +45 -4
- package/node-postgres/session.js.map +1 -1
- package/op-sqlite/driver.cjs +22 -5
- package/op-sqlite/driver.cjs.map +1 -1
- package/op-sqlite/driver.d.cts +3 -2
- package/op-sqlite/driver.d.ts +3 -2
- package/op-sqlite/driver.js +12 -8
- package/op-sqlite/driver.js.map +1 -1
- package/op-sqlite/migrator.cjs.map +1 -1
- package/op-sqlite/migrator.d.cts +3 -2
- package/op-sqlite/migrator.d.ts +3 -2
- package/op-sqlite/migrator.js.map +1 -1
- package/op-sqlite/session.cjs +47 -4
- package/op-sqlite/session.cjs.map +1 -1
- package/op-sqlite/session.d.cts +14 -8
- package/op-sqlite/session.d.ts +14 -8
- package/op-sqlite/session.js +47 -4
- package/op-sqlite/session.js.map +1 -1
- package/package.json +367 -1052
- package/pg-core/db.cjs +32 -5
- package/pg-core/db.cjs.map +1 -1
- package/pg-core/db.d.cts +16 -9
- package/pg-core/db.d.ts +16 -9
- package/pg-core/db.js +31 -4
- package/pg-core/db.js.map +1 -1
- package/pg-core/dialect.cjs +162 -488
- package/pg-core/dialect.cjs.map +1 -1
- package/pg-core/dialect.d.cts +27 -8
- package/pg-core/dialect.d.ts +27 -8
- package/pg-core/dialect.js +160 -495
- package/pg-core/dialect.js.map +1 -1
- package/{gel-core/query-builders/query.cjs → pg-core/query-builders/_query.cjs} +31 -15
- package/pg-core/query-builders/_query.cjs.map +1 -0
- package/pg-core/query-builders/_query.d.cts +47 -0
- package/pg-core/query-builders/_query.d.ts +47 -0
- package/{gel-core/query-builders/query.js → pg-core/query-builders/_query.js} +19 -15
- package/pg-core/query-builders/_query.js.map +1 -0
- package/pg-core/query-builders/count.cjs.map +1 -1
- package/pg-core/query-builders/count.d.cts +1 -1
- package/pg-core/query-builders/count.d.ts +1 -1
- package/pg-core/query-builders/count.js.map +1 -1
- package/pg-core/query-builders/query.cjs +15 -18
- package/pg-core/query-builders/query.cjs.map +1 -1
- package/pg-core/query-builders/query.d.cts +6 -6
- package/pg-core/query-builders/query.d.ts +6 -6
- package/pg-core/query-builders/query.js +15 -18
- package/pg-core/query-builders/query.js.map +1 -1
- package/pg-core/session.cjs +3 -2
- package/pg-core/session.cjs.map +1 -1
- package/pg-core/session.d.cts +9 -6
- package/pg-core/session.d.ts +9 -6
- package/pg-core/session.js +3 -2
- package/pg-core/session.js.map +1 -1
- package/pg-core/table.cjs +0 -2
- package/pg-core/table.cjs.map +1 -1
- package/pg-core/table.js +0 -2
- package/pg-core/table.js.map +1 -1
- package/pg-proxy/driver.cjs +21 -5
- package/pg-proxy/driver.cjs.map +1 -1
- package/pg-proxy/driver.d.cts +3 -2
- package/pg-proxy/driver.d.ts +3 -2
- package/pg-proxy/driver.js +11 -8
- package/pg-proxy/driver.js.map +1 -1
- package/pg-proxy/migrator.cjs.map +1 -1
- package/pg-proxy/migrator.d.cts +2 -1
- package/pg-proxy/migrator.d.ts +2 -1
- package/pg-proxy/migrator.js.map +1 -1
- package/pg-proxy/session.cjs +37 -2
- package/pg-proxy/session.cjs.map +1 -1
- package/pg-proxy/session.d.cts +13 -8
- package/pg-proxy/session.d.ts +13 -8
- package/pg-proxy/session.js +37 -2
- package/pg-proxy/session.js.map +1 -1
- package/pglite/driver.cjs +23 -7
- package/pglite/driver.cjs.map +1 -1
- package/pglite/driver.d.cts +9 -8
- package/pglite/driver.d.ts +9 -8
- package/pglite/driver.js +13 -10
- package/pglite/driver.js.map +1 -1
- package/pglite/migrator.cjs.map +1 -1
- package/pglite/migrator.d.cts +2 -1
- package/pglite/migrator.d.ts +2 -1
- package/pglite/migrator.js.map +1 -1
- package/pglite/session.cjs +34 -3
- package/pglite/session.cjs.map +1 -1
- package/pglite/session.d.cts +13 -8
- package/pglite/session.d.ts +13 -8
- package/pglite/session.js +34 -3
- package/pglite/session.js.map +1 -1
- package/planetscale-serverless/driver.cjs +22 -5
- package/planetscale-serverless/driver.cjs.map +1 -1
- package/planetscale-serverless/driver.d.cts +7 -6
- package/planetscale-serverless/driver.d.ts +7 -6
- package/planetscale-serverless/driver.js +12 -8
- package/planetscale-serverless/driver.js.map +1 -1
- package/planetscale-serverless/migrator.cjs.map +1 -1
- package/planetscale-serverless/migrator.d.cts +2 -1
- package/planetscale-serverless/migrator.d.ts +2 -1
- package/planetscale-serverless/migrator.js.map +1 -1
- package/planetscale-serverless/session.cjs +45 -5
- package/planetscale-serverless/session.cjs.map +1 -1
- package/planetscale-serverless/session.d.cts +14 -9
- package/planetscale-serverless/session.d.ts +14 -9
- package/planetscale-serverless/session.js +45 -5
- package/planetscale-serverless/session.js.map +1 -1
- package/postgres-js/driver.cjs +6 -5
- package/postgres-js/driver.cjs.map +1 -1
- package/postgres-js/driver.d.cts +7 -6
- package/postgres-js/driver.d.ts +7 -6
- package/postgres-js/driver.js +6 -8
- package/postgres-js/driver.js.map +1 -1
- package/postgres-js/migrator.cjs.map +1 -1
- package/postgres-js/migrator.d.cts +2 -1
- package/postgres-js/migrator.d.ts +2 -1
- package/postgres-js/migrator.js.map +1 -1
- package/postgres-js/session.cjs +51 -6
- package/postgres-js/session.cjs.map +1 -1
- package/postgres-js/session.d.cts +15 -9
- package/postgres-js/session.d.ts +15 -9
- package/postgres-js/session.js +51 -6
- package/postgres-js/session.js.map +1 -1
- package/prisma/mysql/driver.cjs +1 -1
- package/prisma/mysql/driver.cjs.map +1 -1
- package/prisma/mysql/driver.js +1 -1
- package/prisma/mysql/driver.js.map +1 -1
- package/prisma/mysql/session.cjs +3 -0
- package/prisma/mysql/session.cjs.map +1 -1
- package/prisma/mysql/session.d.cts +3 -1
- package/prisma/mysql/session.d.ts +3 -1
- package/prisma/mysql/session.js +3 -0
- package/prisma/mysql/session.js.map +1 -1
- package/prisma/pg/driver.cjs +1 -1
- package/prisma/pg/driver.cjs.map +1 -1
- package/prisma/pg/driver.js +1 -1
- package/prisma/pg/driver.js.map +1 -1
- package/prisma/pg/session.cjs +3 -0
- package/prisma/pg/session.cjs.map +1 -1
- package/prisma/pg/session.d.cts +3 -1
- package/prisma/pg/session.d.ts +3 -1
- package/prisma/pg/session.js +3 -0
- package/prisma/pg/session.js.map +1 -1
- package/prisma/sqlite/driver.cjs +1 -1
- package/prisma/sqlite/driver.cjs.map +1 -1
- package/prisma/sqlite/driver.js +1 -1
- package/prisma/sqlite/driver.js.map +1 -1
- package/prisma/sqlite/session.cjs +3 -0
- package/prisma/sqlite/session.cjs.map +1 -1
- package/prisma/sqlite/session.d.cts +4 -2
- package/prisma/sqlite/session.d.ts +4 -2
- package/prisma/sqlite/session.js +3 -0
- package/prisma/sqlite/session.js.map +1 -1
- package/relations.cjs +626 -245
- package/relations.cjs.map +1 -1
- package/relations.d.cts +305 -140
- package/relations.d.ts +305 -140
- package/relations.js +619 -240
- package/relations.js.map +1 -1
- package/singlestore/driver.cjs +1 -1
- package/singlestore/driver.cjs.map +1 -1
- package/singlestore/driver.d.cts +1 -1
- package/singlestore/driver.d.ts +1 -1
- package/singlestore/driver.js +3 -3
- package/singlestore/driver.js.map +1 -1
- package/singlestore/session.cjs.map +1 -1
- package/singlestore/session.d.cts +4 -4
- package/singlestore/session.d.ts +4 -4
- package/singlestore/session.js.map +1 -1
- package/singlestore-core/db.cjs.map +1 -1
- package/singlestore-core/db.d.cts +3 -3
- package/singlestore-core/db.d.ts +3 -3
- package/singlestore-core/db.js.map +1 -1
- package/singlestore-core/dialect.cjs +16 -6
- package/singlestore-core/dialect.cjs.map +1 -1
- package/singlestore-core/dialect.d.cts +6 -6
- package/singlestore-core/dialect.d.ts +6 -6
- package/singlestore-core/dialect.js +6 -12
- package/singlestore-core/dialect.js.map +1 -1
- package/singlestore-core/query-builders/query.cjs +12 -2
- package/singlestore-core/query-builders/query.cjs.map +1 -1
- package/singlestore-core/query-builders/query.d.cts +6 -6
- package/singlestore-core/query-builders/query.d.ts +6 -6
- package/singlestore-core/query-builders/query.js +2 -4
- package/singlestore-core/query-builders/query.js.map +1 -1
- package/singlestore-core/session.cjs.map +1 -1
- package/singlestore-core/session.d.cts +5 -5
- package/singlestore-core/session.d.ts +5 -5
- package/singlestore-core/session.js.map +1 -1
- package/singlestore-proxy/driver.cjs +1 -1
- package/singlestore-proxy/driver.cjs.map +1 -1
- package/singlestore-proxy/driver.js +3 -3
- package/singlestore-proxy/driver.js.map +1 -1
- package/singlestore-proxy/session.cjs.map +1 -1
- package/singlestore-proxy/session.d.cts +4 -4
- package/singlestore-proxy/session.d.ts +4 -4
- package/singlestore-proxy/session.js.map +1 -1
- package/sql/expressions/conditions.cjs.map +1 -1
- package/sql/expressions/conditions.d.cts +4 -4
- package/sql/expressions/conditions.d.ts +4 -4
- package/sql/expressions/conditions.js.map +1 -1
- package/sql/sql.cjs +21 -0
- package/sql/sql.cjs.map +1 -1
- package/sql/sql.d.cts +8 -8
- package/sql/sql.d.ts +8 -8
- package/sql/sql.js +22 -1
- package/sql/sql.js.map +1 -1
- package/sql-js/driver.cjs +16 -5
- package/sql-js/driver.cjs.map +1 -1
- package/sql-js/driver.d.cts +3 -2
- package/sql-js/driver.d.ts +3 -2
- package/sql-js/driver.js +6 -8
- package/sql-js/driver.js.map +1 -1
- package/sql-js/migrator.cjs.map +1 -1
- package/sql-js/migrator.d.cts +2 -1
- package/sql-js/migrator.d.ts +2 -1
- package/sql-js/migrator.js.map +1 -1
- package/sql-js/session.cjs +71 -36
- package/sql-js/session.cjs.map +1 -1
- package/sql-js/session.d.cts +16 -13
- package/sql-js/session.d.ts +16 -13
- package/sql-js/session.js +71 -36
- package/sql-js/session.js.map +1 -1
- package/sqlite-core/db.cjs +39 -12
- package/sqlite-core/db.cjs.map +1 -1
- package/sqlite-core/db.d.cts +16 -8
- package/sqlite-core/db.d.ts +16 -8
- package/sqlite-core/db.js +38 -11
- package/sqlite-core/db.js.map +1 -1
- package/sqlite-core/dialect.cjs +176 -7
- package/sqlite-core/dialect.cjs.map +1 -1
- package/sqlite-core/dialect.d.cts +31 -9
- package/sqlite-core/dialect.d.ts +31 -9
- package/sqlite-core/dialect.js +174 -14
- package/sqlite-core/dialect.js.map +1 -1
- package/sqlite-core/query-builders/_query.cjs +187 -0
- package/sqlite-core/query-builders/_query.cjs.map +1 -0
- package/sqlite-core/query-builders/_query.d.cts +55 -0
- package/sqlite-core/query-builders/_query.d.ts +55 -0
- package/sqlite-core/query-builders/_query.js +151 -0
- package/sqlite-core/query-builders/_query.js.map +1 -0
- package/sqlite-core/query-builders/count.cjs.map +1 -1
- package/sqlite-core/query-builders/count.d.cts +1 -1
- package/sqlite-core/query-builders/count.d.ts +1 -1
- package/sqlite-core/query-builders/count.js.map +1 -1
- package/sqlite-core/query-builders/delete.cjs.map +1 -1
- package/sqlite-core/query-builders/delete.d.cts +1 -1
- package/sqlite-core/query-builders/delete.d.ts +1 -1
- package/sqlite-core/query-builders/delete.js.map +1 -1
- package/sqlite-core/query-builders/insert.cjs.map +1 -1
- package/sqlite-core/query-builders/insert.d.cts +3 -3
- package/sqlite-core/query-builders/insert.d.ts +3 -3
- package/sqlite-core/query-builders/insert.js.map +1 -1
- package/sqlite-core/query-builders/query.cjs +56 -35
- package/sqlite-core/query-builders/query.cjs.map +1 -1
- package/sqlite-core/query-builders/query.d.cts +18 -17
- package/sqlite-core/query-builders/query.d.ts +18 -17
- package/sqlite-core/query-builders/query.js +56 -35
- package/sqlite-core/query-builders/query.js.map +1 -1
- package/sqlite-core/query-builders/select.cjs.map +1 -1
- package/sqlite-core/query-builders/select.d.cts +3 -3
- package/sqlite-core/query-builders/select.d.ts +3 -3
- package/sqlite-core/query-builders/select.js.map +1 -1
- package/sqlite-core/query-builders/update.cjs.map +1 -1
- package/sqlite-core/query-builders/update.d.cts +3 -3
- package/sqlite-core/query-builders/update.d.ts +3 -3
- package/sqlite-core/query-builders/update.js.map +1 -1
- package/sqlite-core/session.cjs +6 -2
- package/sqlite-core/session.cjs.map +1 -1
- package/sqlite-core/session.d.cts +15 -7
- package/sqlite-core/session.d.ts +15 -7
- package/sqlite-core/session.js +6 -2
- package/sqlite-core/session.js.map +1 -1
- package/sqlite-proxy/driver.cjs +23 -5
- package/sqlite-proxy/driver.cjs.map +1 -1
- package/sqlite-proxy/driver.d.cts +4 -3
- package/sqlite-proxy/driver.d.ts +4 -3
- package/sqlite-proxy/driver.js +13 -5
- package/sqlite-proxy/driver.js.map +1 -1
- package/sqlite-proxy/migrator.cjs.map +1 -1
- package/sqlite-proxy/migrator.d.cts +2 -1
- package/sqlite-proxy/migrator.d.ts +2 -1
- package/sqlite-proxy/migrator.js.map +1 -1
- package/sqlite-proxy/session.cjs +50 -6
- package/sqlite-proxy/session.cjs.map +1 -1
- package/sqlite-proxy/session.d.cts +14 -8
- package/sqlite-proxy/session.d.ts +14 -8
- package/sqlite-proxy/session.js +50 -6
- package/sqlite-proxy/session.js.map +1 -1
- package/table.cjs.map +1 -1
- package/table.d.cts +2 -2
- package/table.d.ts +2 -2
- package/table.js.map +1 -1
- package/tidb-serverless/driver.cjs +22 -5
- package/tidb-serverless/driver.cjs.map +1 -1
- package/tidb-serverless/driver.d.cts +7 -6
- package/tidb-serverless/driver.d.ts +7 -6
- package/tidb-serverless/driver.js +12 -8
- package/tidb-serverless/driver.js.map +1 -1
- package/tidb-serverless/migrator.cjs.map +1 -1
- package/tidb-serverless/migrator.d.cts +2 -1
- package/tidb-serverless/migrator.d.ts +2 -1
- package/tidb-serverless/migrator.js.map +1 -1
- package/tidb-serverless/session.cjs +62 -5
- package/tidb-serverless/session.cjs.map +1 -1
- package/tidb-serverless/session.d.cts +14 -9
- package/tidb-serverless/session.d.ts +14 -9
- package/tidb-serverless/session.js +62 -5
- package/tidb-serverless/session.js.map +1 -1
- package/utils.cjs +2 -2
- package/utils.cjs.map +1 -1
- package/utils.d.cts +3 -1
- package/utils.d.ts +3 -1
- package/utils.js +2 -2
- package/utils.js.map +1 -1
- package/vercel-postgres/driver.cjs +23 -7
- package/vercel-postgres/driver.cjs.map +1 -1
- package/vercel-postgres/driver.d.cts +9 -8
- package/vercel-postgres/driver.d.ts +9 -8
- package/vercel-postgres/driver.js +13 -10
- package/vercel-postgres/driver.js.map +1 -1
- package/vercel-postgres/migrator.cjs.map +1 -1
- package/vercel-postgres/migrator.d.cts +2 -1
- package/vercel-postgres/migrator.d.ts +2 -1
- package/vercel-postgres/migrator.js.map +1 -1
- package/vercel-postgres/session.cjs +34 -4
- package/vercel-postgres/session.cjs.map +1 -1
- package/vercel-postgres/session.d.cts +13 -8
- package/vercel-postgres/session.d.ts +13 -8
- package/vercel-postgres/session.js +34 -4
- package/vercel-postgres/session.js.map +1 -1
- package/version.cjs +1 -1
- package/version.d.cts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/xata-http/driver.cjs +17 -5
- package/xata-http/driver.cjs.map +1 -1
- package/xata-http/driver.d.cts +5 -4
- package/xata-http/driver.d.ts +5 -4
- package/xata-http/driver.js +7 -5
- package/xata-http/driver.js.map +1 -1
- package/xata-http/migrator.cjs.map +1 -1
- package/xata-http/migrator.d.cts +2 -1
- package/xata-http/migrator.d.ts +2 -1
- package/xata-http/migrator.js.map +1 -1
- package/xata-http/session.cjs +30 -2
- package/xata-http/session.cjs.map +1 -1
- package/xata-http/session.d.cts +13 -8
- package/xata-http/session.d.ts +13 -8
- package/xata-http/session.js +30 -2
- package/xata-http/session.js.map +1 -1
- package/gel/driver.cjs +0 -97
- package/gel/driver.cjs.map +0 -1
- package/gel/driver.d.cts +0 -38
- package/gel/driver.d.ts +0 -38
- package/gel/driver.js +0 -74
- package/gel/driver.js.map +0 -1
- package/gel/index.cjs +0 -25
- package/gel/index.cjs.map +0 -1
- package/gel/index.d.cts +0 -2
- package/gel/index.d.ts +0 -2
- package/gel/index.js +0 -3
- package/gel/index.js.map +0 -1
- package/gel/migrator.cjs +0 -5
- package/gel/migrator.cjs.map +0 -1
- package/gel/migrator.d.cts +0 -1
- package/gel/migrator.d.ts +0 -1
- package/gel/migrator.js +0 -4
- package/gel/migrator.js.map +0 -1
- package/gel/session.cjs +0 -139
- package/gel/session.cjs.map +0 -1
- package/gel/session.d.cts +0 -47
- package/gel/session.d.ts +0 -47
- package/gel/session.js +0 -113
- package/gel/session.js.map +0 -1
- package/gel-core/alias.cjs +0 -32
- package/gel-core/alias.cjs.map +0 -1
- package/gel-core/alias.d.cts +0 -4
- package/gel-core/alias.d.ts +0 -4
- package/gel-core/alias.js +0 -8
- package/gel-core/alias.js.map +0 -1
- package/gel-core/checks.cjs +0 -58
- package/gel-core/checks.cjs.map +0 -1
- package/gel-core/checks.d.cts +0 -18
- package/gel-core/checks.d.ts +0 -18
- package/gel-core/checks.js +0 -32
- package/gel-core/checks.js.map +0 -1
- package/gel-core/columns/all.cjs +0 -72
- package/gel-core/columns/all.cjs.map +0 -1
- package/gel-core/columns/all.d.cts +0 -43
- package/gel-core/columns/all.d.ts +0 -43
- package/gel-core/columns/all.js +0 -48
- package/gel-core/columns/all.js.map +0 -1
- package/gel-core/columns/bigint.cjs +0 -54
- package/gel-core/columns/bigint.cjs.map +0 -1
- package/gel-core/columns/bigint.d.cts +0 -23
- package/gel-core/columns/bigint.d.ts +0 -23
- package/gel-core/columns/bigint.js +0 -28
- package/gel-core/columns/bigint.js.map +0 -1
- package/gel-core/columns/bigintT.cjs +0 -60
- package/gel-core/columns/bigintT.cjs.map +0 -1
- package/gel-core/columns/bigintT.d.cts +0 -24
- package/gel-core/columns/bigintT.d.ts +0 -24
- package/gel-core/columns/bigintT.js +0 -34
- package/gel-core/columns/bigintT.js.map +0 -1
- package/gel-core/columns/boolean.cjs +0 -53
- package/gel-core/columns/boolean.cjs.map +0 -1
- package/gel-core/columns/boolean.d.cts +0 -22
- package/gel-core/columns/boolean.d.ts +0 -22
- package/gel-core/columns/boolean.js +0 -27
- package/gel-core/columns/boolean.js.map +0 -1
- package/gel-core/columns/bytes.cjs +0 -56
- package/gel-core/columns/bytes.cjs.map +0 -1
- package/gel-core/columns/bytes.d.cts +0 -22
- package/gel-core/columns/bytes.d.ts +0 -22
- package/gel-core/columns/bytes.js +0 -30
- package/gel-core/columns/bytes.js.map +0 -1
- package/gel-core/columns/common.cjs +0 -213
- package/gel-core/columns/common.cjs.map +0 -1
- package/gel-core/columns/common.d.cts +0 -147
- package/gel-core/columns/common.d.ts +0 -147
- package/gel-core/columns/common.js +0 -184
- package/gel-core/columns/common.js.map +0 -1
- package/gel-core/columns/custom.cjs +0 -77
- package/gel-core/columns/custom.cjs.map +0 -1
- package/gel-core/columns/custom.d.cts +0 -155
- package/gel-core/columns/custom.d.ts +0 -155
- package/gel-core/columns/custom.js +0 -51
- package/gel-core/columns/custom.js.map +0 -1
- package/gel-core/columns/date-duration.cjs +0 -56
- package/gel-core/columns/date-duration.cjs.map +0 -1
- package/gel-core/columns/date-duration.d.cts +0 -23
- package/gel-core/columns/date-duration.d.ts +0 -23
- package/gel-core/columns/date-duration.js +0 -30
- package/gel-core/columns/date-duration.js.map +0 -1
- package/gel-core/columns/date.common.cjs +0 -37
- package/gel-core/columns/date.common.cjs.map +0 -1
- package/gel-core/columns/date.common.d.cts +0 -7
- package/gel-core/columns/date.common.d.ts +0 -7
- package/gel-core/columns/date.common.js +0 -13
- package/gel-core/columns/date.common.js.map +0 -1
- package/gel-core/columns/decimal.cjs +0 -56
- package/gel-core/columns/decimal.cjs.map +0 -1
- package/gel-core/columns/decimal.d.cts +0 -26
- package/gel-core/columns/decimal.d.ts +0 -26
- package/gel-core/columns/decimal.js +0 -30
- package/gel-core/columns/decimal.js.map +0 -1
- package/gel-core/columns/double-precision.cjs +0 -62
- package/gel-core/columns/double-precision.cjs.map +0 -1
- package/gel-core/columns/double-precision.d.cts +0 -23
- package/gel-core/columns/double-precision.d.ts +0 -23
- package/gel-core/columns/double-precision.js +0 -36
- package/gel-core/columns/double-precision.js.map +0 -1
- package/gel-core/columns/duration.cjs +0 -53
- package/gel-core/columns/duration.cjs.map +0 -1
- package/gel-core/columns/duration.d.cts +0 -23
- package/gel-core/columns/duration.d.ts +0 -23
- package/gel-core/columns/duration.js +0 -27
- package/gel-core/columns/duration.js.map +0 -1
- package/gel-core/columns/index.cjs +0 -65
- package/gel-core/columns/index.cjs.map +0 -1
- package/gel-core/columns/index.d.cts +0 -22
- package/gel-core/columns/index.d.ts +0 -22
- package/gel-core/columns/index.js +0 -23
- package/gel-core/columns/index.js.map +0 -1
- package/gel-core/columns/int.common.cjs +0 -67
- package/gel-core/columns/int.common.cjs.map +0 -1
- package/gel-core/columns/int.common.d.cts +0 -15
- package/gel-core/columns/int.common.d.ts +0 -15
- package/gel-core/columns/int.common.js +0 -43
- package/gel-core/columns/int.common.js.map +0 -1
- package/gel-core/columns/integer.cjs +0 -54
- package/gel-core/columns/integer.cjs.map +0 -1
- package/gel-core/columns/integer.d.cts +0 -23
- package/gel-core/columns/integer.d.ts +0 -23
- package/gel-core/columns/integer.js +0 -28
- package/gel-core/columns/integer.js.map +0 -1
- package/gel-core/columns/json.cjs +0 -56
- package/gel-core/columns/json.cjs.map +0 -1
- package/gel-core/columns/json.d.cts +0 -26
- package/gel-core/columns/json.d.ts +0 -26
- package/gel-core/columns/json.js +0 -30
- package/gel-core/columns/json.js.map +0 -1
- package/gel-core/columns/localdate.cjs +0 -57
- package/gel-core/columns/localdate.cjs.map +0 -1
- package/gel-core/columns/localdate.d.cts +0 -24
- package/gel-core/columns/localdate.d.ts +0 -24
- package/gel-core/columns/localdate.js +0 -31
- package/gel-core/columns/localdate.js.map +0 -1
- package/gel-core/columns/localtime.cjs +0 -57
- package/gel-core/columns/localtime.cjs.map +0 -1
- package/gel-core/columns/localtime.d.cts +0 -24
- package/gel-core/columns/localtime.d.ts +0 -24
- package/gel-core/columns/localtime.js +0 -31
- package/gel-core/columns/localtime.js.map +0 -1
- package/gel-core/columns/real.cjs +0 -57
- package/gel-core/columns/real.cjs.map +0 -1
- package/gel-core/columns/real.d.cts +0 -28
- package/gel-core/columns/real.d.ts +0 -28
- package/gel-core/columns/real.js +0 -31
- package/gel-core/columns/real.js.map +0 -1
- package/gel-core/columns/relative-duration.cjs +0 -56
- package/gel-core/columns/relative-duration.cjs.map +0 -1
- package/gel-core/columns/relative-duration.d.cts +0 -23
- package/gel-core/columns/relative-duration.d.ts +0 -23
- package/gel-core/columns/relative-duration.js +0 -30
- package/gel-core/columns/relative-duration.js.map +0 -1
- package/gel-core/columns/smallint.cjs +0 -54
- package/gel-core/columns/smallint.cjs.map +0 -1
- package/gel-core/columns/smallint.d.cts +0 -23
- package/gel-core/columns/smallint.d.ts +0 -23
- package/gel-core/columns/smallint.js +0 -28
- package/gel-core/columns/smallint.js.map +0 -1
- package/gel-core/columns/text.cjs +0 -54
- package/gel-core/columns/text.cjs.map +0 -1
- package/gel-core/columns/text.d.cts +0 -26
- package/gel-core/columns/text.d.ts +0 -26
- package/gel-core/columns/text.js +0 -28
- package/gel-core/columns/text.js.map +0 -1
- package/gel-core/columns/timestamp.cjs +0 -60
- package/gel-core/columns/timestamp.cjs.map +0 -1
- package/gel-core/columns/timestamp.d.cts +0 -28
- package/gel-core/columns/timestamp.d.ts +0 -28
- package/gel-core/columns/timestamp.js +0 -34
- package/gel-core/columns/timestamp.js.map +0 -1
- package/gel-core/columns/timestamptz.cjs +0 -60
- package/gel-core/columns/timestamptz.cjs.map +0 -1
- package/gel-core/columns/timestamptz.d.cts +0 -27
- package/gel-core/columns/timestamptz.d.ts +0 -27
- package/gel-core/columns/timestamptz.js +0 -34
- package/gel-core/columns/timestamptz.js.map +0 -1
- package/gel-core/columns/uuid.cjs +0 -53
- package/gel-core/columns/uuid.cjs.map +0 -1
- package/gel-core/columns/uuid.d.cts +0 -22
- package/gel-core/columns/uuid.d.ts +0 -22
- package/gel-core/columns/uuid.js +0 -27
- package/gel-core/columns/uuid.js.map +0 -1
- package/gel-core/db.cjs +0 -338
- package/gel-core/db.cjs.map +0 -1
- package/gel-core/db.d.cts +0 -281
- package/gel-core/db.d.ts +0 -281
- package/gel-core/db.js +0 -319
- package/gel-core/db.js.map +0 -1
- package/gel-core/dialect.cjs +0 -1142
- package/gel-core/dialect.cjs.map +0 -1
- package/gel-core/dialect.d.cts +0 -62
- package/gel-core/dialect.d.ts +0 -62
- package/gel-core/dialect.js +0 -1128
- package/gel-core/dialect.js.map +0 -1
- package/gel-core/expressions.cjs +0 -49
- package/gel-core/expressions.cjs.map +0 -1
- package/gel-core/expressions.d.cts +0 -8
- package/gel-core/expressions.d.ts +0 -8
- package/gel-core/expressions.js +0 -22
- package/gel-core/expressions.js.map +0 -1
- package/gel-core/foreign-keys.cjs +0 -100
- package/gel-core/foreign-keys.cjs.map +0 -1
- package/gel-core/foreign-keys.d.cts +0 -48
- package/gel-core/foreign-keys.d.ts +0 -48
- package/gel-core/foreign-keys.js +0 -74
- package/gel-core/foreign-keys.js.map +0 -1
- package/gel-core/index.cjs +0 -61
- package/gel-core/index.cjs.map +0 -1
- package/gel-core/index.d.cts +0 -20
- package/gel-core/index.d.ts +0 -20
- package/gel-core/index.js +0 -21
- package/gel-core/index.js.map +0 -1
- package/gel-core/indexes.cjs +0 -149
- package/gel-core/indexes.cjs.map +0 -1
- package/gel-core/indexes.d.cts +0 -79
- package/gel-core/indexes.d.ts +0 -79
- package/gel-core/indexes.js +0 -121
- package/gel-core/indexes.js.map +0 -1
- package/gel-core/policies.cjs +0 -58
- package/gel-core/policies.cjs.map +0 -1
- package/gel-core/policies.d.cts +0 -24
- package/gel-core/policies.d.ts +0 -24
- package/gel-core/policies.js +0 -33
- package/gel-core/policies.js.map +0 -1
- package/gel-core/primary-keys.cjs +0 -68
- package/gel-core/primary-keys.cjs.map +0 -1
- package/gel-core/primary-keys.d.cts +0 -30
- package/gel-core/primary-keys.d.ts +0 -30
- package/gel-core/primary-keys.js +0 -42
- package/gel-core/primary-keys.js.map +0 -1
- package/gel-core/query-builders/count.cjs +0 -73
- package/gel-core/query-builders/count.cjs.map +0 -1
- package/gel-core/query-builders/count.d.cts +0 -25
- package/gel-core/query-builders/count.d.ts +0 -25
- package/gel-core/query-builders/count.js +0 -49
- package/gel-core/query-builders/count.js.map +0 -1
- package/gel-core/query-builders/delete.cjs +0 -105
- package/gel-core/query-builders/delete.cjs.map +0 -1
- package/gel-core/query-builders/delete.d.cts +0 -99
- package/gel-core/query-builders/delete.d.ts +0 -99
- package/gel-core/query-builders/delete.js +0 -81
- package/gel-core/query-builders/delete.js.map +0 -1
- package/gel-core/query-builders/index.cjs +0 -35
- package/gel-core/query-builders/index.cjs.map +0 -1
- package/gel-core/query-builders/index.d.cts +0 -7
- package/gel-core/query-builders/index.d.ts +0 -7
- package/gel-core/query-builders/index.js +0 -8
- package/gel-core/query-builders/index.js.map +0 -1
- package/gel-core/query-builders/insert.cjs +0 -218
- package/gel-core/query-builders/insert.cjs.map +0 -1
- package/gel-core/query-builders/insert.d.cts +0 -116
- package/gel-core/query-builders/insert.d.ts +0 -116
- package/gel-core/query-builders/insert.js +0 -193
- package/gel-core/query-builders/insert.js.map +0 -1
- package/gel-core/query-builders/query-builder.cjs +0 -114
- package/gel-core/query-builders/query-builder.cjs.map +0 -1
- package/gel-core/query-builders/query-builder.d.cts +0 -40
- package/gel-core/query-builders/query-builder.d.ts +0 -40
- package/gel-core/query-builders/query-builder.js +0 -90
- package/gel-core/query-builders/query-builder.js.map +0 -1
- package/gel-core/query-builders/query.cjs.map +0 -1
- package/gel-core/query-builders/query.d.cts +0 -46
- package/gel-core/query-builders/query.d.ts +0 -46
- package/gel-core/query-builders/query.js.map +0 -1
- package/gel-core/query-builders/raw.cjs +0 -57
- package/gel-core/query-builders/raw.cjs.map +0 -1
- package/gel-core/query-builders/raw.d.cts +0 -22
- package/gel-core/query-builders/raw.d.ts +0 -22
- package/gel-core/query-builders/raw.js +0 -33
- package/gel-core/query-builders/raw.js.map +0 -1
- package/gel-core/query-builders/refresh-materialized-view.cjs +0 -77
- package/gel-core/query-builders/refresh-materialized-view.cjs.map +0 -1
- package/gel-core/query-builders/refresh-materialized-view.d.cts +0 -27
- package/gel-core/query-builders/refresh-materialized-view.d.ts +0 -27
- package/gel-core/query-builders/refresh-materialized-view.js +0 -53
- package/gel-core/query-builders/refresh-materialized-view.js.map +0 -1
- package/gel-core/query-builders/select.cjs +0 -775
- package/gel-core/query-builders/select.cjs.map +0 -1
- package/gel-core/query-builders/select.d.cts +0 -721
- package/gel-core/query-builders/select.d.ts +0 -721
- package/gel-core/query-builders/select.js +0 -748
- package/gel-core/query-builders/select.js.map +0 -1
- package/gel-core/query-builders/select.types.cjs +0 -17
- package/gel-core/query-builders/select.types.cjs.map +0 -1
- package/gel-core/query-builders/select.types.d.cts +0 -138
- package/gel-core/query-builders/select.types.d.ts +0 -138
- package/gel-core/query-builders/select.types.js +0 -1
- package/gel-core/query-builders/select.types.js.map +0 -1
- package/gel-core/query-builders/update.cjs +0 -226
- package/gel-core/query-builders/update.cjs.map +0 -1
- package/gel-core/query-builders/update.d.cts +0 -166
- package/gel-core/query-builders/update.d.ts +0 -166
- package/gel-core/query-builders/update.js +0 -205
- package/gel-core/query-builders/update.js.map +0 -1
- package/gel-core/roles.cjs +0 -57
- package/gel-core/roles.cjs.map +0 -1
- package/gel-core/roles.d.cts +0 -13
- package/gel-core/roles.d.ts +0 -13
- package/gel-core/roles.js +0 -32
- package/gel-core/roles.js.map +0 -1
- package/gel-core/schema.cjs +0 -74
- package/gel-core/schema.cjs.map +0 -1
- package/gel-core/schema.d.cts +0 -15
- package/gel-core/schema.d.ts +0 -15
- package/gel-core/schema.js +0 -48
- package/gel-core/schema.js.map +0 -1
- package/gel-core/sequence.cjs +0 -52
- package/gel-core/sequence.cjs.map +0 -1
- package/gel-core/sequence.d.cts +0 -18
- package/gel-core/sequence.d.ts +0 -18
- package/gel-core/sequence.js +0 -25
- package/gel-core/sequence.js.map +0 -1
- package/gel-core/session.cjs +0 -94
- package/gel-core/session.cjs.map +0 -1
- package/gel-core/session.d.cts +0 -56
- package/gel-core/session.d.ts +0 -56
- package/gel-core/session.js +0 -68
- package/gel-core/session.js.map +0 -1
- package/gel-core/subquery.cjs +0 -17
- package/gel-core/subquery.cjs.map +0 -1
- package/gel-core/subquery.d.cts +0 -5
- package/gel-core/subquery.d.ts +0 -5
- package/gel-core/subquery.js +0 -1
- package/gel-core/subquery.js.map +0 -1
- package/gel-core/table.cjs +0 -100
- package/gel-core/table.cjs.map +0 -1
- package/gel-core/table.d.cts +0 -95
- package/gel-core/table.d.ts +0 -95
- package/gel-core/table.js +0 -71
- package/gel-core/table.js.map +0 -1
- package/gel-core/unique-constraint.cjs +0 -89
- package/gel-core/unique-constraint.cjs.map +0 -1
- package/gel-core/unique-constraint.d.cts +0 -25
- package/gel-core/unique-constraint.d.ts +0 -25
- package/gel-core/unique-constraint.js +0 -61
- package/gel-core/unique-constraint.js.map +0 -1
- package/gel-core/utils.cjs +0 -100
- package/gel-core/utils.cjs.map +0 -1
- package/gel-core/utils.d.cts +0 -51
- package/gel-core/utils.d.ts +0 -51
- package/gel-core/utils.js +0 -74
- package/gel-core/utils.js.map +0 -1
- package/gel-core/view-base.cjs +0 -33
- package/gel-core/view-base.cjs.map +0 -1
- package/gel-core/view-base.d.cts +0 -8
- package/gel-core/view-base.d.ts +0 -8
- package/gel-core/view-base.js +0 -9
- package/gel-core/view-base.js.map +0 -1
- package/gel-core/view-common.cjs +0 -29
- package/gel-core/view-common.cjs.map +0 -1
- package/gel-core/view-common.d.cts +0 -1
- package/gel-core/view-common.d.ts +0 -1
- package/gel-core/view-common.js +0 -5
- package/gel-core/view-common.js.map +0 -1
- package/gel-core/view.cjs +0 -302
- package/gel-core/view.cjs.map +0 -1
- package/gel-core/view.d.cts +0 -150
- package/gel-core/view.d.ts +0 -150
- package/gel-core/view.js +0 -268
- package/gel-core/view.js.map +0 -1
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { entityKind } from "../../entity.js";
|
|
2
|
-
import type { GelDialectConfig } from "../dialect.js";
|
|
3
|
-
import { GelDialect } from "../dialect.js";
|
|
4
|
-
import type { TypedQueryBuilder } from "../../query-builders/query-builder.js";
|
|
5
|
-
import type { ColumnsSelection, SQLWrapper } from "../../sql/sql.js";
|
|
6
|
-
import { WithSubquery } from "../../subquery.js";
|
|
7
|
-
import type { GelColumn } from "../columns/index.js";
|
|
8
|
-
import type { WithSubqueryWithSelection } from "../subquery.js";
|
|
9
|
-
import { GelSelectBuilder } from "./select.js";
|
|
10
|
-
import type { SelectedFields } from "./select.types.js";
|
|
11
|
-
export declare class QueryBuilder {
|
|
12
|
-
static readonly [entityKind]: string;
|
|
13
|
-
private dialect;
|
|
14
|
-
private dialectConfig;
|
|
15
|
-
constructor(dialect?: GelDialect | GelDialectConfig);
|
|
16
|
-
$with<TAlias extends string>(alias: TAlias): {
|
|
17
|
-
as<TSelection extends ColumnsSelection>(qb: TypedQueryBuilder<TSelection> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelection>)): WithSubqueryWithSelection<TSelection, TAlias>;
|
|
18
|
-
};
|
|
19
|
-
with(...queries: WithSubquery[]): {
|
|
20
|
-
select: {
|
|
21
|
-
(): GelSelectBuilder<undefined, "qb">;
|
|
22
|
-
<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection, "qb">;
|
|
23
|
-
};
|
|
24
|
-
selectDistinct: {
|
|
25
|
-
(): GelSelectBuilder<undefined, "qb">;
|
|
26
|
-
<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection, "qb">;
|
|
27
|
-
};
|
|
28
|
-
selectDistinctOn: {
|
|
29
|
-
(on: (GelColumn | SQLWrapper)[]): GelSelectBuilder<undefined, "qb">;
|
|
30
|
-
<TSelection extends SelectedFields>(on: (GelColumn | SQLWrapper)[], fields: TSelection): GelSelectBuilder<TSelection, "qb">;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
select(): GelSelectBuilder<undefined, 'qb'>;
|
|
34
|
-
select<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection, 'qb'>;
|
|
35
|
-
selectDistinct(): GelSelectBuilder<undefined>;
|
|
36
|
-
selectDistinct<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection>;
|
|
37
|
-
selectDistinctOn(on: (GelColumn | SQLWrapper)[]): GelSelectBuilder<undefined>;
|
|
38
|
-
selectDistinctOn<TSelection extends SelectedFields>(on: (GelColumn | SQLWrapper)[], fields: TSelection): GelSelectBuilder<TSelection>;
|
|
39
|
-
private getDialect;
|
|
40
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { entityKind, is } from "../../entity.js";
|
|
2
|
-
import { GelDialect } from "../dialect.js";
|
|
3
|
-
import { SelectionProxyHandler } from "../../selection-proxy.js";
|
|
4
|
-
import { WithSubquery } from "../../subquery.js";
|
|
5
|
-
import { GelSelectBuilder } from "./select.js";
|
|
6
|
-
class QueryBuilder {
|
|
7
|
-
static [entityKind] = "GelQueryBuilder";
|
|
8
|
-
dialect;
|
|
9
|
-
dialectConfig;
|
|
10
|
-
constructor(dialect) {
|
|
11
|
-
this.dialect = is(dialect, GelDialect) ? dialect : void 0;
|
|
12
|
-
this.dialectConfig = is(dialect, GelDialect) ? void 0 : dialect;
|
|
13
|
-
}
|
|
14
|
-
$with(alias) {
|
|
15
|
-
const queryBuilder = this;
|
|
16
|
-
return {
|
|
17
|
-
as(qb) {
|
|
18
|
-
if (typeof qb === "function") {
|
|
19
|
-
qb = qb(queryBuilder);
|
|
20
|
-
}
|
|
21
|
-
return new Proxy(
|
|
22
|
-
new WithSubquery(qb.getSQL(), qb.getSelectedFields(), alias, true),
|
|
23
|
-
new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" })
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
with(...queries) {
|
|
29
|
-
const self = this;
|
|
30
|
-
function select(fields) {
|
|
31
|
-
return new GelSelectBuilder({
|
|
32
|
-
fields: fields ?? void 0,
|
|
33
|
-
session: void 0,
|
|
34
|
-
dialect: self.getDialect(),
|
|
35
|
-
withList: queries
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
function selectDistinct(fields) {
|
|
39
|
-
return new GelSelectBuilder({
|
|
40
|
-
fields: fields ?? void 0,
|
|
41
|
-
session: void 0,
|
|
42
|
-
dialect: self.getDialect(),
|
|
43
|
-
distinct: true
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function selectDistinctOn(on, fields) {
|
|
47
|
-
return new GelSelectBuilder({
|
|
48
|
-
fields: fields ?? void 0,
|
|
49
|
-
session: void 0,
|
|
50
|
-
dialect: self.getDialect(),
|
|
51
|
-
distinct: { on }
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
return { select, selectDistinct, selectDistinctOn };
|
|
55
|
-
}
|
|
56
|
-
select(fields) {
|
|
57
|
-
return new GelSelectBuilder({
|
|
58
|
-
fields: fields ?? void 0,
|
|
59
|
-
session: void 0,
|
|
60
|
-
dialect: this.getDialect()
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
selectDistinct(fields) {
|
|
64
|
-
return new GelSelectBuilder({
|
|
65
|
-
fields: fields ?? void 0,
|
|
66
|
-
session: void 0,
|
|
67
|
-
dialect: this.getDialect(),
|
|
68
|
-
distinct: true
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
selectDistinctOn(on, fields) {
|
|
72
|
-
return new GelSelectBuilder({
|
|
73
|
-
fields: fields ?? void 0,
|
|
74
|
-
session: void 0,
|
|
75
|
-
dialect: this.getDialect(),
|
|
76
|
-
distinct: { on }
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
// Lazy load dialect to avoid circular dependency
|
|
80
|
-
getDialect() {
|
|
81
|
-
if (!this.dialect) {
|
|
82
|
-
this.dialect = new GelDialect(this.dialectConfig);
|
|
83
|
-
}
|
|
84
|
-
return this.dialect;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
export {
|
|
88
|
-
QueryBuilder
|
|
89
|
-
};
|
|
90
|
-
//# sourceMappingURL=query-builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/gel-core/query-builders/query-builder.ts"],"sourcesContent":["import { entityKind, is } from '~/entity.ts';\nimport type { GelDialectConfig } from '~/gel-core/dialect.ts';\nimport { GelDialect } from '~/gel-core/dialect.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { ColumnsSelection, SQLWrapper } from '~/sql/sql.ts';\nimport { WithSubquery } from '~/subquery.ts';\nimport type { GelColumn } from '../columns/index.ts';\nimport type { WithSubqueryWithSelection } from '../subquery.ts';\nimport { GelSelectBuilder } from './select.ts';\nimport type { SelectedFields } from './select.types.ts';\n\nexport class QueryBuilder {\n\tstatic readonly [entityKind]: string = 'GelQueryBuilder';\n\n\tprivate dialect: GelDialect | undefined;\n\tprivate dialectConfig: GelDialectConfig | undefined;\n\n\tconstructor(dialect?: GelDialect | GelDialectConfig) {\n\t\tthis.dialect = is(dialect, GelDialect) ? dialect : undefined;\n\t\tthis.dialectConfig = is(dialect, GelDialect) ? undefined : dialect;\n\t}\n\n\t$with<TAlias extends string>(alias: TAlias) {\n\t\tconst queryBuilder = this;\n\n\t\treturn {\n\t\t\tas<TSelection extends ColumnsSelection>(\n\t\t\t\tqb: TypedQueryBuilder<TSelection> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelection>),\n\t\t\t): WithSubqueryWithSelection<TSelection, TAlias> {\n\t\t\t\tif (typeof qb === 'function') {\n\t\t\t\t\tqb = qb(queryBuilder);\n\t\t\t\t}\n\n\t\t\t\treturn new Proxy(\n\t\t\t\t\tnew WithSubquery(qb.getSQL(), qb.getSelectedFields() as SelectedFields, alias, true),\n\t\t\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t\t\t) as WithSubqueryWithSelection<TSelection, TAlias>;\n\t\t\t},\n\t\t};\n\t}\n\n\twith(...queries: WithSubquery[]) {\n\t\tconst self = this;\n\n\t\tfunction select(): GelSelectBuilder<undefined, 'qb'>;\n\t\tfunction select<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection, 'qb'>;\n\t\tfunction select<TSelection extends SelectedFields>(\n\t\t\tfields?: TSelection,\n\t\t): GelSelectBuilder<TSelection | undefined, 'qb'> {\n\t\t\treturn new GelSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: undefined,\n\t\t\t\tdialect: self.getDialect(),\n\t\t\t\twithList: queries,\n\t\t\t});\n\t\t}\n\n\t\tfunction selectDistinct(): GelSelectBuilder<undefined, 'qb'>;\n\t\tfunction selectDistinct<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection, 'qb'>;\n\t\tfunction selectDistinct(fields?: SelectedFields): GelSelectBuilder<SelectedFields | undefined, 'qb'> {\n\t\t\treturn new GelSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: undefined,\n\t\t\t\tdialect: self.getDialect(),\n\t\t\t\tdistinct: true,\n\t\t\t});\n\t\t}\n\n\t\tfunction selectDistinctOn(on: (GelColumn | SQLWrapper)[]): GelSelectBuilder<undefined, 'qb'>;\n\t\tfunction selectDistinctOn<TSelection extends SelectedFields>(\n\t\t\ton: (GelColumn | SQLWrapper)[],\n\t\t\tfields: TSelection,\n\t\t): GelSelectBuilder<TSelection, 'qb'>;\n\t\tfunction selectDistinctOn(\n\t\t\ton: (GelColumn | SQLWrapper)[],\n\t\t\tfields?: SelectedFields,\n\t\t): GelSelectBuilder<SelectedFields | undefined, 'qb'> {\n\t\t\treturn new GelSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: undefined,\n\t\t\t\tdialect: self.getDialect(),\n\t\t\t\tdistinct: { on },\n\t\t\t});\n\t\t}\n\n\t\treturn { select, selectDistinct, selectDistinctOn };\n\t}\n\n\tselect(): GelSelectBuilder<undefined, 'qb'>;\n\tselect<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection, 'qb'>;\n\tselect<TSelection extends SelectedFields>(fields?: TSelection): GelSelectBuilder<TSelection | undefined, 'qb'> {\n\t\treturn new GelSelectBuilder({\n\t\t\tfields: fields ?? undefined,\n\t\t\tsession: undefined,\n\t\t\tdialect: this.getDialect(),\n\t\t});\n\t}\n\n\tselectDistinct(): GelSelectBuilder<undefined>;\n\tselectDistinct<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection>;\n\tselectDistinct(fields?: SelectedFields): GelSelectBuilder<SelectedFields | undefined> {\n\t\treturn new GelSelectBuilder({\n\t\t\tfields: fields ?? undefined,\n\t\t\tsession: undefined,\n\t\t\tdialect: this.getDialect(),\n\t\t\tdistinct: true,\n\t\t});\n\t}\n\n\tselectDistinctOn(on: (GelColumn | SQLWrapper)[]): GelSelectBuilder<undefined>;\n\tselectDistinctOn<TSelection extends SelectedFields>(\n\t\ton: (GelColumn | SQLWrapper)[],\n\t\tfields: TSelection,\n\t): GelSelectBuilder<TSelection>;\n\tselectDistinctOn(\n\t\ton: (GelColumn | SQLWrapper)[],\n\t\tfields?: SelectedFields,\n\t): GelSelectBuilder<SelectedFields | undefined> {\n\t\treturn new GelSelectBuilder({\n\t\t\tfields: fields ?? undefined,\n\t\t\tsession: undefined,\n\t\t\tdialect: this.getDialect(),\n\t\t\tdistinct: { on },\n\t\t});\n\t}\n\n\t// Lazy load dialect to avoid circular dependency\n\tprivate getDialect() {\n\t\tif (!this.dialect) {\n\t\t\tthis.dialect = new GelDialect(this.dialectConfig);\n\t\t}\n\n\t\treturn this.dialect;\n\t}\n}\n"],"mappings":"AAAA,SAAS,YAAY,UAAU;AAE/B,SAAS,kBAAkB;AAE3B,SAAS,6BAA6B;AAEtC,SAAS,oBAAoB;AAG7B,SAAS,wBAAwB;AAG1B,MAAM,aAAa;AAAA,EACzB,QAAiB,UAAU,IAAY;AAAA,EAE/B;AAAA,EACA;AAAA,EAER,YAAY,SAAyC;AACpD,SAAK,UAAU,GAAG,SAAS,UAAU,IAAI,UAAU;AACnD,SAAK,gBAAgB,GAAG,SAAS,UAAU,IAAI,SAAY;AAAA,EAC5D;AAAA,EAEA,MAA6B,OAAe;AAC3C,UAAM,eAAe;AAErB,WAAO;AAAA,MACN,GACC,IACgD;AAChD,YAAI,OAAO,OAAO,YAAY;AAC7B,eAAK,GAAG,YAAY;AAAA,QACrB;AAEA,eAAO,IAAI;AAAA,UACV,IAAI,aAAa,GAAG,OAAO,GAAG,GAAG,kBAAkB,GAAqB,OAAO,IAAI;AAAA,UACnF,IAAI,sBAAsB,EAAE,OAAO,oBAAoB,SAAS,aAAa,QAAQ,CAAC;AAAA,QACvF;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EAEA,QAAQ,SAAyB;AAChC,UAAM,OAAO;AAIb,aAAS,OACR,QACiD;AACjD,aAAO,IAAI,iBAAiB;AAAA,QAC3B,QAAQ,UAAU;AAAA,QAClB,SAAS;AAAA,QACT,SAAS,KAAK,WAAW;AAAA,QACzB,UAAU;AAAA,MACX,CAAC;AAAA,IACF;AAIA,aAAS,eAAe,QAA6E;AACpG,aAAO,IAAI,iBAAiB;AAAA,QAC3B,QAAQ,UAAU;AAAA,QAClB,SAAS;AAAA,QACT,SAAS,KAAK,WAAW;AAAA,QACzB,UAAU;AAAA,MACX,CAAC;AAAA,IACF;AAOA,aAAS,iBACR,IACA,QACqD;AACrD,aAAO,IAAI,iBAAiB;AAAA,QAC3B,QAAQ,UAAU;AAAA,QAClB,SAAS;AAAA,QACT,SAAS,KAAK,WAAW;AAAA,QACzB,UAAU,EAAE,GAAG;AAAA,MAChB,CAAC;AAAA,IACF;AAEA,WAAO,EAAE,QAAQ,gBAAgB,iBAAiB;AAAA,EACnD;AAAA,EAIA,OAA0C,QAAqE;AAC9G,WAAO,IAAI,iBAAiB;AAAA,MAC3B,QAAQ,UAAU;AAAA,MAClB,SAAS;AAAA,MACT,SAAS,KAAK,WAAW;AAAA,IAC1B,CAAC;AAAA,EACF;AAAA,EAIA,eAAe,QAAuE;AACrF,WAAO,IAAI,iBAAiB;AAAA,MAC3B,QAAQ,UAAU;AAAA,MAClB,SAAS;AAAA,MACT,SAAS,KAAK,WAAW;AAAA,MACzB,UAAU;AAAA,IACX,CAAC;AAAA,EACF;AAAA,EAOA,iBACC,IACA,QAC+C;AAC/C,WAAO,IAAI,iBAAiB;AAAA,MAC3B,QAAQ,UAAU;AAAA,MAClB,SAAS;AAAA,MACT,SAAS,KAAK,WAAW;AAAA,MACzB,UAAU,EAAE,GAAG;AAAA,IAChB,CAAC;AAAA,EACF;AAAA;AAAA,EAGQ,aAAa;AACpB,QAAI,CAAC,KAAK,SAAS;AAClB,WAAK,UAAU,IAAI,WAAW,KAAK,aAAa;AAAA,IACjD;AAEA,WAAO,KAAK;AAAA,EACb;AACD;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/gel-core/query-builders/query.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport {\n\ttype BuildQueryResult,\n\ttype BuildRelationalQueryResult,\n\ttype DBQueryConfig,\n\tmapRelationalRow,\n\ttype TableRelationalConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Query, QueryWithTypings, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport { tracer } from '~/tracing.ts';\nimport type { KnownKeysOnly } from '~/utils.ts';\nimport type { GelDialect } from '../dialect.ts';\nimport type { GelPreparedQuery, GelSession, PreparedQueryConfig } from '../session.ts';\nimport type { GelTable } from '../table.ts';\n\nexport class RelationalQueryBuilder<TSchema extends TablesRelationalConfig, TFields extends TableRelationalConfig> {\n\tstatic readonly [entityKind]: string = 'GelRelationalQueryBuilder';\n\n\tconstructor(\n\t\tprivate fullSchema: Record<string, unknown>,\n\t\tprivate schema: TSchema,\n\t\tprivate tableNamesMap: Record<string, string>,\n\t\tprivate table: GelTable,\n\t\tprivate tableConfig: TableRelationalConfig,\n\t\tprivate dialect: GelDialect,\n\t\tprivate session: GelSession,\n\t) {}\n\n\tfindMany<TConfig extends DBQueryConfig<'many', true, TSchema, TFields>>(\n\t\tconfig?: KnownKeysOnly<TConfig, DBQueryConfig<'many', true, TSchema, TFields>>,\n\t): GelRelationalQuery<BuildQueryResult<TSchema, TFields, TConfig>[]> {\n\t\treturn new GelRelationalQuery(\n\t\t\tthis.fullSchema,\n\t\t\tthis.schema,\n\t\t\tthis.tableNamesMap,\n\t\t\tthis.table,\n\t\t\tthis.tableConfig,\n\t\t\tthis.dialect,\n\t\t\tthis.session,\n\t\t\tconfig ? (config as DBQueryConfig<'many', true>) : {},\n\t\t\t'many',\n\t\t);\n\t}\n\n\tfindFirst<TSelection extends Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>(\n\t\tconfig?: KnownKeysOnly<TSelection, Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>,\n\t): GelRelationalQuery<BuildQueryResult<TSchema, TFields, TSelection> | undefined> {\n\t\treturn new GelRelationalQuery(\n\t\t\tthis.fullSchema,\n\t\t\tthis.schema,\n\t\t\tthis.tableNamesMap,\n\t\t\tthis.table,\n\t\t\tthis.tableConfig,\n\t\t\tthis.dialect,\n\t\t\tthis.session,\n\t\t\tconfig ? { ...(config as DBQueryConfig<'many', true> | undefined), limit: 1 } : { limit: 1 },\n\t\t\t'first',\n\t\t);\n\t}\n}\n\nexport class GelRelationalQuery<TResult> extends QueryPromise<TResult>\n\timplements RunnableQuery<TResult, 'gel'>, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'GelRelationalQuery';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'gel';\n\t\treadonly result: TResult;\n\t};\n\n\tconstructor(\n\t\tprivate fullSchema: Record<string, unknown>,\n\t\tprivate schema: TablesRelationalConfig,\n\t\tprivate tableNamesMap: Record<string, string>,\n\t\tprivate table: GelTable,\n\t\tprivate tableConfig: TableRelationalConfig,\n\t\tprivate dialect: GelDialect,\n\t\tprivate session: GelSession,\n\t\tprivate config: DBQueryConfig<'many', true> | true,\n\t\tprivate mode: 'many' | 'first',\n\t) {\n\t\tsuper();\n\t}\n\n\t/** @internal */\n\t_prepare(name?: string): GelPreparedQuery<PreparedQueryConfig & { execute: TResult }> {\n\t\treturn tracer.startActiveSpan('drizzle.prepareQuery', () => {\n\t\t\tconst { query, builtQuery } = this._toSQL();\n\n\t\t\treturn this.session.prepareQuery<PreparedQueryConfig & { execute: TResult }>(\n\t\t\t\tbuiltQuery,\n\t\t\t\tundefined,\n\t\t\t\tname,\n\t\t\t\ttrue,\n\t\t\t\t(rawRows, mapColumnValue) => {\n\t\t\t\t\tconst rows = rawRows.map((row) =>\n\t\t\t\t\t\tmapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue)\n\t\t\t\t\t);\n\t\t\t\t\tif (this.mode === 'first') {\n\t\t\t\t\t\treturn rows[0] as TResult;\n\t\t\t\t\t}\n\t\t\t\t\treturn rows as TResult;\n\t\t\t\t},\n\t\t\t);\n\t\t});\n\t}\n\n\tprepare(name: string): GelPreparedQuery<PreparedQueryConfig & { execute: TResult }> {\n\t\treturn this._prepare(name);\n\t}\n\n\tprivate _getQuery() {\n\t\treturn this.dialect.buildRelationalQueryWithoutPK({\n\t\t\tfullSchema: this.fullSchema,\n\t\t\tschema: this.schema,\n\t\t\ttableNamesMap: this.tableNamesMap,\n\t\t\ttable: this.table,\n\t\t\ttableConfig: this.tableConfig,\n\t\t\tqueryConfig: this.config,\n\t\t\ttableAlias: this.tableConfig.tsName,\n\t\t});\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this._getQuery().sql as SQL;\n\t}\n\n\tprivate _toSQL(): { query: BuildRelationalQueryResult; builtQuery: QueryWithTypings } {\n\t\tconst query = this._getQuery();\n\n\t\tconst builtQuery = this.dialect.sqlToQuery(query.sql as SQL);\n\n\t\treturn { query, builtQuery };\n\t}\n\n\ttoSQL(): Query {\n\t\treturn this._toSQL().builtQuery;\n\t}\n\n\toverride execute(): Promise<TResult> {\n\t\treturn tracer.startActiveSpan('drizzle.operation', () => {\n\t\t\treturn this._prepare().execute(undefined);\n\t\t});\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAC3B,2BAA6B;AAC7B,uBAOO;AAGP,qBAAuB;AAMhB,MAAM,uBAAsG;AAAA,EAGlH,YACS,YACA,QACA,eACA,OACA,aACA,SACA,SACP;AAPO;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,EACN;AAAA,EAVH,QAAiB,wBAAU,IAAY;AAAA,EAYvC,SACC,QACoE;AACpE,WAAO,IAAI;AAAA,MACV,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,SAAU,SAAyC,CAAC;AAAA,MACpD;AAAA,IACD;AAAA,EACD;AAAA,EAEA,UACC,QACiF;AACjF,WAAO,IAAI;AAAA,MACV,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,SAAS,EAAE,GAAI,QAAoD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE;AAAA,MAC3F;AAAA,IACD;AAAA,EACD;AACD;AAEO,MAAM,2BAAoC,kCAEjD;AAAA,EAQC,YACS,YACA,QACA,eACA,OACA,aACA,SACA,SACA,QACA,MACP;AACD,UAAM;AAVE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,EAGT;AAAA,EAnBA,QAA0B,wBAAU,IAAY;AAAA;AAAA,EAsBhD,SAAS,MAA6E;AACrF,WAAO,sBAAO,gBAAgB,wBAAwB,MAAM;AAC3D,YAAM,EAAE,OAAO,WAAW,IAAI,KAAK,OAAO;AAE1C,aAAO,KAAK,QAAQ;AAAA,QACnB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,CAAC,SAAS,mBAAmB;AAC5B,gBAAM,OAAO,QAAQ;AAAA,YAAI,CAAC,YACzB,mCAAiB,KAAK,QAAQ,KAAK,aAAa,KAAK,MAAM,WAAW,cAAc;AAAA,UACrF;AACA,cAAI,KAAK,SAAS,SAAS;AAC1B,mBAAO,KAAK,CAAC;AAAA,UACd;AACA,iBAAO;AAAA,QACR;AAAA,MACD;AAAA,IACD,CAAC;AAAA,EACF;AAAA,EAEA,QAAQ,MAA4E;AACnF,WAAO,KAAK,SAAS,IAAI;AAAA,EAC1B;AAAA,EAEQ,YAAY;AACnB,WAAO,KAAK,QAAQ,8BAA8B;AAAA,MACjD,YAAY,KAAK;AAAA,MACjB,QAAQ,KAAK;AAAA,MACb,eAAe,KAAK;AAAA,MACpB,OAAO,KAAK;AAAA,MACZ,aAAa,KAAK;AAAA,MAClB,aAAa,KAAK;AAAA,MAClB,YAAY,KAAK,YAAY;AAAA,IAC9B,CAAC;AAAA,EACF;AAAA;AAAA,EAGA,SAAc;AACb,WAAO,KAAK,UAAU,EAAE;AAAA,EACzB;AAAA,EAEQ,SAA8E;AACrF,UAAM,QAAQ,KAAK,UAAU;AAE7B,UAAM,aAAa,KAAK,QAAQ,WAAW,MAAM,GAAU;AAE3D,WAAO,EAAE,OAAO,WAAW;AAAA,EAC5B;AAAA,EAEA,QAAe;AACd,WAAO,KAAK,OAAO,EAAE;AAAA,EACtB;AAAA,EAES,UAA4B;AACpC,WAAO,sBAAO,gBAAgB,qBAAqB,MAAM;AACxD,aAAO,KAAK,SAAS,EAAE,QAAQ,MAAS;AAAA,IACzC,CAAC;AAAA,EACF;AACD;","names":[]}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { entityKind } from "../../entity.cjs";
|
|
2
|
-
import { QueryPromise } from "../../query-promise.cjs";
|
|
3
|
-
import { type BuildQueryResult, type DBQueryConfig, type TableRelationalConfig, type TablesRelationalConfig } from "../../relations.cjs";
|
|
4
|
-
import type { RunnableQuery } from "../../runnable-query.cjs";
|
|
5
|
-
import type { Query, SQLWrapper } from "../../sql/sql.cjs";
|
|
6
|
-
import type { KnownKeysOnly } from "../../utils.cjs";
|
|
7
|
-
import type { GelDialect } from "../dialect.cjs";
|
|
8
|
-
import type { GelPreparedQuery, GelSession, PreparedQueryConfig } from "../session.cjs";
|
|
9
|
-
import type { GelTable } from "../table.cjs";
|
|
10
|
-
export declare class RelationalQueryBuilder<TSchema extends TablesRelationalConfig, TFields extends TableRelationalConfig> {
|
|
11
|
-
private fullSchema;
|
|
12
|
-
private schema;
|
|
13
|
-
private tableNamesMap;
|
|
14
|
-
private table;
|
|
15
|
-
private tableConfig;
|
|
16
|
-
private dialect;
|
|
17
|
-
private session;
|
|
18
|
-
static readonly [entityKind]: string;
|
|
19
|
-
constructor(fullSchema: Record<string, unknown>, schema: TSchema, tableNamesMap: Record<string, string>, table: GelTable, tableConfig: TableRelationalConfig, dialect: GelDialect, session: GelSession);
|
|
20
|
-
findMany<TConfig extends DBQueryConfig<'many', true, TSchema, TFields>>(config?: KnownKeysOnly<TConfig, DBQueryConfig<'many', true, TSchema, TFields>>): GelRelationalQuery<BuildQueryResult<TSchema, TFields, TConfig>[]>;
|
|
21
|
-
findFirst<TSelection extends Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>(config?: KnownKeysOnly<TSelection, Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>): GelRelationalQuery<BuildQueryResult<TSchema, TFields, TSelection> | undefined>;
|
|
22
|
-
}
|
|
23
|
-
export declare class GelRelationalQuery<TResult> extends QueryPromise<TResult> implements RunnableQuery<TResult, 'gel'>, SQLWrapper {
|
|
24
|
-
private fullSchema;
|
|
25
|
-
private schema;
|
|
26
|
-
private tableNamesMap;
|
|
27
|
-
private table;
|
|
28
|
-
private tableConfig;
|
|
29
|
-
private dialect;
|
|
30
|
-
private session;
|
|
31
|
-
private config;
|
|
32
|
-
private mode;
|
|
33
|
-
static readonly [entityKind]: string;
|
|
34
|
-
readonly _: {
|
|
35
|
-
readonly dialect: 'gel';
|
|
36
|
-
readonly result: TResult;
|
|
37
|
-
};
|
|
38
|
-
constructor(fullSchema: Record<string, unknown>, schema: TablesRelationalConfig, tableNamesMap: Record<string, string>, table: GelTable, tableConfig: TableRelationalConfig, dialect: GelDialect, session: GelSession, config: DBQueryConfig<'many', true> | true, mode: 'many' | 'first');
|
|
39
|
-
prepare(name: string): GelPreparedQuery<PreparedQueryConfig & {
|
|
40
|
-
execute: TResult;
|
|
41
|
-
}>;
|
|
42
|
-
private _getQuery;
|
|
43
|
-
private _toSQL;
|
|
44
|
-
toSQL(): Query;
|
|
45
|
-
execute(): Promise<TResult>;
|
|
46
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { entityKind } from "../../entity.js";
|
|
2
|
-
import { QueryPromise } from "../../query-promise.js";
|
|
3
|
-
import { type BuildQueryResult, type DBQueryConfig, type TableRelationalConfig, type TablesRelationalConfig } from "../../relations.js";
|
|
4
|
-
import type { RunnableQuery } from "../../runnable-query.js";
|
|
5
|
-
import type { Query, SQLWrapper } from "../../sql/sql.js";
|
|
6
|
-
import type { KnownKeysOnly } from "../../utils.js";
|
|
7
|
-
import type { GelDialect } from "../dialect.js";
|
|
8
|
-
import type { GelPreparedQuery, GelSession, PreparedQueryConfig } from "../session.js";
|
|
9
|
-
import type { GelTable } from "../table.js";
|
|
10
|
-
export declare class RelationalQueryBuilder<TSchema extends TablesRelationalConfig, TFields extends TableRelationalConfig> {
|
|
11
|
-
private fullSchema;
|
|
12
|
-
private schema;
|
|
13
|
-
private tableNamesMap;
|
|
14
|
-
private table;
|
|
15
|
-
private tableConfig;
|
|
16
|
-
private dialect;
|
|
17
|
-
private session;
|
|
18
|
-
static readonly [entityKind]: string;
|
|
19
|
-
constructor(fullSchema: Record<string, unknown>, schema: TSchema, tableNamesMap: Record<string, string>, table: GelTable, tableConfig: TableRelationalConfig, dialect: GelDialect, session: GelSession);
|
|
20
|
-
findMany<TConfig extends DBQueryConfig<'many', true, TSchema, TFields>>(config?: KnownKeysOnly<TConfig, DBQueryConfig<'many', true, TSchema, TFields>>): GelRelationalQuery<BuildQueryResult<TSchema, TFields, TConfig>[]>;
|
|
21
|
-
findFirst<TSelection extends Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>(config?: KnownKeysOnly<TSelection, Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>): GelRelationalQuery<BuildQueryResult<TSchema, TFields, TSelection> | undefined>;
|
|
22
|
-
}
|
|
23
|
-
export declare class GelRelationalQuery<TResult> extends QueryPromise<TResult> implements RunnableQuery<TResult, 'gel'>, SQLWrapper {
|
|
24
|
-
private fullSchema;
|
|
25
|
-
private schema;
|
|
26
|
-
private tableNamesMap;
|
|
27
|
-
private table;
|
|
28
|
-
private tableConfig;
|
|
29
|
-
private dialect;
|
|
30
|
-
private session;
|
|
31
|
-
private config;
|
|
32
|
-
private mode;
|
|
33
|
-
static readonly [entityKind]: string;
|
|
34
|
-
readonly _: {
|
|
35
|
-
readonly dialect: 'gel';
|
|
36
|
-
readonly result: TResult;
|
|
37
|
-
};
|
|
38
|
-
constructor(fullSchema: Record<string, unknown>, schema: TablesRelationalConfig, tableNamesMap: Record<string, string>, table: GelTable, tableConfig: TableRelationalConfig, dialect: GelDialect, session: GelSession, config: DBQueryConfig<'many', true> | true, mode: 'many' | 'first');
|
|
39
|
-
prepare(name: string): GelPreparedQuery<PreparedQueryConfig & {
|
|
40
|
-
execute: TResult;
|
|
41
|
-
}>;
|
|
42
|
-
private _getQuery;
|
|
43
|
-
private _toSQL;
|
|
44
|
-
toSQL(): Query;
|
|
45
|
-
execute(): Promise<TResult>;
|
|
46
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/gel-core/query-builders/query.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport {\n\ttype BuildQueryResult,\n\ttype BuildRelationalQueryResult,\n\ttype DBQueryConfig,\n\tmapRelationalRow,\n\ttype TableRelationalConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Query, QueryWithTypings, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport { tracer } from '~/tracing.ts';\nimport type { KnownKeysOnly } from '~/utils.ts';\nimport type { GelDialect } from '../dialect.ts';\nimport type { GelPreparedQuery, GelSession, PreparedQueryConfig } from '../session.ts';\nimport type { GelTable } from '../table.ts';\n\nexport class RelationalQueryBuilder<TSchema extends TablesRelationalConfig, TFields extends TableRelationalConfig> {\n\tstatic readonly [entityKind]: string = 'GelRelationalQueryBuilder';\n\n\tconstructor(\n\t\tprivate fullSchema: Record<string, unknown>,\n\t\tprivate schema: TSchema,\n\t\tprivate tableNamesMap: Record<string, string>,\n\t\tprivate table: GelTable,\n\t\tprivate tableConfig: TableRelationalConfig,\n\t\tprivate dialect: GelDialect,\n\t\tprivate session: GelSession,\n\t) {}\n\n\tfindMany<TConfig extends DBQueryConfig<'many', true, TSchema, TFields>>(\n\t\tconfig?: KnownKeysOnly<TConfig, DBQueryConfig<'many', true, TSchema, TFields>>,\n\t): GelRelationalQuery<BuildQueryResult<TSchema, TFields, TConfig>[]> {\n\t\treturn new GelRelationalQuery(\n\t\t\tthis.fullSchema,\n\t\t\tthis.schema,\n\t\t\tthis.tableNamesMap,\n\t\t\tthis.table,\n\t\t\tthis.tableConfig,\n\t\t\tthis.dialect,\n\t\t\tthis.session,\n\t\t\tconfig ? (config as DBQueryConfig<'many', true>) : {},\n\t\t\t'many',\n\t\t);\n\t}\n\n\tfindFirst<TSelection extends Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>(\n\t\tconfig?: KnownKeysOnly<TSelection, Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>,\n\t): GelRelationalQuery<BuildQueryResult<TSchema, TFields, TSelection> | undefined> {\n\t\treturn new GelRelationalQuery(\n\t\t\tthis.fullSchema,\n\t\t\tthis.schema,\n\t\t\tthis.tableNamesMap,\n\t\t\tthis.table,\n\t\t\tthis.tableConfig,\n\t\t\tthis.dialect,\n\t\t\tthis.session,\n\t\t\tconfig ? { ...(config as DBQueryConfig<'many', true> | undefined), limit: 1 } : { limit: 1 },\n\t\t\t'first',\n\t\t);\n\t}\n}\n\nexport class GelRelationalQuery<TResult> extends QueryPromise<TResult>\n\timplements RunnableQuery<TResult, 'gel'>, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'GelRelationalQuery';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'gel';\n\t\treadonly result: TResult;\n\t};\n\n\tconstructor(\n\t\tprivate fullSchema: Record<string, unknown>,\n\t\tprivate schema: TablesRelationalConfig,\n\t\tprivate tableNamesMap: Record<string, string>,\n\t\tprivate table: GelTable,\n\t\tprivate tableConfig: TableRelationalConfig,\n\t\tprivate dialect: GelDialect,\n\t\tprivate session: GelSession,\n\t\tprivate config: DBQueryConfig<'many', true> | true,\n\t\tprivate mode: 'many' | 'first',\n\t) {\n\t\tsuper();\n\t}\n\n\t/** @internal */\n\t_prepare(name?: string): GelPreparedQuery<PreparedQueryConfig & { execute: TResult }> {\n\t\treturn tracer.startActiveSpan('drizzle.prepareQuery', () => {\n\t\t\tconst { query, builtQuery } = this._toSQL();\n\n\t\t\treturn this.session.prepareQuery<PreparedQueryConfig & { execute: TResult }>(\n\t\t\t\tbuiltQuery,\n\t\t\t\tundefined,\n\t\t\t\tname,\n\t\t\t\ttrue,\n\t\t\t\t(rawRows, mapColumnValue) => {\n\t\t\t\t\tconst rows = rawRows.map((row) =>\n\t\t\t\t\t\tmapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue)\n\t\t\t\t\t);\n\t\t\t\t\tif (this.mode === 'first') {\n\t\t\t\t\t\treturn rows[0] as TResult;\n\t\t\t\t\t}\n\t\t\t\t\treturn rows as TResult;\n\t\t\t\t},\n\t\t\t);\n\t\t});\n\t}\n\n\tprepare(name: string): GelPreparedQuery<PreparedQueryConfig & { execute: TResult }> {\n\t\treturn this._prepare(name);\n\t}\n\n\tprivate _getQuery() {\n\t\treturn this.dialect.buildRelationalQueryWithoutPK({\n\t\t\tfullSchema: this.fullSchema,\n\t\t\tschema: this.schema,\n\t\t\ttableNamesMap: this.tableNamesMap,\n\t\t\ttable: this.table,\n\t\t\ttableConfig: this.tableConfig,\n\t\t\tqueryConfig: this.config,\n\t\t\ttableAlias: this.tableConfig.tsName,\n\t\t});\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this._getQuery().sql as SQL;\n\t}\n\n\tprivate _toSQL(): { query: BuildRelationalQueryResult; builtQuery: QueryWithTypings } {\n\t\tconst query = this._getQuery();\n\n\t\tconst builtQuery = this.dialect.sqlToQuery(query.sql as SQL);\n\n\t\treturn { query, builtQuery };\n\t}\n\n\ttoSQL(): Query {\n\t\treturn this._toSQL().builtQuery;\n\t}\n\n\toverride execute(): Promise<TResult> {\n\t\treturn tracer.startActiveSpan('drizzle.operation', () => {\n\t\t\treturn this._prepare().execute(undefined);\n\t\t});\n\t}\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B;AAAA,EAIC;AAAA,OAGM;AAGP,SAAS,cAAc;AAMhB,MAAM,uBAAsG;AAAA,EAGlH,YACS,YACA,QACA,eACA,OACA,aACA,SACA,SACP;AAPO;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,EACN;AAAA,EAVH,QAAiB,UAAU,IAAY;AAAA,EAYvC,SACC,QACoE;AACpE,WAAO,IAAI;AAAA,MACV,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,SAAU,SAAyC,CAAC;AAAA,MACpD;AAAA,IACD;AAAA,EACD;AAAA,EAEA,UACC,QACiF;AACjF,WAAO,IAAI;AAAA,MACV,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,SAAS,EAAE,GAAI,QAAoD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE;AAAA,MAC3F;AAAA,IACD;AAAA,EACD;AACD;AAEO,MAAM,2BAAoC,aAEjD;AAAA,EAQC,YACS,YACA,QACA,eACA,OACA,aACA,SACA,SACA,QACA,MACP;AACD,UAAM;AAVE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,EAGT;AAAA,EAnBA,QAA0B,UAAU,IAAY;AAAA;AAAA,EAsBhD,SAAS,MAA6E;AACrF,WAAO,OAAO,gBAAgB,wBAAwB,MAAM;AAC3D,YAAM,EAAE,OAAO,WAAW,IAAI,KAAK,OAAO;AAE1C,aAAO,KAAK,QAAQ;AAAA,QACnB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,CAAC,SAAS,mBAAmB;AAC5B,gBAAM,OAAO,QAAQ;AAAA,YAAI,CAAC,QACzB,iBAAiB,KAAK,QAAQ,KAAK,aAAa,KAAK,MAAM,WAAW,cAAc;AAAA,UACrF;AACA,cAAI,KAAK,SAAS,SAAS;AAC1B,mBAAO,KAAK,CAAC;AAAA,UACd;AACA,iBAAO;AAAA,QACR;AAAA,MACD;AAAA,IACD,CAAC;AAAA,EACF;AAAA,EAEA,QAAQ,MAA4E;AACnF,WAAO,KAAK,SAAS,IAAI;AAAA,EAC1B;AAAA,EAEQ,YAAY;AACnB,WAAO,KAAK,QAAQ,8BAA8B;AAAA,MACjD,YAAY,KAAK;AAAA,MACjB,QAAQ,KAAK;AAAA,MACb,eAAe,KAAK;AAAA,MACpB,OAAO,KAAK;AAAA,MACZ,aAAa,KAAK;AAAA,MAClB,aAAa,KAAK;AAAA,MAClB,YAAY,KAAK,YAAY;AAAA,IAC9B,CAAC;AAAA,EACF;AAAA;AAAA,EAGA,SAAc;AACb,WAAO,KAAK,UAAU,EAAE;AAAA,EACzB;AAAA,EAEQ,SAA8E;AACrF,UAAM,QAAQ,KAAK,UAAU;AAE7B,UAAM,aAAa,KAAK,QAAQ,WAAW,MAAM,GAAU;AAE3D,WAAO,EAAE,OAAO,WAAW;AAAA,EAC5B;AAAA,EAEA,QAAe;AACd,WAAO,KAAK,OAAO,EAAE;AAAA,EACtB;AAAA,EAES,UAA4B;AACpC,WAAO,OAAO,gBAAgB,qBAAqB,MAAM;AACxD,aAAO,KAAK,SAAS,EAAE,QAAQ,MAAS;AAAA,IACzC,CAAC;AAAA,EACF;AACD;","names":[]}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var raw_exports = {};
|
|
20
|
-
__export(raw_exports, {
|
|
21
|
-
GelRaw: () => GelRaw
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(raw_exports);
|
|
24
|
-
var import_entity = require("../../entity.cjs");
|
|
25
|
-
var import_query_promise = require("../../query-promise.cjs");
|
|
26
|
-
class GelRaw extends import_query_promise.QueryPromise {
|
|
27
|
-
constructor(execute, sql, query, mapBatchResult) {
|
|
28
|
-
super();
|
|
29
|
-
this.execute = execute;
|
|
30
|
-
this.sql = sql;
|
|
31
|
-
this.query = query;
|
|
32
|
-
this.mapBatchResult = mapBatchResult;
|
|
33
|
-
}
|
|
34
|
-
static [import_entity.entityKind] = "GelRaw";
|
|
35
|
-
/** @internal */
|
|
36
|
-
getSQL() {
|
|
37
|
-
return this.sql;
|
|
38
|
-
}
|
|
39
|
-
getQuery() {
|
|
40
|
-
return this.query;
|
|
41
|
-
}
|
|
42
|
-
mapResult(result, isFromBatch) {
|
|
43
|
-
return isFromBatch ? this.mapBatchResult(result) : result;
|
|
44
|
-
}
|
|
45
|
-
_prepare() {
|
|
46
|
-
return this;
|
|
47
|
-
}
|
|
48
|
-
/** @internal */
|
|
49
|
-
isResponseInArrayMode() {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
54
|
-
0 && (module.exports = {
|
|
55
|
-
GelRaw
|
|
56
|
-
});
|
|
57
|
-
//# sourceMappingURL=raw.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/gel-core/query-builders/raw.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { Query, SQL, SQLWrapper } from '~/sql/sql.ts';\n\nexport interface GelRaw<TResult> extends QueryPromise<TResult>, RunnableQuery<TResult, 'gel'>, SQLWrapper {}\n\nexport class GelRaw<TResult> extends QueryPromise<TResult>\n\timplements RunnableQuery<TResult, 'gel'>, SQLWrapper, PreparedQuery\n{\n\tstatic override readonly [entityKind]: string = 'GelRaw';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'gel';\n\t\treadonly result: TResult;\n\t};\n\n\tconstructor(\n\t\tpublic execute: () => Promise<TResult>,\n\t\tprivate sql: SQL,\n\t\tprivate query: Query,\n\t\tprivate mapBatchResult: (result: unknown) => unknown,\n\t) {\n\t\tsuper();\n\t}\n\n\t/** @internal */\n\tgetSQL() {\n\t\treturn this.sql;\n\t}\n\n\tgetQuery() {\n\t\treturn this.query;\n\t}\n\n\tmapResult(result: unknown, isFromBatch?: boolean) {\n\t\treturn isFromBatch ? this.mapBatchResult(result) : result;\n\t}\n\n\t_prepare(): PreparedQuery {\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode() {\n\t\treturn false;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAC3B,2BAA6B;AAOtB,MAAM,eAAwB,kCAErC;AAAA,EAQC,YACQ,SACC,KACA,OACA,gBACP;AACD,UAAM;AALC;AACC;AACA;AACA;AAAA,EAGT;AAAA,EAdA,QAA0B,wBAAU,IAAY;AAAA;AAAA,EAiBhD,SAAS;AACR,WAAO,KAAK;AAAA,EACb;AAAA,EAEA,WAAW;AACV,WAAO,KAAK;AAAA,EACb;AAAA,EAEA,UAAU,QAAiB,aAAuB;AACjD,WAAO,cAAc,KAAK,eAAe,MAAM,IAAI;AAAA,EACpD;AAAA,EAEA,WAA0B;AACzB,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,wBAAwB;AACvB,WAAO;AAAA,EACR;AACD;","names":[]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { entityKind } from "../../entity.cjs";
|
|
2
|
-
import { QueryPromise } from "../../query-promise.cjs";
|
|
3
|
-
import type { RunnableQuery } from "../../runnable-query.cjs";
|
|
4
|
-
import type { PreparedQuery } from "../../session.cjs";
|
|
5
|
-
import type { Query, SQL, SQLWrapper } from "../../sql/sql.cjs";
|
|
6
|
-
export interface GelRaw<TResult> extends QueryPromise<TResult>, RunnableQuery<TResult, 'gel'>, SQLWrapper {
|
|
7
|
-
}
|
|
8
|
-
export declare class GelRaw<TResult> extends QueryPromise<TResult> implements RunnableQuery<TResult, 'gel'>, SQLWrapper, PreparedQuery {
|
|
9
|
-
execute: () => Promise<TResult>;
|
|
10
|
-
private sql;
|
|
11
|
-
private query;
|
|
12
|
-
private mapBatchResult;
|
|
13
|
-
static readonly [entityKind]: string;
|
|
14
|
-
readonly _: {
|
|
15
|
-
readonly dialect: 'gel';
|
|
16
|
-
readonly result: TResult;
|
|
17
|
-
};
|
|
18
|
-
constructor(execute: () => Promise<TResult>, sql: SQL, query: Query, mapBatchResult: (result: unknown) => unknown);
|
|
19
|
-
getQuery(): Query;
|
|
20
|
-
mapResult(result: unknown, isFromBatch?: boolean): unknown;
|
|
21
|
-
_prepare(): PreparedQuery;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { entityKind } from "../../entity.js";
|
|
2
|
-
import { QueryPromise } from "../../query-promise.js";
|
|
3
|
-
import type { RunnableQuery } from "../../runnable-query.js";
|
|
4
|
-
import type { PreparedQuery } from "../../session.js";
|
|
5
|
-
import type { Query, SQL, SQLWrapper } from "../../sql/sql.js";
|
|
6
|
-
export interface GelRaw<TResult> extends QueryPromise<TResult>, RunnableQuery<TResult, 'gel'>, SQLWrapper {
|
|
7
|
-
}
|
|
8
|
-
export declare class GelRaw<TResult> extends QueryPromise<TResult> implements RunnableQuery<TResult, 'gel'>, SQLWrapper, PreparedQuery {
|
|
9
|
-
execute: () => Promise<TResult>;
|
|
10
|
-
private sql;
|
|
11
|
-
private query;
|
|
12
|
-
private mapBatchResult;
|
|
13
|
-
static readonly [entityKind]: string;
|
|
14
|
-
readonly _: {
|
|
15
|
-
readonly dialect: 'gel';
|
|
16
|
-
readonly result: TResult;
|
|
17
|
-
};
|
|
18
|
-
constructor(execute: () => Promise<TResult>, sql: SQL, query: Query, mapBatchResult: (result: unknown) => unknown);
|
|
19
|
-
getQuery(): Query;
|
|
20
|
-
mapResult(result: unknown, isFromBatch?: boolean): unknown;
|
|
21
|
-
_prepare(): PreparedQuery;
|
|
22
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { entityKind } from "../../entity.js";
|
|
2
|
-
import { QueryPromise } from "../../query-promise.js";
|
|
3
|
-
class GelRaw extends QueryPromise {
|
|
4
|
-
constructor(execute, sql, query, mapBatchResult) {
|
|
5
|
-
super();
|
|
6
|
-
this.execute = execute;
|
|
7
|
-
this.sql = sql;
|
|
8
|
-
this.query = query;
|
|
9
|
-
this.mapBatchResult = mapBatchResult;
|
|
10
|
-
}
|
|
11
|
-
static [entityKind] = "GelRaw";
|
|
12
|
-
/** @internal */
|
|
13
|
-
getSQL() {
|
|
14
|
-
return this.sql;
|
|
15
|
-
}
|
|
16
|
-
getQuery() {
|
|
17
|
-
return this.query;
|
|
18
|
-
}
|
|
19
|
-
mapResult(result, isFromBatch) {
|
|
20
|
-
return isFromBatch ? this.mapBatchResult(result) : result;
|
|
21
|
-
}
|
|
22
|
-
_prepare() {
|
|
23
|
-
return this;
|
|
24
|
-
}
|
|
25
|
-
/** @internal */
|
|
26
|
-
isResponseInArrayMode() {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
GelRaw
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=raw.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/gel-core/query-builders/raw.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { Query, SQL, SQLWrapper } from '~/sql/sql.ts';\n\nexport interface GelRaw<TResult> extends QueryPromise<TResult>, RunnableQuery<TResult, 'gel'>, SQLWrapper {}\n\nexport class GelRaw<TResult> extends QueryPromise<TResult>\n\timplements RunnableQuery<TResult, 'gel'>, SQLWrapper, PreparedQuery\n{\n\tstatic override readonly [entityKind]: string = 'GelRaw';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'gel';\n\t\treadonly result: TResult;\n\t};\n\n\tconstructor(\n\t\tpublic execute: () => Promise<TResult>,\n\t\tprivate sql: SQL,\n\t\tprivate query: Query,\n\t\tprivate mapBatchResult: (result: unknown) => unknown,\n\t) {\n\t\tsuper();\n\t}\n\n\t/** @internal */\n\tgetSQL() {\n\t\treturn this.sql;\n\t}\n\n\tgetQuery() {\n\t\treturn this.query;\n\t}\n\n\tmapResult(result: unknown, isFromBatch?: boolean) {\n\t\treturn isFromBatch ? this.mapBatchResult(result) : result;\n\t}\n\n\t_prepare(): PreparedQuery {\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode() {\n\t\treturn false;\n\t}\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAOtB,MAAM,eAAwB,aAErC;AAAA,EAQC,YACQ,SACC,KACA,OACA,gBACP;AACD,UAAM;AALC;AACC;AACA;AACA;AAAA,EAGT;AAAA,EAdA,QAA0B,UAAU,IAAY;AAAA;AAAA,EAiBhD,SAAS;AACR,WAAO,KAAK;AAAA,EACb;AAAA,EAEA,WAAW;AACV,WAAO,KAAK;AAAA,EACb;AAAA,EAEA,UAAU,QAAiB,aAAuB;AACjD,WAAO,cAAc,KAAK,eAAe,MAAM,IAAI;AAAA,EACpD;AAAA,EAEA,WAA0B;AACzB,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,wBAAwB;AACvB,WAAO;AAAA,EACR;AACD;","names":[]}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var refresh_materialized_view_exports = {};
|
|
20
|
-
__export(refresh_materialized_view_exports, {
|
|
21
|
-
GelRefreshMaterializedView: () => GelRefreshMaterializedView
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(refresh_materialized_view_exports);
|
|
24
|
-
var import_entity = require("../../entity.cjs");
|
|
25
|
-
var import_query_promise = require("../../query-promise.cjs");
|
|
26
|
-
var import_tracing = require("../../tracing.cjs");
|
|
27
|
-
class GelRefreshMaterializedView extends import_query_promise.QueryPromise {
|
|
28
|
-
constructor(view, session, dialect) {
|
|
29
|
-
super();
|
|
30
|
-
this.session = session;
|
|
31
|
-
this.dialect = dialect;
|
|
32
|
-
this.config = { view };
|
|
33
|
-
}
|
|
34
|
-
static [import_entity.entityKind] = "GelRefreshMaterializedView";
|
|
35
|
-
config;
|
|
36
|
-
concurrently() {
|
|
37
|
-
if (this.config.withNoData !== void 0) {
|
|
38
|
-
throw new Error("Cannot use concurrently and withNoData together");
|
|
39
|
-
}
|
|
40
|
-
this.config.concurrently = true;
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
withNoData() {
|
|
44
|
-
if (this.config.concurrently !== void 0) {
|
|
45
|
-
throw new Error("Cannot use concurrently and withNoData together");
|
|
46
|
-
}
|
|
47
|
-
this.config.withNoData = true;
|
|
48
|
-
return this;
|
|
49
|
-
}
|
|
50
|
-
/** @internal */
|
|
51
|
-
getSQL() {
|
|
52
|
-
return this.dialect.buildRefreshMaterializedViewQuery(this.config);
|
|
53
|
-
}
|
|
54
|
-
toSQL() {
|
|
55
|
-
const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
|
|
56
|
-
return rest;
|
|
57
|
-
}
|
|
58
|
-
/** @internal */
|
|
59
|
-
_prepare(name) {
|
|
60
|
-
return import_tracing.tracer.startActiveSpan("drizzle.prepareQuery", () => {
|
|
61
|
-
return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()), void 0, name, true);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
prepare(name) {
|
|
65
|
-
return this._prepare(name);
|
|
66
|
-
}
|
|
67
|
-
execute = (placeholderValues) => {
|
|
68
|
-
return import_tracing.tracer.startActiveSpan("drizzle.operation", () => {
|
|
69
|
-
return this._prepare().execute(placeholderValues);
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
74
|
-
0 && (module.exports = {
|
|
75
|
-
GelRefreshMaterializedView
|
|
76
|
-
});
|
|
77
|
-
//# sourceMappingURL=refresh-materialized-view.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/gel-core/query-builders/refresh-materialized-view.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport type { GelDialect } from '~/gel-core/dialect.ts';\nimport type {\n\tGelPreparedQuery,\n\tGelQueryResultHKT,\n\tGelQueryResultKind,\n\tGelSession,\n\tPreparedQueryConfig,\n} from '~/gel-core/session.ts';\nimport type { GelMaterializedView } from '~/gel-core/view.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Query, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport { tracer } from '~/tracing.ts';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT>\n\textends\n\t\tQueryPromise<GelQueryResultKind<TQueryResult, never>>,\n\t\tRunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>,\n\t\tSQLWrapper\n{\n\treadonly _: {\n\t\treadonly dialect: 'gel';\n\t\treadonly result: GelQueryResultKind<TQueryResult, never>;\n\t};\n}\n\nexport class GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT>\n\textends QueryPromise<GelQueryResultKind<TQueryResult, never>>\n\timplements RunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'GelRefreshMaterializedView';\n\n\tprivate config: {\n\t\tview: GelMaterializedView;\n\t\tconcurrently?: boolean;\n\t\twithNoData?: boolean;\n\t};\n\n\tconstructor(\n\t\tview: GelMaterializedView,\n\t\tprivate session: GelSession,\n\t\tprivate dialect: GelDialect,\n\t) {\n\t\tsuper();\n\t\tthis.config = { view };\n\t}\n\n\tconcurrently(): this {\n\t\tif (this.config.withNoData !== undefined) {\n\t\t\tthrow new Error('Cannot use concurrently and withNoData together');\n\t\t}\n\t\tthis.config.concurrently = true;\n\t\treturn this;\n\t}\n\n\twithNoData(): this {\n\t\tif (this.config.concurrently !== undefined) {\n\t\t\tthrow new Error('Cannot use concurrently and withNoData together');\n\t\t}\n\t\tthis.config.withNoData = true;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildRefreshMaterializedViewQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(name?: string): GelPreparedQuery<\n\t\tPreparedQueryConfig & {\n\t\t\texecute: GelQueryResultKind<TQueryResult, never>;\n\t\t}\n\t> {\n\t\treturn tracer.startActiveSpan('drizzle.prepareQuery', () => {\n\t\t\treturn this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()), undefined, name, true);\n\t\t});\n\t}\n\n\tprepare(name: string): GelPreparedQuery<\n\t\tPreparedQueryConfig & {\n\t\t\texecute: GelQueryResultKind<TQueryResult, never>;\n\t\t}\n\t> {\n\t\treturn this._prepare(name);\n\t}\n\n\texecute: ReturnType<this['prepare']>['execute'] = (placeholderValues) => {\n\t\treturn tracer.startActiveSpan('drizzle.operation', () => {\n\t\t\treturn this._prepare().execute(placeholderValues);\n\t\t});\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAU3B,2BAA6B;AAG7B,qBAAuB;AAehB,MAAM,mCACJ,kCAET;AAAA,EASC,YACC,MACQ,SACA,SACP;AACD,UAAM;AAHE;AACA;AAGR,SAAK,SAAS,EAAE,KAAK;AAAA,EACtB;AAAA,EAfA,QAA0B,wBAAU,IAAY;AAAA,EAExC;AAAA,EAeR,eAAqB;AACpB,QAAI,KAAK,OAAO,eAAe,QAAW;AACzC,YAAM,IAAI,MAAM,iDAAiD;AAAA,IAClE;AACA,SAAK,OAAO,eAAe;AAC3B,WAAO;AAAA,EACR;AAAA,EAEA,aAAmB;AAClB,QAAI,KAAK,OAAO,iBAAiB,QAAW;AAC3C,YAAM,IAAI,MAAM,iDAAiD;AAAA,IAClE;AACA,SAAK,OAAO,aAAa;AACzB,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,SAAc;AACb,WAAO,KAAK,QAAQ,kCAAkC,KAAK,MAAM;AAAA,EAClE;AAAA,EAEA,QAAe;AACd,UAAM,EAAE,SAAS,UAAU,GAAG,KAAK,IAAI,KAAK,QAAQ,WAAW,KAAK,OAAO,CAAC;AAC5E,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,SAAS,MAIP;AACD,WAAO,sBAAO,gBAAgB,wBAAwB,MAAM;AAC3D,aAAO,KAAK,QAAQ,aAAa,KAAK,QAAQ,WAAW,KAAK,OAAO,CAAC,GAAG,QAAW,MAAM,IAAI;AAAA,IAC/F,CAAC;AAAA,EACF;AAAA,EAEA,QAAQ,MAIN;AACD,WAAO,KAAK,SAAS,IAAI;AAAA,EAC1B;AAAA,EAEA,UAAkD,CAAC,sBAAsB;AACxE,WAAO,sBAAO,gBAAgB,qBAAqB,MAAM;AACxD,aAAO,KAAK,SAAS,EAAE,QAAQ,iBAAiB;AAAA,IACjD,CAAC;AAAA,EACF;AACD;","names":[]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { entityKind } from "../../entity.cjs";
|
|
2
|
-
import type { GelDialect } from "../dialect.cjs";
|
|
3
|
-
import type { GelPreparedQuery, GelQueryResultHKT, GelQueryResultKind, GelSession, PreparedQueryConfig } from "../session.cjs";
|
|
4
|
-
import type { GelMaterializedView } from "../view.cjs";
|
|
5
|
-
import { QueryPromise } from "../../query-promise.cjs";
|
|
6
|
-
import type { RunnableQuery } from "../../runnable-query.cjs";
|
|
7
|
-
import type { Query, SQLWrapper } from "../../sql/sql.cjs";
|
|
8
|
-
export interface GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT> extends QueryPromise<GelQueryResultKind<TQueryResult, never>>, RunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>, SQLWrapper {
|
|
9
|
-
readonly _: {
|
|
10
|
-
readonly dialect: 'gel';
|
|
11
|
-
readonly result: GelQueryResultKind<TQueryResult, never>;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export declare class GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT> extends QueryPromise<GelQueryResultKind<TQueryResult, never>> implements RunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>, SQLWrapper {
|
|
15
|
-
private session;
|
|
16
|
-
private dialect;
|
|
17
|
-
static readonly [entityKind]: string;
|
|
18
|
-
private config;
|
|
19
|
-
constructor(view: GelMaterializedView, session: GelSession, dialect: GelDialect);
|
|
20
|
-
concurrently(): this;
|
|
21
|
-
withNoData(): this;
|
|
22
|
-
toSQL(): Query;
|
|
23
|
-
prepare(name: string): GelPreparedQuery<PreparedQueryConfig & {
|
|
24
|
-
execute: GelQueryResultKind<TQueryResult, never>;
|
|
25
|
-
}>;
|
|
26
|
-
execute: ReturnType<this['prepare']>['execute'];
|
|
27
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { entityKind } from "../../entity.js";
|
|
2
|
-
import type { GelDialect } from "../dialect.js";
|
|
3
|
-
import type { GelPreparedQuery, GelQueryResultHKT, GelQueryResultKind, GelSession, PreparedQueryConfig } from "../session.js";
|
|
4
|
-
import type { GelMaterializedView } from "../view.js";
|
|
5
|
-
import { QueryPromise } from "../../query-promise.js";
|
|
6
|
-
import type { RunnableQuery } from "../../runnable-query.js";
|
|
7
|
-
import type { Query, SQLWrapper } from "../../sql/sql.js";
|
|
8
|
-
export interface GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT> extends QueryPromise<GelQueryResultKind<TQueryResult, never>>, RunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>, SQLWrapper {
|
|
9
|
-
readonly _: {
|
|
10
|
-
readonly dialect: 'gel';
|
|
11
|
-
readonly result: GelQueryResultKind<TQueryResult, never>;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export declare class GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT> extends QueryPromise<GelQueryResultKind<TQueryResult, never>> implements RunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>, SQLWrapper {
|
|
15
|
-
private session;
|
|
16
|
-
private dialect;
|
|
17
|
-
static readonly [entityKind]: string;
|
|
18
|
-
private config;
|
|
19
|
-
constructor(view: GelMaterializedView, session: GelSession, dialect: GelDialect);
|
|
20
|
-
concurrently(): this;
|
|
21
|
-
withNoData(): this;
|
|
22
|
-
toSQL(): Query;
|
|
23
|
-
prepare(name: string): GelPreparedQuery<PreparedQueryConfig & {
|
|
24
|
-
execute: GelQueryResultKind<TQueryResult, never>;
|
|
25
|
-
}>;
|
|
26
|
-
execute: ReturnType<this['prepare']>['execute'];
|
|
27
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { entityKind } from "../../entity.js";
|
|
2
|
-
import { QueryPromise } from "../../query-promise.js";
|
|
3
|
-
import { tracer } from "../../tracing.js";
|
|
4
|
-
class GelRefreshMaterializedView extends QueryPromise {
|
|
5
|
-
constructor(view, session, dialect) {
|
|
6
|
-
super();
|
|
7
|
-
this.session = session;
|
|
8
|
-
this.dialect = dialect;
|
|
9
|
-
this.config = { view };
|
|
10
|
-
}
|
|
11
|
-
static [entityKind] = "GelRefreshMaterializedView";
|
|
12
|
-
config;
|
|
13
|
-
concurrently() {
|
|
14
|
-
if (this.config.withNoData !== void 0) {
|
|
15
|
-
throw new Error("Cannot use concurrently and withNoData together");
|
|
16
|
-
}
|
|
17
|
-
this.config.concurrently = true;
|
|
18
|
-
return this;
|
|
19
|
-
}
|
|
20
|
-
withNoData() {
|
|
21
|
-
if (this.config.concurrently !== void 0) {
|
|
22
|
-
throw new Error("Cannot use concurrently and withNoData together");
|
|
23
|
-
}
|
|
24
|
-
this.config.withNoData = true;
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
/** @internal */
|
|
28
|
-
getSQL() {
|
|
29
|
-
return this.dialect.buildRefreshMaterializedViewQuery(this.config);
|
|
30
|
-
}
|
|
31
|
-
toSQL() {
|
|
32
|
-
const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
|
|
33
|
-
return rest;
|
|
34
|
-
}
|
|
35
|
-
/** @internal */
|
|
36
|
-
_prepare(name) {
|
|
37
|
-
return tracer.startActiveSpan("drizzle.prepareQuery", () => {
|
|
38
|
-
return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()), void 0, name, true);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
prepare(name) {
|
|
42
|
-
return this._prepare(name);
|
|
43
|
-
}
|
|
44
|
-
execute = (placeholderValues) => {
|
|
45
|
-
return tracer.startActiveSpan("drizzle.operation", () => {
|
|
46
|
-
return this._prepare().execute(placeholderValues);
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
export {
|
|
51
|
-
GelRefreshMaterializedView
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=refresh-materialized-view.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/gel-core/query-builders/refresh-materialized-view.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport type { GelDialect } from '~/gel-core/dialect.ts';\nimport type {\n\tGelPreparedQuery,\n\tGelQueryResultHKT,\n\tGelQueryResultKind,\n\tGelSession,\n\tPreparedQueryConfig,\n} from '~/gel-core/session.ts';\nimport type { GelMaterializedView } from '~/gel-core/view.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Query, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport { tracer } from '~/tracing.ts';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT>\n\textends\n\t\tQueryPromise<GelQueryResultKind<TQueryResult, never>>,\n\t\tRunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>,\n\t\tSQLWrapper\n{\n\treadonly _: {\n\t\treadonly dialect: 'gel';\n\t\treadonly result: GelQueryResultKind<TQueryResult, never>;\n\t};\n}\n\nexport class GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT>\n\textends QueryPromise<GelQueryResultKind<TQueryResult, never>>\n\timplements RunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'GelRefreshMaterializedView';\n\n\tprivate config: {\n\t\tview: GelMaterializedView;\n\t\tconcurrently?: boolean;\n\t\twithNoData?: boolean;\n\t};\n\n\tconstructor(\n\t\tview: GelMaterializedView,\n\t\tprivate session: GelSession,\n\t\tprivate dialect: GelDialect,\n\t) {\n\t\tsuper();\n\t\tthis.config = { view };\n\t}\n\n\tconcurrently(): this {\n\t\tif (this.config.withNoData !== undefined) {\n\t\t\tthrow new Error('Cannot use concurrently and withNoData together');\n\t\t}\n\t\tthis.config.concurrently = true;\n\t\treturn this;\n\t}\n\n\twithNoData(): this {\n\t\tif (this.config.concurrently !== undefined) {\n\t\t\tthrow new Error('Cannot use concurrently and withNoData together');\n\t\t}\n\t\tthis.config.withNoData = true;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildRefreshMaterializedViewQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(name?: string): GelPreparedQuery<\n\t\tPreparedQueryConfig & {\n\t\t\texecute: GelQueryResultKind<TQueryResult, never>;\n\t\t}\n\t> {\n\t\treturn tracer.startActiveSpan('drizzle.prepareQuery', () => {\n\t\t\treturn this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()), undefined, name, true);\n\t\t});\n\t}\n\n\tprepare(name: string): GelPreparedQuery<\n\t\tPreparedQueryConfig & {\n\t\t\texecute: GelQueryResultKind<TQueryResult, never>;\n\t\t}\n\t> {\n\t\treturn this._prepare(name);\n\t}\n\n\texecute: ReturnType<this['prepare']>['execute'] = (placeholderValues) => {\n\t\treturn tracer.startActiveSpan('drizzle.operation', () => {\n\t\t\treturn this._prepare().execute(placeholderValues);\n\t\t});\n\t};\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAU3B,SAAS,oBAAoB;AAG7B,SAAS,cAAc;AAehB,MAAM,mCACJ,aAET;AAAA,EASC,YACC,MACQ,SACA,SACP;AACD,UAAM;AAHE;AACA;AAGR,SAAK,SAAS,EAAE,KAAK;AAAA,EACtB;AAAA,EAfA,QAA0B,UAAU,IAAY;AAAA,EAExC;AAAA,EAeR,eAAqB;AACpB,QAAI,KAAK,OAAO,eAAe,QAAW;AACzC,YAAM,IAAI,MAAM,iDAAiD;AAAA,IAClE;AACA,SAAK,OAAO,eAAe;AAC3B,WAAO;AAAA,EACR;AAAA,EAEA,aAAmB;AAClB,QAAI,KAAK,OAAO,iBAAiB,QAAW;AAC3C,YAAM,IAAI,MAAM,iDAAiD;AAAA,IAClE;AACA,SAAK,OAAO,aAAa;AACzB,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,SAAc;AACb,WAAO,KAAK,QAAQ,kCAAkC,KAAK,MAAM;AAAA,EAClE;AAAA,EAEA,QAAe;AACd,UAAM,EAAE,SAAS,UAAU,GAAG,KAAK,IAAI,KAAK,QAAQ,WAAW,KAAK,OAAO,CAAC;AAC5E,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,SAAS,MAIP;AACD,WAAO,OAAO,gBAAgB,wBAAwB,MAAM;AAC3D,aAAO,KAAK,QAAQ,aAAa,KAAK,QAAQ,WAAW,KAAK,OAAO,CAAC,GAAG,QAAW,MAAM,IAAI;AAAA,IAC/F,CAAC;AAAA,EACF;AAAA,EAEA,QAAQ,MAIN;AACD,WAAO,KAAK,SAAS,IAAI;AAAA,EAC1B;AAAA,EAEA,UAAkD,CAAC,sBAAsB;AACxE,WAAO,OAAO,gBAAgB,qBAAqB,MAAM;AACxD,aAAO,KAAK,SAAS,EAAE,QAAQ,iBAAiB;AAAA,IACjD,CAAC;AAAA,EACF;AACD;","names":[]}
|