uql-orm 0.20.2 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -110
- package/dist/browser/http/bus.d.ts +0 -1
- package/dist/browser/http/bus.js +0 -1
- package/dist/browser/http/http.d.ts +0 -1
- package/dist/browser/http/http.js +0 -1
- package/dist/browser/http/index.d.ts +0 -1
- package/dist/browser/http/index.js +0 -1
- package/dist/browser/index.d.ts +0 -1
- package/dist/browser/index.js +0 -1
- package/dist/browser/options.d.ts +0 -1
- package/dist/browser/options.js +0 -1
- package/dist/browser/querier/httpQuerier.d.ts +0 -1
- package/dist/browser/querier/httpQuerier.js +0 -1
- package/dist/browser/querier/index.d.ts +0 -1
- package/dist/browser/querier/index.js +0 -1
- package/dist/browser/type/clientQuerier.d.ts +0 -1
- package/dist/browser/type/clientQuerier.js +0 -1
- package/dist/browser/type/clientQuerierPool.d.ts +0 -1
- package/dist/browser/type/clientQuerierPool.js +0 -1
- package/dist/browser/type/index.d.ts +0 -1
- package/dist/browser/type/index.js +0 -1
- package/dist/browser/type/request.d.ts +0 -1
- package/dist/browser/type/request.js +0 -1
- package/dist/browser/uql-browser.min.js +2 -2
- package/dist/browser/uql-browser.min.js.map +1 -1
- package/dist/bunSql/bunSql.util.d.ts +0 -1
- package/dist/bunSql/bunSql.util.js +0 -1
- package/dist/bunSql/bunSqlCockroachDialect.d.ts +2 -3
- package/dist/bunSql/bunSqlCockroachDialect.js +4 -11
- package/dist/bunSql/bunSqlPostgresDialect.d.ts +2 -3
- package/dist/bunSql/bunSqlPostgresDialect.js +4 -11
- package/dist/bunSql/bunSqlQuerier.d.ts +0 -1
- package/dist/bunSql/bunSqlQuerier.js +0 -1
- package/dist/bunSql/bunSqlQuerierPool.d.ts +0 -1
- package/dist/bunSql/bunSqlQuerierPool.js +0 -1
- package/dist/bunSql/bunSqliteDialect.d.ts +0 -1
- package/dist/bunSql/bunSqliteDialect.js +0 -1
- package/dist/bunSql/index.d.ts +0 -1
- package/dist/bunSql/index.js +0 -1
- package/dist/cockroachdb/cockroachDialect.d.ts +20 -5
- package/dist/cockroachdb/cockroachDialect.js +33 -19
- package/dist/cockroachdb/crdbQuerier.d.ts +0 -1
- package/dist/cockroachdb/crdbQuerier.js +0 -1
- package/dist/cockroachdb/crdbQuerierPool.d.ts +0 -1
- package/dist/cockroachdb/crdbQuerierPool.js +0 -1
- package/dist/cockroachdb/index.d.ts +0 -1
- package/dist/cockroachdb/index.js +0 -1
- package/dist/context/context.browser.d.ts +0 -1
- package/dist/context/context.browser.js +0 -1
- package/dist/context/context.d.ts +0 -1
- package/dist/context/context.js +0 -1
- package/dist/context/securityError.d.ts +0 -1
- package/dist/context/securityError.js +0 -1
- package/dist/d1/d1Querier.d.ts +4 -4
- package/dist/d1/d1Querier.js +0 -4
- package/dist/d1/d1QuerierPool.d.ts +0 -1
- package/dist/d1/d1QuerierPool.js +0 -1
- package/dist/d1/d1SqliteDialect.d.ts +7 -1
- package/dist/d1/d1SqliteDialect.js +9 -1
- package/dist/d1/index.d.ts +0 -1
- package/dist/d1/index.js +0 -1
- package/dist/dialect/abstractDialect.d.ts +21 -5
- package/dist/dialect/abstractDialect.js +26 -5
- package/dist/dialect/abstractSqlDialect.d.ts +57 -17
- package/dist/dialect/abstractSqlDialect.js +182 -159
- package/dist/dialect/index.d.ts +1 -1
- package/dist/dialect/index.js +1 -1
- package/dist/dialect/indexSqlDialect.d.ts +57 -0
- package/dist/dialect/indexSqlDialect.js +101 -0
- package/dist/dialect/jsonArrayElemMatchUtils.d.ts +0 -1
- package/dist/dialect/jsonArrayElemMatchUtils.js +0 -1
- package/dist/dialect/jsonSql.d.ts +0 -1
- package/dist/dialect/jsonSql.js +1 -2
- package/dist/dialect/mysqlLikeSqlDialect.d.ts +16 -2
- package/dist/dialect/mysqlLikeSqlDialect.js +34 -5
- package/dist/dialect/pgLikeSqlDialect.d.ts +34 -16
- package/dist/dialect/pgLikeSqlDialect.js +94 -71
- package/dist/dialect/queryContext.d.ts +0 -1
- package/dist/dialect/queryContext.js +0 -1
- package/dist/dialect/vectorCast.d.ts +32 -0
- package/dist/dialect/vectorCast.js +41 -0
- package/dist/dialect/vectorSqlDialect.d.ts +11 -5
- package/dist/dialect/vectorSqlDialect.js +19 -9
- package/dist/entity/decorator/entity.d.ts +0 -1
- package/dist/entity/decorator/entity.js +0 -1
- package/dist/entity/decorator/field.d.ts +0 -1
- package/dist/entity/decorator/field.js +0 -1
- package/dist/entity/decorator/filter.d.ts +0 -1
- package/dist/entity/decorator/filter.js +0 -1
- package/dist/entity/decorator/hook.d.ts +0 -1
- package/dist/entity/decorator/hook.js +0 -1
- package/dist/entity/decorator/id.d.ts +0 -1
- package/dist/entity/decorator/id.js +0 -1
- package/dist/entity/decorator/index-decorator.d.ts +2 -10
- package/dist/entity/decorator/index-decorator.js +0 -1
- package/dist/entity/decorator/index.d.ts +0 -1
- package/dist/entity/decorator/index.js +0 -1
- package/dist/entity/decorator/relation.d.ts +0 -1
- package/dist/entity/decorator/relation.js +0 -1
- package/dist/entity/index.d.ts +0 -1
- package/dist/entity/index.js +0 -1
- package/dist/entity/metadata/definition.d.ts +5 -6
- package/dist/entity/metadata/definition.js +10 -6
- package/dist/express/index.d.ts +0 -1
- package/dist/express/index.js +0 -1
- package/dist/express/querierMiddleware.d.ts +0 -1
- package/dist/express/querierMiddleware.js +0 -1
- package/dist/http/contract.d.ts +0 -1
- package/dist/http/contract.js +0 -1
- package/dist/http/fetchHandler.d.ts +0 -1
- package/dist/http/fetchHandler.js +0 -1
- package/dist/http/handler.d.ts +0 -1
- package/dist/http/handler.js +0 -1
- package/dist/http/index.d.ts +0 -1
- package/dist/http/index.js +0 -1
- package/dist/http/query.d.ts +0 -1
- package/dist/http/query.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/libsql/index.d.ts +0 -1
- package/dist/libsql/index.js +0 -1
- package/dist/libsql/libsqlDialect.d.ts +12 -3
- package/dist/libsql/libsqlDialect.js +14 -3
- package/dist/libsql/libsqlQuerier.d.ts +9 -23
- package/dist/libsql/libsqlQuerier.js +9 -78
- package/dist/libsql/libsqlQuerierPool.d.ts +10 -9
- package/dist/libsql/libsqlQuerierPool.js +17 -16
- package/dist/maria/index.d.ts +0 -1
- package/dist/maria/index.js +0 -1
- package/dist/maria/mariaDialect.d.ts +26 -5
- package/dist/maria/mariaDialect.js +54 -16
- package/dist/maria/mariadbQuerier.d.ts +0 -1
- package/dist/maria/mariadbQuerier.js +0 -1
- package/dist/maria/mariadbQuerierPool.d.ts +0 -1
- package/dist/maria/mariadbQuerierPool.js +0 -1
- package/dist/migrate/acquireQuerierForMigrations.d.ts +0 -1
- package/dist/migrate/acquireQuerierForMigrations.js +0 -1
- package/dist/migrate/assertCliConfig.d.ts +0 -1
- package/dist/migrate/assertCliConfig.js +0 -1
- package/dist/migrate/bin.d.ts +0 -1
- package/dist/migrate/bin.js +0 -1
- package/dist/migrate/builder/columnBuilder.d.ts +0 -1
- package/dist/migrate/builder/columnBuilder.js +0 -1
- package/dist/migrate/builder/expressions.d.ts +0 -1
- package/dist/migrate/builder/expressions.js +0 -1
- package/dist/migrate/builder/index.d.ts +0 -1
- package/dist/migrate/builder/index.js +0 -1
- package/dist/migrate/builder/migrationBuilder.d.ts +9 -30
- package/dist/migrate/builder/migrationBuilder.js +58 -77
- package/dist/migrate/builder/splitSqlStatements.d.ts +0 -3
- package/dist/migrate/builder/splitSqlStatements.js +0 -3
- package/dist/migrate/builder/tableBuilder.d.ts +12 -3
- package/dist/migrate/builder/tableBuilder.js +71 -120
- package/dist/migrate/builder/types.d.ts +30 -42
- package/dist/migrate/builder/types.js +0 -1
- package/dist/migrate/cli-config.d.ts +0 -1
- package/dist/migrate/cli-config.js +9 -5
- package/dist/migrate/cli.d.ts +3 -3
- package/dist/migrate/cli.js +21 -49
- package/dist/migrate/codegen/entityCodeGenerator.d.ts +0 -5
- package/dist/migrate/codegen/entityCodeGenerator.js +5 -64
- package/dist/migrate/codegen/fieldOptionsSource.d.ts +10 -0
- package/dist/migrate/codegen/fieldOptionsSource.js +55 -0
- package/dist/migrate/codegen/index.d.ts +0 -3
- package/dist/migrate/codegen/index.js +0 -5
- package/dist/migrate/codegen/migrationFile.d.ts +0 -1
- package/dist/migrate/codegen/migrationFile.js +0 -1
- package/dist/migrate/codegen/smartRelationDetector.d.ts +0 -1
- package/dist/migrate/codegen/smartRelationDetector.js +0 -1
- package/dist/migrate/drift/driftDetector.d.ts +0 -1
- package/dist/migrate/drift/driftDetector.js +0 -1
- package/dist/migrate/drift/index.d.ts +0 -1
- package/dist/migrate/drift/index.js +0 -1
- package/dist/migrate/generator/indexNodeToSchema.d.ts +9 -0
- package/dist/migrate/generator/indexNodeToSchema.js +14 -0
- package/dist/migrate/generator/mongoCommand.d.ts +57 -0
- package/dist/migrate/generator/mongoCommand.js +26 -0
- package/dist/migrate/generator/mongoSchemaGenerator.d.ts +9 -21
- package/dist/migrate/generator/mongoSchemaGenerator.js +40 -83
- package/dist/migrate/index.d.ts +0 -2
- package/dist/migrate/index.js +0 -2
- package/dist/migrate/introspection/abstractSqlSchemaIntrospector.d.ts +25 -11
- package/dist/migrate/introspection/abstractSqlSchemaIntrospector.js +46 -33
- package/dist/migrate/introspection/baseSqlIntrospector.d.ts +0 -2
- package/dist/migrate/introspection/baseSqlIntrospector.js +3 -13
- package/dist/migrate/introspection/index.d.ts +0 -1
- package/dist/migrate/introspection/index.js +0 -1
- package/dist/migrate/introspection/mongoIntrospector.d.ts +0 -1
- package/dist/migrate/introspection/mongoIntrospector.js +2 -3
- package/dist/migrate/introspection/mysqlIntrospector.d.ts +5 -9
- package/dist/migrate/introspection/mysqlIntrospector.js +4 -11
- package/dist/migrate/introspection/postgresIntrospector.d.ts +5 -9
- package/dist/migrate/introspection/postgresIntrospector.js +4 -11
- package/dist/migrate/introspection/sqliteIntrospector.d.ts +6 -6
- package/dist/migrate/introspection/sqliteIntrospector.js +26 -19
- package/dist/migrate/migrator.d.ts +23 -4
- package/dist/migrate/migrator.js +57 -70
- package/dist/migrate/schemaGenerator.d.ts +26 -38
- package/dist/migrate/schemaGenerator.js +69 -175
- package/dist/migrate/schemaGeneratorAsync.d.ts +2 -3
- package/dist/migrate/schemaGeneratorAsync.js +3 -4
- package/dist/migrate/storage/databaseStorage.d.ts +0 -1
- package/dist/migrate/storage/databaseStorage.js +4 -5
- package/dist/migrate/storage/index.d.ts +0 -1
- package/dist/migrate/storage/index.js +0 -1
- package/dist/migrate/storage/jsonStorage.d.ts +0 -1
- package/dist/migrate/storage/jsonStorage.js +0 -1
- package/dist/mongo/index.d.ts +0 -1
- package/dist/mongo/index.js +0 -1
- package/dist/mongo/mongoDialect.d.ts +93 -5
- package/dist/mongo/mongoDialect.js +315 -83
- package/dist/mongo/mongodbNativeDialect.d.ts +0 -1
- package/dist/mongo/mongodbNativeDialect.js +0 -1
- package/dist/mongo/mongodbQuerier.d.ts +5 -1
- package/dist/mongo/mongodbQuerier.js +61 -19
- package/dist/mongo/mongodbQuerierPool.d.ts +0 -1
- package/dist/mongo/mongodbQuerierPool.js +0 -1
- package/dist/mysql/index.d.ts +0 -1
- package/dist/mysql/index.js +0 -1
- package/dist/mysql/mysql2Dialect.d.ts +0 -1
- package/dist/mysql/mysql2Dialect.js +0 -1
- package/dist/mysql/mysql2Querier.d.ts +0 -1
- package/dist/mysql/mysql2Querier.js +0 -1
- package/dist/mysql/mysql2QuerierPool.d.ts +0 -1
- package/dist/mysql/mysql2QuerierPool.js +0 -1
- package/dist/mysql/mysqlDialect.d.ts +8 -1
- package/dist/mysql/mysqlDialect.js +13 -1
- package/dist/namingStrategy/defaultNamingStrategy.d.ts +0 -1
- package/dist/namingStrategy/defaultNamingStrategy.js +0 -1
- package/dist/namingStrategy/index.d.ts +0 -1
- package/dist/namingStrategy/index.js +0 -1
- package/dist/namingStrategy/snakeCaseNamingStrategy.d.ts +0 -1
- package/dist/namingStrategy/snakeCaseNamingStrategy.js +0 -1
- package/dist/neon/index.d.ts +0 -1
- package/dist/neon/index.js +0 -1
- package/dist/neon/neonDialect.d.ts +0 -1
- package/dist/neon/neonDialect.js +0 -1
- package/dist/neon/neonQuerier.d.ts +0 -1
- package/dist/neon/neonQuerier.js +0 -1
- package/dist/neon/neonQuerierPool.d.ts +0 -1
- package/dist/neon/neonQuerierPool.js +0 -1
- package/dist/nestjs/index.d.ts +0 -1
- package/dist/nestjs/index.js +0 -1
- package/dist/nestjs/uqlContextInterceptor.d.ts +0 -1
- package/dist/nestjs/uqlContextInterceptor.js +9 -2
- package/dist/nestjs/uqlModule.d.ts +0 -1
- package/dist/nestjs/uqlModule.js +12 -2
- package/dist/options.d.ts +0 -1
- package/dist/options.js +0 -1
- package/dist/postgres/abstractPgQuerier.d.ts +0 -1
- package/dist/postgres/abstractPgQuerier.js +0 -1
- package/dist/postgres/abstractPgQuerierPool.d.ts +0 -1
- package/dist/postgres/abstractPgQuerierPool.js +0 -1
- package/dist/postgres/index.d.ts +0 -1
- package/dist/postgres/index.js +0 -1
- package/dist/postgres/pgDialect.d.ts +0 -1
- package/dist/postgres/pgDialect.js +0 -1
- package/dist/postgres/pgQuerier.d.ts +0 -1
- package/dist/postgres/pgQuerier.js +0 -1
- package/dist/postgres/pgQuerierPool.d.ts +0 -1
- package/dist/postgres/pgQuerierPool.js +0 -1
- package/dist/postgres/postgresDialect.d.ts +0 -1
- package/dist/postgres/postgresDialect.js +0 -1
- package/dist/postgres/postgresWireDriverCapabilities.d.ts +0 -1
- package/dist/postgres/postgresWireDriverCapabilities.js +0 -1
- package/dist/querier/abstractPoolQuerier.d.ts +0 -1
- package/dist/querier/abstractPoolQuerier.js +0 -1
- package/dist/querier/abstractQuerier.d.ts +0 -1
- package/dist/querier/abstractQuerier.js +9 -2
- package/dist/querier/abstractQuerierPool.d.ts +0 -1
- package/dist/querier/abstractQuerierPool.js +0 -1
- package/dist/querier/abstractSqlQuerier.d.ts +0 -1
- package/dist/querier/abstractSqlQuerier.js +9 -2
- package/dist/querier/abstractSqlQuerierPool.d.ts +0 -1
- package/dist/querier/abstractSqlQuerierPool.js +0 -1
- package/dist/querier/decorator/index.d.ts +0 -1
- package/dist/querier/decorator/index.js +0 -1
- package/dist/querier/decorator/injectQuerier.d.ts +0 -1
- package/dist/querier/decorator/injectQuerier.js +0 -1
- package/dist/querier/decorator/log.d.ts +0 -1
- package/dist/querier/decorator/log.js +0 -1
- package/dist/querier/decorator/serialized.d.ts +0 -1
- package/dist/querier/decorator/serialized.js +0 -1
- package/dist/querier/decorator/transactional.d.ts +0 -1
- package/dist/querier/decorator/transactional.js +0 -1
- package/dist/querier/index.d.ts +0 -1
- package/dist/querier/index.js +0 -1
- package/dist/schema/canonicalType.d.ts +14 -13
- package/dist/schema/canonicalType.js +41 -44
- package/dist/schema/index.d.ts +1 -2
- package/dist/schema/index.js +0 -1
- package/dist/schema/schemaAST.d.ts +0 -1
- package/dist/schema/schemaAST.js +0 -1
- package/dist/schema/schemaASTBuilder.d.ts +8 -2
- package/dist/schema/schemaASTBuilder.js +56 -48
- package/dist/schema/schemaASTDiffer.d.ts +0 -1
- package/dist/schema/schemaASTDiffer.js +0 -1
- package/dist/schema/types.d.ts +10 -38
- package/dist/schema/types.js +0 -1
- package/dist/sqlite/abstractSqliteQuerier.d.ts +39 -1
- package/dist/sqlite/abstractSqliteQuerier.js +44 -1
- package/dist/sqlite/bunSqliteAdapter.bun.d.ts +26 -0
- package/dist/sqlite/bunSqliteAdapter.bun.js +25 -0
- package/dist/sqlite/hranaQuerier.d.ts +54 -0
- package/dist/sqlite/hranaQuerier.js +90 -0
- package/dist/sqlite/hranaQuerierPool.d.ts +21 -0
- package/dist/sqlite/hranaQuerierPool.js +25 -0
- package/dist/sqlite/index.d.ts +2 -2
- package/dist/sqlite/index.js +2 -2
- package/dist/sqlite/sqliteDialect.d.ts +18 -5
- package/dist/sqlite/sqliteDialect.js +24 -25
- package/dist/sqlite/sqliteQuerier.d.ts +16 -10
- package/dist/sqlite/sqliteQuerier.js +4 -28
- package/dist/sqlite/sqliteQuerierPool.d.ts +14 -5
- package/dist/sqlite/sqliteQuerierPool.js +16 -6
- package/dist/turso/index.d.ts +3 -0
- package/dist/turso/index.js +3 -0
- package/dist/turso/local.d.ts +3 -0
- package/dist/turso/local.js +3 -0
- package/dist/turso/tursoDialect.d.ts +15 -0
- package/dist/turso/tursoDialect.js +18 -0
- package/dist/turso/tursoLocalQuerier.d.ts +25 -0
- package/dist/turso/tursoLocalQuerier.js +20 -0
- package/dist/turso/tursoLocalQuerierPool.d.ts +32 -0
- package/dist/turso/tursoLocalQuerierPool.js +39 -0
- package/dist/turso/tursoQuerier.d.ts +10 -0
- package/dist/turso/tursoQuerier.js +10 -0
- package/dist/turso/tursoQuerierPool.d.ts +39 -0
- package/dist/turso/tursoQuerierPool.js +38 -0
- package/dist/type/config.d.ts +0 -7
- package/dist/type/config.js +0 -1
- package/dist/type/dialect.d.ts +12 -5
- package/dist/type/dialect.js +7 -2
- package/dist/type/entity.d.ts +66 -6
- package/dist/type/entity.js +0 -1
- package/dist/type/index.d.ts +0 -1
- package/dist/type/index.js +0 -1
- package/dist/type/logger.d.ts +0 -1
- package/dist/type/logger.js +0 -1
- package/dist/type/migration.d.ts +32 -24
- package/dist/type/migration.js +0 -1
- package/dist/type/migratorDialect.d.ts +0 -1
- package/dist/type/migratorDialect.js +0 -1
- package/dist/type/namingStrategy.d.ts +0 -1
- package/dist/type/namingStrategy.js +0 -1
- package/dist/type/querier.d.ts +0 -1
- package/dist/type/querier.js +0 -1
- package/dist/type/querierPool.d.ts +0 -1
- package/dist/type/querierPool.js +0 -1
- package/dist/type/query.d.ts +0 -1
- package/dist/type/query.js +0 -1
- package/dist/type/queryAggregate.d.ts +0 -1
- package/dist/type/queryAggregate.js +0 -1
- package/dist/type/queryRaw.d.ts +0 -1
- package/dist/type/queryRaw.js +0 -1
- package/dist/type/queryWhere.d.ts +0 -1
- package/dist/type/queryWhere.js +0 -1
- package/dist/type/universalQuerier.d.ts +0 -1
- package/dist/type/universalQuerier.js +0 -1
- package/dist/type/utility.d.ts +0 -1
- package/dist/type/utility.js +0 -1
- package/dist/type/vector.d.ts +5 -3
- package/dist/type/vector.js +0 -1
- package/dist/util/dialect.util.d.ts +8 -2
- package/dist/util/dialect.util.js +16 -1
- package/dist/util/field.util.d.ts +0 -1
- package/dist/util/field.util.js +0 -1
- package/dist/util/filters.util.d.ts +0 -1
- package/dist/util/filters.util.js +0 -1
- package/dist/util/hook.util.d.ts +0 -1
- package/dist/util/hook.util.js +0 -1
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.js +1 -1
- package/dist/util/indexColumn.util.d.ts +6 -0
- package/dist/util/indexColumn.util.js +26 -0
- package/dist/util/logger.d.ts +0 -1
- package/dist/util/logger.js +0 -1
- package/dist/util/object.util.d.ts +0 -1
- package/dist/util/object.util.js +0 -1
- package/dist/util/raw.d.ts +0 -1
- package/dist/util/raw.js +0 -1
- package/dist/util/relationQuery.util.d.ts +0 -1
- package/dist/util/relationQuery.util.js +0 -1
- package/dist/util/sql.util.d.ts +0 -1
- package/dist/util/sql.util.js +0 -1
- package/dist/util/sqlLiteral.d.ts +19 -0
- package/dist/util/sqlLiteral.js +108 -0
- package/dist/util/string.util.d.ts +0 -1
- package/dist/util/string.util.js +0 -1
- package/package.json +57 -27
- package/CHANGELOG.md +0 -1359
- package/dist/browser/http/bus.d.ts.map +0 -1
- package/dist/browser/http/bus.js.map +0 -1
- package/dist/browser/http/http.d.ts.map +0 -1
- package/dist/browser/http/http.js.map +0 -1
- package/dist/browser/http/index.d.ts.map +0 -1
- package/dist/browser/http/index.js.map +0 -1
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js.map +0 -1
- package/dist/browser/options.d.ts.map +0 -1
- package/dist/browser/options.js.map +0 -1
- package/dist/browser/querier/httpQuerier.d.ts.map +0 -1
- package/dist/browser/querier/httpQuerier.js.map +0 -1
- package/dist/browser/querier/index.d.ts.map +0 -1
- package/dist/browser/querier/index.js.map +0 -1
- package/dist/browser/type/clientQuerier.d.ts.map +0 -1
- package/dist/browser/type/clientQuerier.js.map +0 -1
- package/dist/browser/type/clientQuerierPool.d.ts.map +0 -1
- package/dist/browser/type/clientQuerierPool.js.map +0 -1
- package/dist/browser/type/index.d.ts.map +0 -1
- package/dist/browser/type/index.js.map +0 -1
- package/dist/browser/type/request.d.ts.map +0 -1
- package/dist/browser/type/request.js.map +0 -1
- package/dist/bunSql/bunSql.util.d.ts.map +0 -1
- package/dist/bunSql/bunSql.util.js.map +0 -1
- package/dist/bunSql/bunSqlCockroachDialect.d.ts.map +0 -1
- package/dist/bunSql/bunSqlCockroachDialect.js.map +0 -1
- package/dist/bunSql/bunSqlPostgresDialect.d.ts.map +0 -1
- package/dist/bunSql/bunSqlPostgresDialect.js.map +0 -1
- package/dist/bunSql/bunSqlQuerier.d.ts.map +0 -1
- package/dist/bunSql/bunSqlQuerier.js.map +0 -1
- package/dist/bunSql/bunSqlQuerierPool.d.ts.map +0 -1
- package/dist/bunSql/bunSqlQuerierPool.js.map +0 -1
- package/dist/bunSql/bunSqliteDialect.d.ts.map +0 -1
- package/dist/bunSql/bunSqliteDialect.js.map +0 -1
- package/dist/bunSql/index.d.ts.map +0 -1
- package/dist/bunSql/index.js.map +0 -1
- package/dist/cockroachdb/cockroachDialect.d.ts.map +0 -1
- package/dist/cockroachdb/cockroachDialect.js.map +0 -1
- package/dist/cockroachdb/crdbQuerier.d.ts.map +0 -1
- package/dist/cockroachdb/crdbQuerier.js.map +0 -1
- package/dist/cockroachdb/crdbQuerierPool.d.ts.map +0 -1
- package/dist/cockroachdb/crdbQuerierPool.js.map +0 -1
- package/dist/cockroachdb/index.d.ts.map +0 -1
- package/dist/cockroachdb/index.js.map +0 -1
- package/dist/context/context.browser.d.ts.map +0 -1
- package/dist/context/context.browser.js.map +0 -1
- package/dist/context/context.d.ts.map +0 -1
- package/dist/context/context.js.map +0 -1
- package/dist/context/securityError.d.ts.map +0 -1
- package/dist/context/securityError.js.map +0 -1
- package/dist/d1/d1Querier.d.ts.map +0 -1
- package/dist/d1/d1Querier.js.map +0 -1
- package/dist/d1/d1QuerierPool.d.ts.map +0 -1
- package/dist/d1/d1QuerierPool.js.map +0 -1
- package/dist/d1/d1SqliteDialect.d.ts.map +0 -1
- package/dist/d1/d1SqliteDialect.js.map +0 -1
- package/dist/d1/index.d.ts.map +0 -1
- package/dist/d1/index.js.map +0 -1
- package/dist/dialect/abstractDialect.d.ts.map +0 -1
- package/dist/dialect/abstractDialect.js.map +0 -1
- package/dist/dialect/abstractSqlDialect.d.ts.map +0 -1
- package/dist/dialect/abstractSqlDialect.js.map +0 -1
- package/dist/dialect/index.d.ts.map +0 -1
- package/dist/dialect/index.js.map +0 -1
- package/dist/dialect/jsonArrayElemMatchUtils.d.ts.map +0 -1
- package/dist/dialect/jsonArrayElemMatchUtils.js.map +0 -1
- package/dist/dialect/jsonSql.d.ts.map +0 -1
- package/dist/dialect/jsonSql.js.map +0 -1
- package/dist/dialect/mysqlLikeSqlDialect.d.ts.map +0 -1
- package/dist/dialect/mysqlLikeSqlDialect.js.map +0 -1
- package/dist/dialect/pgLikeSqlDialect.d.ts.map +0 -1
- package/dist/dialect/pgLikeSqlDialect.js.map +0 -1
- package/dist/dialect/queryContext.d.ts.map +0 -1
- package/dist/dialect/queryContext.js.map +0 -1
- package/dist/dialect/vectorSqlDialect.d.ts.map +0 -1
- package/dist/dialect/vectorSqlDialect.js.map +0 -1
- package/dist/entity/decorator/entity.d.ts.map +0 -1
- package/dist/entity/decorator/entity.js.map +0 -1
- package/dist/entity/decorator/field.d.ts.map +0 -1
- package/dist/entity/decorator/field.js.map +0 -1
- package/dist/entity/decorator/filter.d.ts.map +0 -1
- package/dist/entity/decorator/filter.js.map +0 -1
- package/dist/entity/decorator/hook.d.ts.map +0 -1
- package/dist/entity/decorator/hook.js.map +0 -1
- package/dist/entity/decorator/id.d.ts.map +0 -1
- package/dist/entity/decorator/id.js.map +0 -1
- package/dist/entity/decorator/index-decorator.d.ts.map +0 -1
- package/dist/entity/decorator/index-decorator.js.map +0 -1
- package/dist/entity/decorator/index.d.ts.map +0 -1
- package/dist/entity/decorator/index.js.map +0 -1
- package/dist/entity/decorator/relation.d.ts.map +0 -1
- package/dist/entity/decorator/relation.js.map +0 -1
- package/dist/entity/index.d.ts.map +0 -1
- package/dist/entity/index.js.map +0 -1
- package/dist/entity/metadata/definition.d.ts.map +0 -1
- package/dist/entity/metadata/definition.js.map +0 -1
- package/dist/entity/test-helpers.d.ts +0 -4
- package/dist/entity/test-helpers.d.ts.map +0 -1
- package/dist/entity/test-helpers.js +0 -16
- package/dist/entity/test-helpers.js.map +0 -1
- package/dist/express/index.d.ts.map +0 -1
- package/dist/express/index.js.map +0 -1
- package/dist/express/querierMiddleware.d.ts.map +0 -1
- package/dist/express/querierMiddleware.js.map +0 -1
- package/dist/http/contract.d.ts.map +0 -1
- package/dist/http/contract.js.map +0 -1
- package/dist/http/fetchHandler.d.ts.map +0 -1
- package/dist/http/fetchHandler.js.map +0 -1
- package/dist/http/handler.d.ts.map +0 -1
- package/dist/http/handler.js.map +0 -1
- package/dist/http/index.d.ts.map +0 -1
- package/dist/http/index.js.map +0 -1
- package/dist/http/query.d.ts.map +0 -1
- package/dist/http/query.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/libsql/index.d.ts.map +0 -1
- package/dist/libsql/index.js.map +0 -1
- package/dist/libsql/libsqlDialect.d.ts.map +0 -1
- package/dist/libsql/libsqlDialect.js.map +0 -1
- package/dist/libsql/libsqlQuerier.d.ts.map +0 -1
- package/dist/libsql/libsqlQuerier.js.map +0 -1
- package/dist/libsql/libsqlQuerierPool.d.ts.map +0 -1
- package/dist/libsql/libsqlQuerierPool.js.map +0 -1
- package/dist/maria/index.d.ts.map +0 -1
- package/dist/maria/index.js.map +0 -1
- package/dist/maria/mariaDialect.d.ts.map +0 -1
- package/dist/maria/mariaDialect.js.map +0 -1
- package/dist/maria/mariadbQuerier.d.ts.map +0 -1
- package/dist/maria/mariadbQuerier.js.map +0 -1
- package/dist/maria/mariadbQuerierPool.d.ts.map +0 -1
- package/dist/maria/mariadbQuerierPool.js.map +0 -1
- package/dist/migrate/acquireQuerierForMigrations.d.ts.map +0 -1
- package/dist/migrate/acquireQuerierForMigrations.js.map +0 -1
- package/dist/migrate/assertCliConfig.d.ts.map +0 -1
- package/dist/migrate/assertCliConfig.js.map +0 -1
- package/dist/migrate/bin.d.ts.map +0 -1
- package/dist/migrate/bin.js.map +0 -1
- package/dist/migrate/builder/columnBuilder.d.ts.map +0 -1
- package/dist/migrate/builder/columnBuilder.js.map +0 -1
- package/dist/migrate/builder/expressions.d.ts.map +0 -1
- package/dist/migrate/builder/expressions.js.map +0 -1
- package/dist/migrate/builder/index.d.ts.map +0 -1
- package/dist/migrate/builder/index.js.map +0 -1
- package/dist/migrate/builder/migrationBuilder.d.ts.map +0 -1
- package/dist/migrate/builder/migrationBuilder.js.map +0 -1
- package/dist/migrate/builder/splitSqlStatements.d.ts.map +0 -1
- package/dist/migrate/builder/splitSqlStatements.js.map +0 -1
- package/dist/migrate/builder/tableBuilder.d.ts.map +0 -1
- package/dist/migrate/builder/tableBuilder.js.map +0 -1
- package/dist/migrate/builder/types.d.ts.map +0 -1
- package/dist/migrate/builder/types.js.map +0 -1
- package/dist/migrate/cli-config.d.ts.map +0 -1
- package/dist/migrate/cli-config.js.map +0 -1
- package/dist/migrate/cli.d.ts.map +0 -1
- package/dist/migrate/cli.js.map +0 -1
- package/dist/migrate/codegen/entityCodeGenerator.d.ts.map +0 -1
- package/dist/migrate/codegen/entityCodeGenerator.js.map +0 -1
- package/dist/migrate/codegen/entityMerger.d.ts +0 -115
- package/dist/migrate/codegen/entityMerger.d.ts.map +0 -1
- package/dist/migrate/codegen/entityMerger.js +0 -294
- package/dist/migrate/codegen/entityMerger.js.map +0 -1
- package/dist/migrate/codegen/index.d.ts.map +0 -1
- package/dist/migrate/codegen/index.js.map +0 -1
- package/dist/migrate/codegen/migrationCodeGenerator.d.ts +0 -62
- package/dist/migrate/codegen/migrationCodeGenerator.d.ts.map +0 -1
- package/dist/migrate/codegen/migrationCodeGenerator.js +0 -356
- package/dist/migrate/codegen/migrationCodeGenerator.js.map +0 -1
- package/dist/migrate/codegen/migrationFile.d.ts.map +0 -1
- package/dist/migrate/codegen/migrationFile.js.map +0 -1
- package/dist/migrate/codegen/smartRelationDetector.d.ts.map +0 -1
- package/dist/migrate/codegen/smartRelationDetector.js.map +0 -1
- package/dist/migrate/drift/driftDetector.d.ts.map +0 -1
- package/dist/migrate/drift/driftDetector.js.map +0 -1
- package/dist/migrate/drift/index.d.ts.map +0 -1
- package/dist/migrate/drift/index.js.map +0 -1
- package/dist/migrate/generator/index.d.ts +0 -3
- package/dist/migrate/generator/index.d.ts.map +0 -1
- package/dist/migrate/generator/index.js +0 -3
- package/dist/migrate/generator/index.js.map +0 -1
- package/dist/migrate/generator/mongoSchemaGenerator.d.ts.map +0 -1
- package/dist/migrate/generator/mongoSchemaGenerator.js.map +0 -1
- package/dist/migrate/index.d.ts.map +0 -1
- package/dist/migrate/index.js.map +0 -1
- package/dist/migrate/introspection/abstractSqlSchemaIntrospector.d.ts.map +0 -1
- package/dist/migrate/introspection/abstractSqlSchemaIntrospector.js.map +0 -1
- package/dist/migrate/introspection/baseSqlIntrospector.d.ts.map +0 -1
- package/dist/migrate/introspection/baseSqlIntrospector.js.map +0 -1
- package/dist/migrate/introspection/index.d.ts.map +0 -1
- package/dist/migrate/introspection/index.js.map +0 -1
- package/dist/migrate/introspection/mongoIntrospector.d.ts.map +0 -1
- package/dist/migrate/introspection/mongoIntrospector.js.map +0 -1
- package/dist/migrate/introspection/mysqlIntrospector.d.ts.map +0 -1
- package/dist/migrate/introspection/mysqlIntrospector.js.map +0 -1
- package/dist/migrate/introspection/postgresIntrospector.d.ts.map +0 -1
- package/dist/migrate/introspection/postgresIntrospector.js.map +0 -1
- package/dist/migrate/introspection/sqliteIntrospector.d.ts.map +0 -1
- package/dist/migrate/introspection/sqliteIntrospector.js.map +0 -1
- package/dist/migrate/migrator.d.ts.map +0 -1
- package/dist/migrate/migrator.js.map +0 -1
- package/dist/migrate/schemaGenerator.d.ts.map +0 -1
- package/dist/migrate/schemaGenerator.js.map +0 -1
- package/dist/migrate/schemaGeneratorAsync.d.ts.map +0 -1
- package/dist/migrate/schemaGeneratorAsync.js.map +0 -1
- package/dist/migrate/storage/databaseStorage.d.ts.map +0 -1
- package/dist/migrate/storage/databaseStorage.js.map +0 -1
- package/dist/migrate/storage/index.d.ts.map +0 -1
- package/dist/migrate/storage/index.js.map +0 -1
- package/dist/migrate/storage/jsonStorage.d.ts.map +0 -1
- package/dist/migrate/storage/jsonStorage.js.map +0 -1
- package/dist/migrate/sync/index.d.ts +0 -7
- package/dist/migrate/sync/index.d.ts.map +0 -1
- package/dist/migrate/sync/index.js +0 -7
- package/dist/migrate/sync/index.js.map +0 -1
- package/dist/migrate/sync/schemaSync.d.ts +0 -132
- package/dist/migrate/sync/schemaSync.d.ts.map +0 -1
- package/dist/migrate/sync/schemaSync.js +0 -260
- package/dist/migrate/sync/schemaSync.js.map +0 -1
- package/dist/mongo/index.d.ts.map +0 -1
- package/dist/mongo/index.js.map +0 -1
- package/dist/mongo/mongoDialect.d.ts.map +0 -1
- package/dist/mongo/mongoDialect.js.map +0 -1
- package/dist/mongo/mongodbNativeDialect.d.ts.map +0 -1
- package/dist/mongo/mongodbNativeDialect.js.map +0 -1
- package/dist/mongo/mongodbQuerier.d.ts.map +0 -1
- package/dist/mongo/mongodbQuerier.js.map +0 -1
- package/dist/mongo/mongodbQuerierPool.d.ts.map +0 -1
- package/dist/mongo/mongodbQuerierPool.js.map +0 -1
- package/dist/mysql/index.d.ts.map +0 -1
- package/dist/mysql/index.js.map +0 -1
- package/dist/mysql/mysql2Dialect.d.ts.map +0 -1
- package/dist/mysql/mysql2Dialect.js.map +0 -1
- package/dist/mysql/mysql2Querier.d.ts.map +0 -1
- package/dist/mysql/mysql2Querier.js.map +0 -1
- package/dist/mysql/mysql2QuerierPool.d.ts.map +0 -1
- package/dist/mysql/mysql2QuerierPool.js.map +0 -1
- package/dist/mysql/mysqlDialect.d.ts.map +0 -1
- package/dist/mysql/mysqlDialect.js.map +0 -1
- package/dist/namingStrategy/defaultNamingStrategy.d.ts.map +0 -1
- package/dist/namingStrategy/defaultNamingStrategy.js.map +0 -1
- package/dist/namingStrategy/index.d.ts.map +0 -1
- package/dist/namingStrategy/index.js.map +0 -1
- package/dist/namingStrategy/snakeCaseNamingStrategy.d.ts.map +0 -1
- package/dist/namingStrategy/snakeCaseNamingStrategy.js.map +0 -1
- package/dist/neon/index.d.ts.map +0 -1
- package/dist/neon/index.js.map +0 -1
- package/dist/neon/neonDialect.d.ts.map +0 -1
- package/dist/neon/neonDialect.js.map +0 -1
- package/dist/neon/neonQuerier.d.ts.map +0 -1
- package/dist/neon/neonQuerier.js.map +0 -1
- package/dist/neon/neonQuerierPool.d.ts.map +0 -1
- package/dist/neon/neonQuerierPool.js.map +0 -1
- package/dist/nestjs/index.d.ts.map +0 -1
- package/dist/nestjs/index.js.map +0 -1
- package/dist/nestjs/uqlContextInterceptor.d.ts.map +0 -1
- package/dist/nestjs/uqlContextInterceptor.js.map +0 -1
- package/dist/nestjs/uqlModule.d.ts.map +0 -1
- package/dist/nestjs/uqlModule.js.map +0 -1
- package/dist/options.d.ts.map +0 -1
- package/dist/options.js.map +0 -1
- package/dist/postgres/abstractPgQuerier.d.ts.map +0 -1
- package/dist/postgres/abstractPgQuerier.js.map +0 -1
- package/dist/postgres/abstractPgQuerierPool.d.ts.map +0 -1
- package/dist/postgres/abstractPgQuerierPool.js.map +0 -1
- package/dist/postgres/index.d.ts.map +0 -1
- package/dist/postgres/index.js.map +0 -1
- package/dist/postgres/pgDialect.d.ts.map +0 -1
- package/dist/postgres/pgDialect.js.map +0 -1
- package/dist/postgres/pgQuerier.d.ts.map +0 -1
- package/dist/postgres/pgQuerier.js.map +0 -1
- package/dist/postgres/pgQuerierPool.d.ts.map +0 -1
- package/dist/postgres/pgQuerierPool.js.map +0 -1
- package/dist/postgres/postgresDialect.d.ts.map +0 -1
- package/dist/postgres/postgresDialect.js.map +0 -1
- package/dist/postgres/postgresWireDriverCapabilities.d.ts.map +0 -1
- package/dist/postgres/postgresWireDriverCapabilities.js.map +0 -1
- package/dist/querier/abstractPoolQuerier.d.ts.map +0 -1
- package/dist/querier/abstractPoolQuerier.js.map +0 -1
- package/dist/querier/abstractQuerier.d.ts.map +0 -1
- package/dist/querier/abstractQuerier.js.map +0 -1
- package/dist/querier/abstractQuerierPool.d.ts.map +0 -1
- package/dist/querier/abstractQuerierPool.js.map +0 -1
- package/dist/querier/abstractSqlQuerier.d.ts.map +0 -1
- package/dist/querier/abstractSqlQuerier.js.map +0 -1
- package/dist/querier/abstractSqlQuerierPool.d.ts.map +0 -1
- package/dist/querier/abstractSqlQuerierPool.js.map +0 -1
- package/dist/querier/decorator/index.d.ts.map +0 -1
- package/dist/querier/decorator/index.js.map +0 -1
- package/dist/querier/decorator/injectQuerier.d.ts.map +0 -1
- package/dist/querier/decorator/injectQuerier.js.map +0 -1
- package/dist/querier/decorator/log.d.ts.map +0 -1
- package/dist/querier/decorator/log.js.map +0 -1
- package/dist/querier/decorator/serialized.d.ts.map +0 -1
- package/dist/querier/decorator/serialized.js.map +0 -1
- package/dist/querier/decorator/transactional.d.ts.map +0 -1
- package/dist/querier/decorator/transactional.js.map +0 -1
- package/dist/querier/index.d.ts.map +0 -1
- package/dist/querier/index.js.map +0 -1
- package/dist/schema/canonicalType.d.ts.map +0 -1
- package/dist/schema/canonicalType.js.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/index.js.map +0 -1
- package/dist/schema/schemaAST.d.ts.map +0 -1
- package/dist/schema/schemaAST.js.map +0 -1
- package/dist/schema/schemaASTBuilder.d.ts.map +0 -1
- package/dist/schema/schemaASTBuilder.js.map +0 -1
- package/dist/schema/schemaASTDiffer.d.ts.map +0 -1
- package/dist/schema/schemaASTDiffer.js.map +0 -1
- package/dist/schema/types.d.ts.map +0 -1
- package/dist/schema/types.js.map +0 -1
- package/dist/sqlite/abstractSqliteQuerier.d.ts.map +0 -1
- package/dist/sqlite/abstractSqliteQuerier.js.map +0 -1
- package/dist/sqlite/betterSqlite3Dialect.d.ts +0 -10
- package/dist/sqlite/betterSqlite3Dialect.d.ts.map +0 -1
- package/dist/sqlite/betterSqlite3Dialect.js +0 -10
- package/dist/sqlite/betterSqlite3Dialect.js.map +0 -1
- package/dist/sqlite/index.d.ts.map +0 -1
- package/dist/sqlite/index.js.map +0 -1
- package/dist/sqlite/sqliteDialect.d.ts.map +0 -1
- package/dist/sqlite/sqliteDialect.js.map +0 -1
- package/dist/sqlite/sqliteQuerier.d.ts.map +0 -1
- package/dist/sqlite/sqliteQuerier.js.map +0 -1
- package/dist/sqlite/sqliteQuerierPool.d.ts.map +0 -1
- package/dist/sqlite/sqliteQuerierPool.js.map +0 -1
- package/dist/type/config.d.ts.map +0 -1
- package/dist/type/config.js.map +0 -1
- package/dist/type/dialect.d.ts.map +0 -1
- package/dist/type/dialect.js.map +0 -1
- package/dist/type/entity.d.ts.map +0 -1
- package/dist/type/entity.js.map +0 -1
- package/dist/type/index.d.ts.map +0 -1
- package/dist/type/index.js.map +0 -1
- package/dist/type/logger.d.ts.map +0 -1
- package/dist/type/logger.js.map +0 -1
- package/dist/type/migration.d.ts.map +0 -1
- package/dist/type/migration.js.map +0 -1
- package/dist/type/migratorDialect.d.ts.map +0 -1
- package/dist/type/migratorDialect.js.map +0 -1
- package/dist/type/namingStrategy.d.ts.map +0 -1
- package/dist/type/namingStrategy.js.map +0 -1
- package/dist/type/querier.d.ts.map +0 -1
- package/dist/type/querier.js.map +0 -1
- package/dist/type/querierPool.d.ts.map +0 -1
- package/dist/type/querierPool.js.map +0 -1
- package/dist/type/query.d.ts.map +0 -1
- package/dist/type/query.js.map +0 -1
- package/dist/type/queryAggregate.d.ts.map +0 -1
- package/dist/type/queryAggregate.js.map +0 -1
- package/dist/type/queryRaw.d.ts.map +0 -1
- package/dist/type/queryRaw.js.map +0 -1
- package/dist/type/queryWhere.d.ts.map +0 -1
- package/dist/type/queryWhere.js.map +0 -1
- package/dist/type/universalQuerier.d.ts.map +0 -1
- package/dist/type/universalQuerier.js.map +0 -1
- package/dist/type/utility.d.ts.map +0 -1
- package/dist/type/utility.js.map +0 -1
- package/dist/type/vector.d.ts.map +0 -1
- package/dist/type/vector.js.map +0 -1
- package/dist/util/ansiSqlLiteral.d.ts +0 -23
- package/dist/util/ansiSqlLiteral.d.ts.map +0 -1
- package/dist/util/ansiSqlLiteral.js +0 -105
- package/dist/util/ansiSqlLiteral.js.map +0 -1
- package/dist/util/dialect.util.d.ts.map +0 -1
- package/dist/util/dialect.util.js.map +0 -1
- package/dist/util/field.util.d.ts.map +0 -1
- package/dist/util/field.util.js.map +0 -1
- package/dist/util/filters.util.d.ts.map +0 -1
- package/dist/util/filters.util.js.map +0 -1
- package/dist/util/hook.util.d.ts.map +0 -1
- package/dist/util/hook.util.js.map +0 -1
- package/dist/util/index.d.ts.map +0 -1
- package/dist/util/index.js.map +0 -1
- package/dist/util/logger.d.ts.map +0 -1
- package/dist/util/logger.js.map +0 -1
- package/dist/util/object.util.d.ts.map +0 -1
- package/dist/util/object.util.js.map +0 -1
- package/dist/util/raw.d.ts.map +0 -1
- package/dist/util/raw.js.map +0 -1
- package/dist/util/relationQuery.util.d.ts.map +0 -1
- package/dist/util/relationQuery.util.js.map +0 -1
- package/dist/util/sql.util.d.ts.map +0 -1
- package/dist/util/sql.util.js.map +0 -1
- package/dist/util/string.util.d.ts.map +0 -1
- package/dist/util/string.util.js.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PreparedSqliteQuerier } from '../sqlite/abstractSqliteQuerier.js';
|
|
2
|
+
/**
|
|
3
|
+
* Querier for the embedded Turso engine.
|
|
4
|
+
*
|
|
5
|
+
* @remarks The engine exposes better-sqlite3 semantics (`reader`, `{changes, lastInsertRowid}`,
|
|
6
|
+
* array-bound values) over an async API, so all it supplies is the awaited `prepare`.
|
|
7
|
+
* `BEGIN`/`COMMIT` work as plain statements, leaving transactions to the base class.
|
|
8
|
+
*/
|
|
9
|
+
export class TursoLocalQuerier extends PreparedSqliteQuerier {
|
|
10
|
+
db;
|
|
11
|
+
extra;
|
|
12
|
+
constructor(db, dialect, extra) {
|
|
13
|
+
super(dialect, extra);
|
|
14
|
+
this.db = db;
|
|
15
|
+
this.extra = extra;
|
|
16
|
+
}
|
|
17
|
+
prepare(query) {
|
|
18
|
+
return this.db.prepare(query);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AbstractSqlQuerierPool } from '../querier/index.js';
|
|
2
|
+
import type { ExtraOptions } from '../type/index.js';
|
|
3
|
+
import { TursoDialect } from './tursoDialect.js';
|
|
4
|
+
import { TursoLocalQuerier } from './tursoLocalQuerier.js';
|
|
5
|
+
/** Subset of `DatabaseOpts` from `@tursodatabase/database`, declared locally to avoid the coupling. */
|
|
6
|
+
export type TursoLocalOptions = {
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
fileMustExist?: boolean;
|
|
9
|
+
timeout?: number;
|
|
10
|
+
defaultQueryTimeout?: number;
|
|
11
|
+
tracing?: 'info' | 'debug' | 'trace';
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Pool for the embedded Turso engine (`@tursodatabase/database`), the Rust rewrite of SQLite.
|
|
15
|
+
*
|
|
16
|
+
* @remarks Kept on the `uql-orm/turso/local` entry point rather than `uql-orm/turso`, because this
|
|
17
|
+
* package ships native binaries that do not resolve on edge runtimes. Separating them guarantees a
|
|
18
|
+
* bundle targeting Workers never reaches the native import.
|
|
19
|
+
*/
|
|
20
|
+
export declare class TursoLocalQuerierPool extends AbstractSqlQuerierPool<TursoLocalQuerier, TursoDialect> {
|
|
21
|
+
readonly filename: string;
|
|
22
|
+
readonly opts?: TursoLocalOptions | undefined;
|
|
23
|
+
private db?;
|
|
24
|
+
constructor(filename?: string, opts?: TursoLocalOptions | undefined, extra?: ExtraOptions);
|
|
25
|
+
/**
|
|
26
|
+
* The database handle is shared (single connection), but each acquisition gets its own querier
|
|
27
|
+
* so transaction state stays per unit of work.
|
|
28
|
+
*/
|
|
29
|
+
getQuerier(): Promise<TursoLocalQuerier>;
|
|
30
|
+
private openDb;
|
|
31
|
+
end(): Promise<void>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AbstractSqlQuerierPool } from '../querier/index.js';
|
|
2
|
+
import { TursoDialect } from './tursoDialect.js';
|
|
3
|
+
import { TursoLocalQuerier } from './tursoLocalQuerier.js';
|
|
4
|
+
/**
|
|
5
|
+
* Pool for the embedded Turso engine (`@tursodatabase/database`), the Rust rewrite of SQLite.
|
|
6
|
+
*
|
|
7
|
+
* @remarks Kept on the `uql-orm/turso/local` entry point rather than `uql-orm/turso`, because this
|
|
8
|
+
* package ships native binaries that do not resolve on edge runtimes. Separating them guarantees a
|
|
9
|
+
* bundle targeting Workers never reaches the native import.
|
|
10
|
+
*/
|
|
11
|
+
export class TursoLocalQuerierPool extends AbstractSqlQuerierPool {
|
|
12
|
+
filename;
|
|
13
|
+
opts;
|
|
14
|
+
db;
|
|
15
|
+
constructor(filename = ':memory:', opts, extra) {
|
|
16
|
+
super(new TursoDialect({ namingStrategy: extra?.namingStrategy }), extra);
|
|
17
|
+
this.filename = filename;
|
|
18
|
+
this.opts = opts;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The database handle is shared (single connection), but each acquisition gets its own querier
|
|
22
|
+
* so transaction state stays per unit of work.
|
|
23
|
+
*/
|
|
24
|
+
async getQuerier() {
|
|
25
|
+
this.db ??= await this.openDb();
|
|
26
|
+
return new TursoLocalQuerier(this.db, this.dialect, this.extra);
|
|
27
|
+
}
|
|
28
|
+
async openDb() {
|
|
29
|
+
const { connect } = await import('@tursodatabase/database');
|
|
30
|
+
// Annotated rather than cast, so the structural contract is checked against the real driver.
|
|
31
|
+
const db = await connect(this.filename, this.opts);
|
|
32
|
+
await db.pragma('journal_mode = WAL');
|
|
33
|
+
return db;
|
|
34
|
+
}
|
|
35
|
+
async end() {
|
|
36
|
+
await this.db?.close();
|
|
37
|
+
this.db = undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HranaQuerier } from '../sqlite/hranaQuerier.js';
|
|
2
|
+
/**
|
|
3
|
+
* Querier for remote Turso Cloud databases over `@tursodatabase/serverless/compat`.
|
|
4
|
+
*
|
|
5
|
+
* @remarks Empty subclass by design: that compat client speaks the Hrana protocol, so the whole
|
|
6
|
+
* implementation is inherited. Kept as a distinct type so `TursoQuerierPool` does not expose a
|
|
7
|
+
* libsql-named class.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TursoQuerier extends HranaQuerier {
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HranaQuerier } from '../sqlite/hranaQuerier.js';
|
|
2
|
+
/**
|
|
3
|
+
* Querier for remote Turso Cloud databases over `@tursodatabase/serverless/compat`.
|
|
4
|
+
*
|
|
5
|
+
* @remarks Empty subclass by design: that compat client speaks the Hrana protocol, so the whole
|
|
6
|
+
* implementation is inherited. Kept as a distinct type so `TursoQuerierPool` does not expose a
|
|
7
|
+
* libsql-named class.
|
|
8
|
+
*/
|
|
9
|
+
export class TursoQuerier extends HranaQuerier {
|
|
10
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { HranaClient } from '../sqlite/hranaQuerier.js';
|
|
2
|
+
import { AbstractHranaQuerierPool } from '../sqlite/hranaQuerierPool.js';
|
|
3
|
+
import type { ExtraOptions } from '../type/index.js';
|
|
4
|
+
import { TursoDialect } from './tursoDialect.js';
|
|
5
|
+
import { TursoQuerier } from './tursoQuerier.js';
|
|
6
|
+
/**
|
|
7
|
+
* Connection settings for Turso Cloud, mirroring `@tursodatabase/serverless`.
|
|
8
|
+
*
|
|
9
|
+
* @remarks Declared here rather than imported so this package does not couple its published types
|
|
10
|
+
* to a pre-1.0 dependency.
|
|
11
|
+
*/
|
|
12
|
+
export type TursoConfig = {
|
|
13
|
+
/** `libsql://<db>.turso.io` or `https://<db>.turso.io`. */
|
|
14
|
+
url: string;
|
|
15
|
+
authToken?: string;
|
|
16
|
+
remoteEncryptionKey?: string;
|
|
17
|
+
/** Extra HTTP headers attached to every request, e.g. for routing through a gateway. */
|
|
18
|
+
requestHeaders?: Record<string, string>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Pool for remote Turso Cloud databases, driven by `@tursodatabase/serverless/compat`.
|
|
22
|
+
*
|
|
23
|
+
* @remarks The compat entry point is required rather than the native one: the native
|
|
24
|
+
* `conn.transaction()` takes a callback, which cannot satisfy the explicit
|
|
25
|
+
* `beginTransaction`/`commitTransaction` contract, and issuing a bare `BEGIN` is not an option
|
|
26
|
+
* because over plain HTTP consecutive requests need not share a connection. Compat's session-backed
|
|
27
|
+
* transaction handle is the piece that makes it work.
|
|
28
|
+
*/
|
|
29
|
+
export declare class TursoQuerierPool extends AbstractHranaQuerierPool<TursoQuerier, TursoDialect> {
|
|
30
|
+
protected readonly ownsClient: boolean;
|
|
31
|
+
private readonly conf;
|
|
32
|
+
/**
|
|
33
|
+
* Accepts either connection settings or an already-built client. The latter covers any driver
|
|
34
|
+
* with the same shape: `@libsql/client/web`, `@libsql/client-wasm`, or a test double.
|
|
35
|
+
*/
|
|
36
|
+
constructor(conf: TursoConfig | HranaClient, extra?: ExtraOptions);
|
|
37
|
+
protected openClient(): Promise<HranaClient>;
|
|
38
|
+
protected buildQuerier(client: HranaClient): TursoQuerier;
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AbstractHranaQuerierPool } from '../sqlite/hranaQuerierPool.js';
|
|
2
|
+
import { TursoDialect } from './tursoDialect.js';
|
|
3
|
+
import { TursoQuerier } from './tursoQuerier.js';
|
|
4
|
+
function isClient(conf) {
|
|
5
|
+
return typeof conf.execute === 'function';
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Pool for remote Turso Cloud databases, driven by `@tursodatabase/serverless/compat`.
|
|
9
|
+
*
|
|
10
|
+
* @remarks The compat entry point is required rather than the native one: the native
|
|
11
|
+
* `conn.transaction()` takes a callback, which cannot satisfy the explicit
|
|
12
|
+
* `beginTransaction`/`commitTransaction` contract, and issuing a bare `BEGIN` is not an option
|
|
13
|
+
* because over plain HTTP consecutive requests need not share a connection. Compat's session-backed
|
|
14
|
+
* transaction handle is the piece that makes it work.
|
|
15
|
+
*/
|
|
16
|
+
export class TursoQuerierPool extends AbstractHranaQuerierPool {
|
|
17
|
+
ownsClient;
|
|
18
|
+
conf;
|
|
19
|
+
/**
|
|
20
|
+
* Accepts either connection settings or an already-built client. The latter covers any driver
|
|
21
|
+
* with the same shape: `@libsql/client/web`, `@libsql/client-wasm`, or a test double.
|
|
22
|
+
*/
|
|
23
|
+
constructor(conf, extra) {
|
|
24
|
+
super(new TursoDialect({ namingStrategy: extra?.namingStrategy }), extra);
|
|
25
|
+
this.conf = conf;
|
|
26
|
+
this.ownsClient = !isClient(conf);
|
|
27
|
+
}
|
|
28
|
+
async openClient() {
|
|
29
|
+
if (isClient(this.conf)) {
|
|
30
|
+
return this.conf;
|
|
31
|
+
}
|
|
32
|
+
const { createClient } = await import('@tursodatabase/serverless/compat');
|
|
33
|
+
return createClient(this.conf);
|
|
34
|
+
}
|
|
35
|
+
buildQuerier(client) {
|
|
36
|
+
return new TursoQuerier(client, this.dialect, this.extra);
|
|
37
|
+
}
|
|
38
|
+
}
|
package/dist/type/config.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { AbstractDialect } from '../dialect/abstractDialect.js';
|
|
2
2
|
import type { ForeignKeyAction } from '../schema/types.js';
|
|
3
|
-
import type { NamingStrategy } from './namingStrategy.js';
|
|
4
3
|
import type { Querier } from './querier.js';
|
|
5
4
|
import type { QuerierPool } from './querierPool.js';
|
|
6
5
|
import type { Type } from './utility.js';
|
|
@@ -29,15 +28,9 @@ export interface Config {
|
|
|
29
28
|
* @default 'uql_migrations'
|
|
30
29
|
*/
|
|
31
30
|
tableName?: string;
|
|
32
|
-
/**
|
|
33
|
-
* The naming strategy for mapping class/property names to database table/column names.
|
|
34
|
-
* @default DefaultNamingStrategy (camelCase -> camelCase)
|
|
35
|
-
*/
|
|
36
|
-
namingStrategy?: NamingStrategy;
|
|
37
31
|
/**
|
|
38
32
|
* Default action for foreign key ON DELETE and ON UPDATE clauses.
|
|
39
33
|
* @default 'NO ACTION'
|
|
40
34
|
*/
|
|
41
35
|
defaultForeignKeyAction?: ForeignKeyAction;
|
|
42
36
|
}
|
|
43
|
-
//# sourceMappingURL=config.d.ts.map
|
package/dist/type/config.js
CHANGED
package/dist/type/dialect.d.ts
CHANGED
|
@@ -74,11 +74,11 @@ export interface EngineFeatures {
|
|
|
74
74
|
/** Whether the dialect supports inline COMMENT on columns (MySQL/MariaDB). */
|
|
75
75
|
readonly columnComment: boolean;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
78
|
-
* `CREATE INDEX
|
|
79
|
-
* `
|
|
77
|
+
* Whether a vector index is declared inline in `CREATE TABLE` (MySQL/MariaDB) rather than as its own
|
|
78
|
+
* `CREATE INDEX` statement. The statement's shape itself is the dialect's business, see
|
|
79
|
+
* `AbstractSqlDialect.getCreateIndexStatement`.
|
|
80
80
|
*/
|
|
81
|
-
readonly
|
|
81
|
+
readonly inlineVectorIndex: boolean;
|
|
82
82
|
/** Whether the dialect requires/allows (n) length constraints on vector types. */
|
|
83
83
|
readonly vectorSupportsLength: boolean;
|
|
84
84
|
/** Whether the dialect natively supports the TIMESTAMPTZ alias/type. */
|
|
@@ -196,4 +196,11 @@ export interface SqlQueryDialect extends QueryDialect {
|
|
|
196
196
|
*/
|
|
197
197
|
placeholder(index: number): string;
|
|
198
198
|
}
|
|
199
|
-
|
|
199
|
+
/**
|
|
200
|
+
* An index capability that some engines have and others reject outright. Verified live: expression
|
|
201
|
+
* indexes exist everywhere but MariaDB 12.3 (which needs a generated column); prefix lengths are
|
|
202
|
+
* MySQL-family only and *required* there to index `TEXT`; `NULLS FIRST/LAST` and operator classes are
|
|
203
|
+
* Postgres-only (CockroachDB 26.2 answers "unimplemented"); `INCLUDE` is Postgres-wire only.
|
|
204
|
+
*/
|
|
205
|
+
export type IndexFeature = 'expression' | 'prefixLength' | 'nullsOrder' | 'opsClass' | 'include';
|
|
206
|
+
export declare const INDEX_FEATURE_LABELS: Record<IndexFeature, string>;
|
package/dist/type/dialect.js
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
1
|
+
export const INDEX_FEATURE_LABELS = {
|
|
2
|
+
expression: 'expression indexes',
|
|
3
|
+
prefixLength: 'index prefix lengths',
|
|
4
|
+
nullsOrder: 'NULLS FIRST/LAST in an index',
|
|
5
|
+
opsClass: 'index operator classes',
|
|
6
|
+
include: 'covering indexes (INCLUDE)',
|
|
7
|
+
};
|
package/dist/type/entity.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IndexType } from '../schema/types.js';
|
|
2
2
|
import type { FilterOptions } from './query.js';
|
|
3
3
|
import type { QueryRaw } from './queryRaw.js';
|
|
4
|
-
import type { Json, Scalar, Type, Unpacked } from './utility.js';
|
|
4
|
+
import type { DistributiveOmit, Json, Scalar, Type, Unpacked } from './utility.js';
|
|
5
5
|
import type { VectorDistance, VectorIndexOptions, VectorIndexType } from './vector.js';
|
|
6
6
|
/**
|
|
7
7
|
* Allow to customize the name of the property that identifies an entity
|
|
@@ -344,17 +344,66 @@ export type IndexTypeOptions = {
|
|
|
344
344
|
distance?: never;
|
|
345
345
|
};
|
|
346
346
|
/**
|
|
347
|
-
*
|
|
347
|
+
* One entry of an index: a column name by default, `raw(...)` to index an expression, or an object
|
|
348
|
+
* when the entry needs more than a name.
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* ```ts
|
|
352
|
+
* @Index(['tenantId', { column: 'createdAt', order: 'desc' }]) // keyset pagination
|
|
353
|
+
* @Index([raw('lower("email")')], { unique: true }) // case-insensitive uniqueness
|
|
354
|
+
* @Index([{ column: 'body', length: 64 }]) // MySQL needs a prefix on TEXT
|
|
355
|
+
* @Index(['data'], { type: 'gin' }) // JSONB containment
|
|
356
|
+
* ```
|
|
357
|
+
*/
|
|
358
|
+
export type IndexColumnInput = string | QueryRaw | IndexColumnOptions;
|
|
359
|
+
/**
|
|
360
|
+
* What an index entry can carry besides the thing being indexed. Shared with the normalized
|
|
361
|
+
* `IndexColumnSchema`, so the authored and internal shapes cannot drift apart.
|
|
362
|
+
*/
|
|
363
|
+
export type IndexColumnModifiers = {
|
|
364
|
+
/**
|
|
365
|
+
* Index only the first `n` characters. MySQL and MariaDB *require* this to index a `TEXT`/`BLOB`
|
|
366
|
+
* column at all ("used in key specification without a key length"); no other engine accepts it.
|
|
367
|
+
*/
|
|
368
|
+
readonly length?: number;
|
|
369
|
+
/** Stored sort order, which lets `ORDER BY ... DESC` pagination use the index. */
|
|
370
|
+
readonly order?: 'asc' | 'desc';
|
|
371
|
+
/** Where NULLs sort. Postgres only. */
|
|
372
|
+
readonly nulls?: 'first' | 'last';
|
|
373
|
+
/** Operator class, e.g. `jsonb_path_ops` for a smaller GIN index. Postgres only. */
|
|
374
|
+
readonly opsClass?: string;
|
|
375
|
+
};
|
|
376
|
+
export type IndexColumnOptions = IndexColumnModifiers & {
|
|
377
|
+
/** The column to index, or `raw(...)` for an expression. */
|
|
378
|
+
readonly column: string | QueryRaw;
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* One index entry, normalized: {@link IndexColumnInput}'s three authored shapes all reduce to this
|
|
382
|
+
* before any dialect or generator sees them, so rendering never re-parses the sugar.
|
|
383
|
+
*/
|
|
384
|
+
export type IndexColumnSchema = IndexColumnModifiers & {
|
|
385
|
+
/** A column name, or raw SQL when {@link expression} is set. */
|
|
386
|
+
readonly column: string;
|
|
387
|
+
/** Whether {@link column} is an expression to emit as-is rather than an identifier to quote. */
|
|
388
|
+
readonly expression?: boolean;
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* An index as stored in entity metadata: authored options with the columns normalized.
|
|
348
392
|
*/
|
|
349
393
|
export type EntityIndexMeta = {
|
|
350
|
-
/**
|
|
351
|
-
columns:
|
|
394
|
+
/** The indexed columns, in order. */
|
|
395
|
+
columns: readonly IndexColumnSchema[];
|
|
352
396
|
/** Custom index name */
|
|
353
397
|
name?: string;
|
|
354
398
|
/** Whether index is unique; omit or `false` for a non-unique index (default). */
|
|
355
399
|
unique?: boolean;
|
|
356
400
|
/** Partial index condition (WHERE clause) */
|
|
357
401
|
where?: string;
|
|
402
|
+
/**
|
|
403
|
+
* Extra columns stored in the index but not part of its key, so a query reading only these is
|
|
404
|
+
* answered from the index alone. Postgres-wire only (`INCLUDE`).
|
|
405
|
+
*/
|
|
406
|
+
include?: readonly string[];
|
|
358
407
|
} & VectorIndexOptions & IndexTypeOptions;
|
|
359
408
|
export type EntityMeta<E> = {
|
|
360
409
|
readonly entity: Type<E>;
|
|
@@ -392,9 +441,20 @@ export type EntityOptions<E = unknown> = {
|
|
|
392
441
|
/** Scalar fields; use `isId: true` on exactly one field for the primary key. */
|
|
393
442
|
readonly fields?: Record<string, FieldOptions>;
|
|
394
443
|
readonly relations?: Record<string, RelationOptions>;
|
|
395
|
-
readonly indexes?: readonly
|
|
444
|
+
readonly indexes?: readonly EntityIndexInput[];
|
|
396
445
|
/** Map hook events to method names on the entity class. */
|
|
397
446
|
readonly hooks?: Partial<Record<HookEvent, readonly string[]>>;
|
|
398
447
|
};
|
|
448
|
+
/**
|
|
449
|
+
* Everything an index carries beyond its columns, shared by `@Index`, `defineEntity` and the
|
|
450
|
+
* migration builder's `table.index(...)`. `DistributiveOmit` (not plain `Omit`) keeps `type`/
|
|
451
|
+
* `distance` a discriminated pair: omitting `distance` on a vector index type is a compile error.
|
|
452
|
+
*/
|
|
453
|
+
export type IndexOptions = DistributiveOmit<EntityIndexMeta, 'columns'>;
|
|
454
|
+
/**
|
|
455
|
+
* An index as authored, before {@link appendEntityIndex} normalizes its columns.
|
|
456
|
+
*/
|
|
457
|
+
export type EntityIndexInput = IndexOptions & {
|
|
458
|
+
readonly columns: readonly IndexColumnInput[];
|
|
459
|
+
};
|
|
399
460
|
export {};
|
|
400
|
-
//# sourceMappingURL=entity.d.ts.map
|
package/dist/type/entity.js
CHANGED
package/dist/type/index.d.ts
CHANGED
package/dist/type/index.js
CHANGED
package/dist/type/logger.d.ts
CHANGED
|
@@ -58,4 +58,3 @@ export type LoggerFunction = (message: unknown, ...args: unknown[]) => void;
|
|
|
58
58
|
* - LoggerFunction: use a custom function (backward compatibility).
|
|
59
59
|
*/
|
|
60
60
|
export type LoggingOptions = boolean | LogLevel[] | Logger | LoggerFunction;
|
|
61
|
-
//# sourceMappingURL=logger.d.ts.map
|
package/dist/type/logger.js
CHANGED
package/dist/type/migration.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { VectorCast } from '../dialect/vectorCast.js';
|
|
1
2
|
import type { FullColumnDefinition, TableDefinition, TableForeignKeyDefinition } from '../migrate/builder/types.js';
|
|
2
3
|
import type { SchemaAST } from '../schema/schemaAST.js';
|
|
3
4
|
import type { ForeignKeyAction, IndexNode, IndexType, TableNode } from '../schema/types.js';
|
|
4
|
-
import type { EntityMeta, FieldOptions,
|
|
5
|
+
import type { EntityMeta, FieldOptions, IndexColumnSchema, LoggingOptions, SqlQuerier, Type, VectorIndexOptions } from './index.js';
|
|
5
6
|
/**
|
|
6
7
|
* Defines a migration using a simple object literal
|
|
7
8
|
*/
|
|
@@ -72,10 +73,6 @@ export interface MigratorOptions {
|
|
|
72
73
|
* Entities to use for schema generation
|
|
73
74
|
*/
|
|
74
75
|
readonly entities?: Type<unknown>[];
|
|
75
|
-
/**
|
|
76
|
-
* Naming strategy for database tables and columns
|
|
77
|
-
*/
|
|
78
|
-
readonly namingStrategy?: NamingStrategy;
|
|
79
76
|
/**
|
|
80
77
|
* Default action for foreign key ON DELETE and ON UPDATE clauses.
|
|
81
78
|
*/
|
|
@@ -101,6 +98,13 @@ export interface MigrationResult {
|
|
|
101
98
|
*/
|
|
102
99
|
export interface ColumnSchema {
|
|
103
100
|
readonly name: string;
|
|
101
|
+
/**
|
|
102
|
+
* The engine's own type spelling, as introspection read it (`tinyint(1)`, `DATETIME`, `VARCHAR`).
|
|
103
|
+
* Deliberately not a {@link CanonicalType}: the diff has to compare what the engine would *store*,
|
|
104
|
+
* and several canonical types share one storage type per engine - an entity `boolean` is `TINYINT(1)`
|
|
105
|
+
* on MySQL and `INTEGER` on SQLite. Comparing canonical categories instead reports an alteration on
|
|
106
|
+
* every sync for those columns. Use `sqlToCanonical` to interpret it.
|
|
107
|
+
*/
|
|
104
108
|
readonly type: string;
|
|
105
109
|
readonly nullable: boolean;
|
|
106
110
|
readonly defaultValue?: unknown;
|
|
@@ -127,10 +131,20 @@ export interface TableSchema {
|
|
|
127
131
|
*/
|
|
128
132
|
export interface IndexSchema extends VectorIndexOptions {
|
|
129
133
|
readonly name: string;
|
|
130
|
-
readonly columns:
|
|
134
|
+
readonly columns: readonly IndexColumnSchema[];
|
|
131
135
|
readonly unique: boolean;
|
|
132
136
|
/** Index type (btree, hnsw, ivfflat, etc.) */
|
|
133
137
|
readonly type?: IndexType;
|
|
138
|
+
/** Partial index condition (WHERE clause) */
|
|
139
|
+
readonly where?: string;
|
|
140
|
+
/** Non-key columns stored in the index (Postgres-wire `INCLUDE`). */
|
|
141
|
+
readonly include?: readonly string[];
|
|
142
|
+
/**
|
|
143
|
+
* The indexed column's vector type, which pgvector's operator-class names are built from
|
|
144
|
+
* (`halfvec_cosine_ops`). Absent for a non-vector index, and for an index whose column types are
|
|
145
|
+
* unknown, where `vector` is assumed.
|
|
146
|
+
*/
|
|
147
|
+
readonly vectorType?: VectorCast;
|
|
134
148
|
}
|
|
135
149
|
/**
|
|
136
150
|
* Represents a foreign key constraint
|
|
@@ -171,10 +185,11 @@ export interface SchemaGenerator {
|
|
|
171
185
|
generateCreateTable<E>(entity: Type<E>, options?: {
|
|
172
186
|
ifNotExists?: boolean;
|
|
173
187
|
}): string[];
|
|
174
|
-
/**
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
188
|
+
/** Generate DROP TABLE statement. */
|
|
189
|
+
generateDropTable(tableName: string, options?: {
|
|
190
|
+
ifExists?: boolean;
|
|
191
|
+
cascade?: boolean;
|
|
192
|
+
}): string;
|
|
178
193
|
/**
|
|
179
194
|
* Generate ALTER TABLE statements based on schema diff
|
|
180
195
|
*/
|
|
@@ -215,21 +230,19 @@ export interface SchemaGenerator {
|
|
|
215
230
|
generateCreateIndexFromNode(index: IndexNode, options?: {
|
|
216
231
|
ifNotExists?: boolean;
|
|
217
232
|
}): string;
|
|
218
|
-
/** Generate DROP TABLE statement from a TableNode */
|
|
219
|
-
generateDropTableFromNode(table: TableNode, options?: {
|
|
220
|
-
ifExists?: boolean;
|
|
221
|
-
}): string;
|
|
222
233
|
/** DDL from a `TableDefinition`, one string per `querier.run`. */
|
|
223
234
|
generateCreateTableFromDefinition(table: TableDefinition, options?: {
|
|
224
235
|
ifNotExists?: boolean;
|
|
225
236
|
}): string[];
|
|
226
|
-
/** Generate DROP TABLE statement */
|
|
227
|
-
generateDropTableSql(tableName: string, options?: {
|
|
228
|
-
ifExists?: boolean;
|
|
229
|
-
cascade?: boolean;
|
|
230
|
-
}): string;
|
|
231
237
|
/** Generate RENAME TABLE statement */
|
|
232
238
|
generateRenameTableSql(oldName: string, newName: string): string;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* The column and constraint DDL a migration builder emits, which only a SQL engine has. Split from
|
|
242
|
+
* {@link SchemaGenerator} because MongoDB used to satisfy these six by returning `''`: a document store
|
|
243
|
+
* has no `ADD COLUMN`, and an empty statement silently did nothing rather than saying so.
|
|
244
|
+
*/
|
|
245
|
+
export interface SqlDdlGenerator extends SchemaGenerator {
|
|
233
246
|
/** Generate ADD COLUMN statement */
|
|
234
247
|
generateAddColumnSql(tableName: string, column: FullColumnDefinition): string;
|
|
235
248
|
/** Generate ALTER COLUMN statement */
|
|
@@ -238,10 +251,6 @@ export interface SchemaGenerator {
|
|
|
238
251
|
generateDropColumnSql(tableName: string, columnName: string): string;
|
|
239
252
|
/** Generate RENAME COLUMN statement */
|
|
240
253
|
generateRenameColumnSql(tableName: string, oldName: string, newName: string): string;
|
|
241
|
-
/** Generate CREATE INDEX statement from IndexSchema */
|
|
242
|
-
generateCreateIndexSql(tableName: string, index: IndexSchema): string;
|
|
243
|
-
/** Generate DROP INDEX statement */
|
|
244
|
-
generateDropIndexSql(tableName: string, indexName: string): string;
|
|
245
254
|
/** Generate ADD FOREIGN KEY statement */
|
|
246
255
|
generateAddForeignKeySql(tableName: string, foreignKey: TableForeignKeyDefinition): string;
|
|
247
256
|
/** Generate DROP FOREIGN KEY statement */
|
|
@@ -268,4 +277,3 @@ export interface SchemaIntrospector {
|
|
|
268
277
|
*/
|
|
269
278
|
tableExists(tableName: string): Promise<boolean>;
|
|
270
279
|
}
|
|
271
|
-
//# sourceMappingURL=migration.d.ts.map
|
package/dist/type/migration.js
CHANGED
package/dist/type/querier.d.ts
CHANGED
package/dist/type/querier.js
CHANGED
package/dist/type/querierPool.js
CHANGED
package/dist/type/query.d.ts
CHANGED
package/dist/type/query.js
CHANGED
package/dist/type/queryRaw.d.ts
CHANGED
package/dist/type/queryRaw.js
CHANGED
package/dist/type/queryWhere.js
CHANGED
|
@@ -134,4 +134,3 @@ export interface UniversalQuerier {
|
|
|
134
134
|
*/
|
|
135
135
|
aggregate<E extends object, const G extends QueryGroupMap<E>, const A extends QueryAggMap<E>>(entity: Type<E>, q: QueryAggregate<E, G, A>, opts?: QueryOptions): Promise<QueryAggregateResult<E, G, A>[]>;
|
|
136
136
|
}
|
|
137
|
-
//# sourceMappingURL=universalQuerier.d.ts.map
|
package/dist/type/utility.d.ts
CHANGED
|
@@ -48,4 +48,3 @@ export type Writable<T> = {
|
|
|
48
48
|
*/
|
|
49
49
|
export type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
50
50
|
export type Unpacked<T> = T extends readonly (infer U)[] ? U : T extends (...args: unknown[]) => infer U ? U : T extends Promise<infer U> ? U : T;
|
|
51
|
-
//# sourceMappingURL=utility.d.ts.map
|
package/dist/type/utility.js
CHANGED