@uql/core 1.0.12 → 3.1.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/CHANGELOG.md +254 -0
- package/LICENSE.md +2 -2
- package/dist/browser/http/bus.d.ts +3 -0
- package/dist/browser/http/bus.js +14 -0
- package/dist/browser/http/http.d.ts +6 -0
- package/dist/browser/http/http.js +45 -0
- package/dist/browser/http/index.d.ts +2 -0
- package/dist/browser/http/index.js +3 -0
- package/dist/browser/index.d.ts +4 -0
- package/dist/browser/index.js +5 -0
- package/dist/browser/options.d.ts +4 -0
- package/dist/browser/options.js +14 -0
- package/dist/browser/querier/genericClientRepository.d.ts +17 -0
- package/dist/browser/querier/genericClientRepository.js +39 -0
- package/dist/browser/querier/httpQuerier.d.ts +20 -0
- package/dist/browser/querier/httpQuerier.js +71 -0
- package/dist/browser/querier/index.d.ts +3 -0
- package/dist/browser/querier/index.js +4 -0
- package/dist/browser/querier/querier.util.d.ts +2 -0
- package/dist/browser/querier/querier.util.js +17 -0
- package/dist/browser/type/clientQuerier.d.ts +16 -0
- package/dist/browser/type/clientQuerier.js +2 -0
- package/dist/browser/type/clientQuerierPool.d.ts +4 -0
- package/dist/browser/type/clientQuerierPool.js +2 -0
- package/dist/browser/type/clientRepository.d.ts +13 -0
- package/dist/browser/type/clientRepository.js +2 -0
- package/dist/browser/type/index.d.ts +4 -0
- package/dist/browser/type/index.js +5 -0
- package/dist/browser/type/request.d.ts +28 -0
- package/dist/browser/type/request.js +2 -0
- package/dist/browser/uql-browser.min.js +2150 -0
- package/dist/browser/uql-browser.min.js.map +1 -0
- package/dist/dialect/abstractDialect.d.ts +16 -0
- package/dist/dialect/abstractDialect.js +28 -0
- package/dist/dialect/abstractSqlDialect.d.ts +47 -0
- package/dist/dialect/abstractSqlDialect.js +650 -0
- package/dist/dialect/index.d.ts +3 -0
- package/dist/dialect/index.js +4 -0
- package/dist/dialect/queryContext.d.ts +48 -0
- package/dist/dialect/queryContext.js +65 -0
- package/{entity → dist/entity}/decorator/definition.d.ts +3 -3
- package/dist/entity/decorator/definition.js +214 -0
- package/{entity → dist/entity}/decorator/entity.d.ts +1 -1
- package/dist/entity/decorator/entity.js +7 -0
- package/{entity → dist/entity}/decorator/field.d.ts +1 -1
- package/dist/entity/decorator/field.js +8 -0
- package/{entity → dist/entity}/decorator/id.d.ts +1 -1
- package/dist/entity/decorator/id.js +8 -0
- package/dist/entity/decorator/index.d.ts +5 -0
- package/dist/entity/decorator/index.js +6 -0
- package/{entity → dist/entity}/decorator/relation.d.ts +1 -1
- package/dist/entity/decorator/relation.js +20 -0
- package/dist/entity/index.d.ts +1 -0
- package/dist/entity/index.js +2 -0
- package/dist/express/index.d.ts +2 -0
- package/dist/express/index.js +3 -0
- package/dist/express/querierMiddleware.d.ts +26 -0
- package/dist/express/querierMiddleware.js +190 -0
- package/dist/express/query.util.d.ts +2 -0
- package/dist/express/query.util.js +19 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -0
- package/dist/maria/index.d.ts +3 -0
- package/dist/maria/index.js +4 -0
- package/dist/maria/mariaDialect.d.ts +8 -0
- package/dist/maria/mariaDialect.js +38 -0
- package/dist/maria/mariaQuerierPool.test.d.ts +5 -0
- package/dist/maria/mariaQuerierPool.test.js +19 -0
- package/dist/maria/mariadbQuerier.d.ts +17 -0
- package/dist/maria/mariadbQuerier.js +39 -0
- package/dist/maria/mariadbQuerier.test.d.ts +4 -0
- package/dist/maria/mariadbQuerier.test.js +19 -0
- package/dist/maria/mariadbQuerierPool.d.ts +10 -0
- package/dist/maria/mariadbQuerierPool.js +17 -0
- package/dist/migrate/cli.d.ts +2 -0
- package/dist/migrate/cli.js +254 -0
- package/dist/migrate/generator/index.d.ts +4 -0
- package/dist/migrate/generator/index.js +5 -0
- package/dist/migrate/generator/mongoSchemaGenerator.d.ts +12 -0
- package/dist/migrate/generator/mongoSchemaGenerator.js +100 -0
- package/dist/migrate/generator/mysqlSchemaGenerator.d.ts +14 -0
- package/dist/migrate/generator/mysqlSchemaGenerator.js +81 -0
- package/dist/migrate/generator/postgresSchemaGenerator.d.ts +18 -0
- package/dist/migrate/generator/postgresSchemaGenerator.js +111 -0
- package/dist/migrate/generator/sqliteSchemaGenerator.d.ts +14 -0
- package/dist/migrate/generator/sqliteSchemaGenerator.js +68 -0
- package/dist/migrate/index.d.ts +12 -0
- package/dist/migrate/index.js +17 -0
- package/dist/migrate/introspection/index.d.ts +4 -0
- package/dist/migrate/introspection/index.js +5 -0
- package/dist/migrate/introspection/mongoIntrospector.d.ts +8 -0
- package/dist/migrate/introspection/mongoIntrospector.js +46 -0
- package/dist/migrate/introspection/mysqlIntrospector.d.ts +25 -0
- package/dist/migrate/introspection/mysqlIntrospector.js +220 -0
- package/dist/migrate/introspection/postgresIntrospector.d.ts +21 -0
- package/dist/migrate/introspection/postgresIntrospector.js +269 -0
- package/dist/migrate/introspection/sqliteIntrospector.d.ts +23 -0
- package/dist/migrate/introspection/sqliteIntrospector.js +212 -0
- package/dist/migrate/migrator-mongo.test.d.ts +1 -0
- package/dist/migrate/migrator-mongo.test.js +54 -0
- package/dist/migrate/migrator.d.ts +133 -0
- package/dist/migrate/migrator.js +600 -0
- package/dist/migrate/migrator.test.d.ts +1 -0
- package/dist/migrate/migrator.test.js +106 -0
- package/dist/migrate/schemaGenerator.d.ts +78 -0
- package/dist/migrate/schemaGenerator.js +363 -0
- package/dist/migrate/storage/databaseStorage.d.ts +24 -0
- package/dist/migrate/storage/databaseStorage.js +77 -0
- package/dist/migrate/storage/index.d.ts +2 -0
- package/dist/migrate/storage/index.js +3 -0
- package/dist/migrate/storage/jsonStorage.d.ts +15 -0
- package/dist/migrate/storage/jsonStorage.js +51 -0
- package/dist/migrate/type.d.ts +1 -0
- package/dist/migrate/type.js +2 -0
- package/dist/mongo/index.d.ts +3 -0
- package/dist/mongo/index.js +4 -0
- package/dist/mongo/mongoDialect.d.ts +34 -0
- package/dist/mongo/mongoDialect.js +163 -0
- package/dist/mongo/mongodbQuerier.d.ts +28 -0
- package/dist/mongo/mongodbQuerier.js +204 -0
- package/dist/mongo/mongodbQuerier.test.d.ts +1 -0
- package/dist/mongo/mongodbQuerier.test.js +36 -0
- package/dist/mongo/mongodbQuerierPool.d.ts +10 -0
- package/dist/mongo/mongodbQuerierPool.js +20 -0
- package/dist/mongo/mongodbQuerierPool.test.d.ts +1 -0
- package/dist/mongo/mongodbQuerierPool.test.js +21 -0
- package/dist/mysql/index.d.ts +3 -0
- package/dist/mysql/index.js +4 -0
- package/dist/mysql/mysql2Querier.d.ts +17 -0
- package/dist/mysql/mysql2Querier.js +43 -0
- package/dist/mysql/mysql2Querier.test.d.ts +4 -0
- package/dist/mysql/mysql2Querier.test.js +16 -0
- package/dist/mysql/mysql2QuerierPool.d.ts +10 -0
- package/dist/mysql/mysql2QuerierPool.js +17 -0
- package/dist/mysql/mysql2QuerierPool.test.d.ts +5 -0
- package/dist/mysql/mysql2QuerierPool.test.js +16 -0
- package/dist/mysql/mysqlDialect.d.ts +5 -0
- package/dist/mysql/mysqlDialect.js +15 -0
- package/dist/namingStrategy/defaultNamingStrategy.d.ts +9 -0
- package/dist/namingStrategy/defaultNamingStrategy.js +15 -0
- package/dist/namingStrategy/index.d.ts +2 -0
- package/dist/namingStrategy/index.js +3 -0
- package/dist/namingStrategy/snakeCaseNamingStrategy.d.ts +8 -0
- package/dist/namingStrategy/snakeCaseNamingStrategy.js +14 -0
- package/{options.d.ts → dist/options.d.ts} +1 -1
- package/dist/options.js +14 -0
- package/dist/package.json +131 -0
- package/dist/postgres/index.d.ts +3 -0
- package/dist/postgres/index.js +4 -0
- package/dist/postgres/pgQuerier.d.ts +17 -0
- package/dist/postgres/pgQuerier.js +39 -0
- package/dist/postgres/pgQuerier.test.d.ts +4 -0
- package/dist/postgres/pgQuerier.test.js +20 -0
- package/dist/postgres/pgQuerierPool.d.ts +10 -0
- package/dist/postgres/pgQuerierPool.js +17 -0
- package/dist/postgres/pgQuerierPool.test.d.ts +5 -0
- package/dist/postgres/pgQuerierPool.test.js +23 -0
- package/dist/postgres/postgresDialect.d.ts +13 -0
- package/dist/postgres/postgresDialect.js +110 -0
- package/dist/querier/abstractQuerier-test.d.ts +45 -0
- package/dist/querier/abstractQuerier-test.js +461 -0
- package/dist/querier/abstractQuerier.d.ts +50 -0
- package/dist/querier/abstractQuerier.js +278 -0
- package/dist/querier/abstractQuerierPool-test.d.ts +9 -0
- package/dist/querier/abstractQuerierPool-test.js +18 -0
- package/dist/querier/abstractQuerierPool.d.ts +14 -0
- package/dist/querier/abstractQuerierPool.js +9 -0
- package/dist/querier/abstractSqlQuerier-test.d.ts +9 -0
- package/dist/querier/abstractSqlQuerier-test.js +16 -0
- package/dist/querier/abstractSqlQuerier.d.ts +28 -0
- package/dist/querier/abstractSqlQuerier.js +133 -0
- package/dist/querier/decorator/index.d.ts +3 -0
- package/dist/querier/decorator/index.js +4 -0
- package/dist/querier/decorator/injectQuerier.d.ts +3 -0
- package/dist/querier/decorator/injectQuerier.js +33 -0
- package/dist/querier/decorator/serialized.d.ts +6 -0
- package/dist/querier/decorator/serialized.js +14 -0
- package/{querier → dist/querier}/decorator/transactional.d.ts +1 -1
- package/dist/querier/decorator/transactional.js +48 -0
- package/dist/querier/index.d.ts +4 -0
- package/dist/querier/index.js +5 -0
- package/dist/repository/genericRepository.d.ts +20 -0
- package/dist/repository/genericRepository.js +51 -0
- package/dist/repository/index.d.ts +1 -0
- package/dist/repository/index.js +2 -0
- package/dist/sqlite/index.d.ts +3 -0
- package/dist/sqlite/index.js +4 -0
- package/dist/sqlite/sqliteDialect.d.ts +10 -0
- package/dist/sqlite/sqliteDialect.js +48 -0
- package/dist/sqlite/sqliteQuerier.d.ts +15 -0
- package/dist/sqlite/sqliteQuerier.js +33 -0
- package/dist/sqlite/sqliteQuerier.test.d.ts +5 -0
- package/dist/sqlite/sqliteQuerier.test.js +19 -0
- package/dist/sqlite/sqliteQuerierPool.d.ts +14 -0
- package/dist/sqlite/sqliteQuerierPool.js +34 -0
- package/dist/sqlite/sqliteQuerierPool.test.d.ts +5 -0
- package/dist/sqlite/sqliteQuerierPool.test.js +10 -0
- package/dist/test/entityMock.d.ts +164 -0
- package/dist/test/entityMock.js +554 -0
- package/dist/test/index.d.ts +3 -0
- package/dist/test/index.js +4 -0
- package/dist/test/it.util.d.ts +4 -0
- package/dist/test/it.util.js +55 -0
- package/dist/test/spec.util.d.ts +14 -0
- package/dist/test/spec.util.js +50 -0
- package/{type → dist/type}/entity.d.ts +97 -4
- package/dist/type/entity.js +5 -0
- package/dist/type/index.d.ts +9 -0
- package/dist/type/index.js +10 -0
- package/dist/type/migration.d.ts +213 -0
- package/dist/type/migration.js +2 -0
- package/dist/type/namingStrategy.d.ts +17 -0
- package/dist/type/namingStrategy.js +2 -0
- package/dist/type/querier.d.ts +96 -0
- package/dist/type/querier.js +11 -0
- package/{type → dist/type}/querierPool.d.ts +7 -3
- package/dist/type/querierPool.js +2 -0
- package/{type → dist/type}/query.d.ts +170 -108
- package/dist/type/query.js +9 -0
- package/{type → dist/type}/repository.d.ts +42 -35
- package/dist/type/repository.js +2 -0
- package/{type → dist/type}/universalQuerier.d.ts +50 -28
- package/dist/type/universalQuerier.js +2 -0
- package/dist/type/utility.d.ts +13 -0
- package/dist/type/utility.js +2 -0
- package/dist/util/dialect.util.d.ts +12 -0
- package/dist/util/dialect.util.js +93 -0
- package/dist/util/index.d.ts +5 -0
- package/dist/util/index.js +6 -0
- package/dist/util/object.util.d.ts +7 -0
- package/dist/util/object.util.js +19 -0
- package/dist/util/raw.d.ts +8 -0
- package/dist/util/raw.js +11 -0
- package/dist/util/sql.util.d.ts +13 -0
- package/dist/util/sql.util.js +78 -0
- package/{util → dist/util}/string.util.d.ts +1 -0
- package/dist/util/string.util.js +34 -0
- package/package.json +85 -17
- package/src/@types/index.d.ts +1 -0
- package/src/@types/jest.d.ts +6 -0
- package/src/browser/http/bus.spec.ts +22 -0
- package/src/browser/http/bus.ts +17 -0
- package/src/browser/http/http.spec.ts +70 -0
- package/src/browser/http/http.ts +55 -0
- package/src/browser/http/index.ts +2 -0
- package/src/browser/index.ts +4 -0
- package/src/browser/options.spec.ts +37 -0
- package/src/browser/options.ts +18 -0
- package/src/browser/querier/genericClientRepository.spec.ts +105 -0
- package/src/browser/querier/genericClientRepository.ts +49 -0
- package/src/browser/querier/httpQuerier.ts +82 -0
- package/src/browser/querier/index.ts +3 -0
- package/src/browser/querier/querier.util.spec.ts +35 -0
- package/src/browser/querier/querier.util.ts +18 -0
- package/src/browser/type/clientQuerier.ts +45 -0
- package/src/browser/type/clientQuerierPool.ts +5 -0
- package/src/browser/type/clientRepository.ts +22 -0
- package/src/browser/type/index.ts +4 -0
- package/src/browser/type/request.ts +25 -0
- package/src/dialect/abstractDialect.ts +28 -0
- package/src/dialect/abstractSqlDialect-spec.ts +1309 -0
- package/src/dialect/abstractSqlDialect.ts +805 -0
- package/src/dialect/index.ts +3 -0
- package/src/dialect/namingStrategy.spec.ts +52 -0
- package/src/dialect/queryContext.ts +69 -0
- package/src/entity/decorator/definition.spec.ts +736 -0
- package/src/entity/decorator/definition.ts +265 -0
- package/src/entity/decorator/entity.ts +8 -0
- package/src/entity/decorator/field.ts +9 -0
- package/src/entity/decorator/id.ts +9 -0
- package/src/entity/decorator/index.ts +5 -0
- package/src/entity/decorator/relation.spec.ts +41 -0
- package/src/entity/decorator/relation.ts +34 -0
- package/src/entity/index.ts +1 -0
- package/src/express/@types/express.d.ts +8 -0
- package/src/express/@types/index.d.ts +1 -0
- package/src/express/index.ts +2 -0
- package/src/express/querierMiddleware.ts +217 -0
- package/src/express/query.util.spec.ts +40 -0
- package/src/express/query.util.ts +21 -0
- package/src/index.ts +9 -0
- package/src/maria/index.ts +3 -0
- package/src/maria/mariaDialect.spec.ts +207 -0
- package/src/maria/mariaDialect.ts +42 -0
- package/src/maria/mariaQuerierPool.test.ts +23 -0
- package/src/maria/mariadbQuerier.test.ts +23 -0
- package/src/maria/mariadbQuerier.ts +45 -0
- package/src/maria/mariadbQuerierPool.ts +21 -0
- package/src/migrate/cli.ts +301 -0
- package/src/migrate/generator/index.ts +4 -0
- package/src/migrate/generator/mongoSchemaGenerator.spec.ts +112 -0
- package/src/migrate/generator/mongoSchemaGenerator.ts +115 -0
- package/src/migrate/generator/mysqlSchemaGenerator.spec.ts +34 -0
- package/src/migrate/generator/mysqlSchemaGenerator.ts +92 -0
- package/src/migrate/generator/postgresSchemaGenerator.spec.ts +44 -0
- package/src/migrate/generator/postgresSchemaGenerator.ts +127 -0
- package/src/migrate/generator/sqliteSchemaGenerator.spec.ts +33 -0
- package/src/migrate/generator/sqliteSchemaGenerator.ts +81 -0
- package/src/migrate/index.ts +41 -0
- package/src/migrate/introspection/index.ts +4 -0
- package/src/migrate/introspection/mongoIntrospector.spec.ts +75 -0
- package/src/migrate/introspection/mongoIntrospector.ts +47 -0
- package/src/migrate/introspection/mysqlIntrospector.spec.ts +113 -0
- package/src/migrate/introspection/mysqlIntrospector.ts +278 -0
- package/src/migrate/introspection/postgresIntrospector.spec.ts +112 -0
- package/src/migrate/introspection/postgresIntrospector.ts +329 -0
- package/src/migrate/introspection/sqliteIntrospector.spec.ts +112 -0
- package/src/migrate/introspection/sqliteIntrospector.ts +296 -0
- package/src/migrate/migrator-mongo.test.ts +54 -0
- package/src/migrate/migrator.spec.ts +255 -0
- package/src/migrate/migrator.test.ts +94 -0
- package/src/migrate/migrator.ts +719 -0
- package/src/migrate/namingStrategy.spec.ts +22 -0
- package/src/migrate/schemaGenerator-advanced.spec.ts +138 -0
- package/src/migrate/schemaGenerator.spec.ts +190 -0
- package/src/migrate/schemaGenerator.ts +478 -0
- package/src/migrate/storage/databaseStorage.spec.ts +69 -0
- package/src/migrate/storage/databaseStorage.ts +100 -0
- package/src/migrate/storage/index.ts +2 -0
- package/src/migrate/storage/jsonStorage.ts +58 -0
- package/src/migrate/type.ts +1 -0
- package/src/mongo/index.ts +3 -0
- package/src/mongo/mongoDialect.spec.ts +251 -0
- package/src/mongo/mongoDialect.ts +238 -0
- package/src/mongo/mongodbQuerier.test.ts +45 -0
- package/src/mongo/mongodbQuerier.ts +256 -0
- package/src/mongo/mongodbQuerierPool.test.ts +25 -0
- package/src/mongo/mongodbQuerierPool.ts +24 -0
- package/src/mysql/index.ts +3 -0
- package/src/mysql/mysql2Querier.test.ts +20 -0
- package/src/mysql/mysql2Querier.ts +49 -0
- package/src/mysql/mysql2QuerierPool.test.ts +20 -0
- package/src/mysql/mysql2QuerierPool.ts +21 -0
- package/src/mysql/mysqlDialect.spec.ts +20 -0
- package/src/mysql/mysqlDialect.ts +16 -0
- package/src/namingStrategy/defaultNamingStrategy.ts +18 -0
- package/src/namingStrategy/index.spec.ts +36 -0
- package/src/namingStrategy/index.ts +2 -0
- package/src/namingStrategy/snakeCaseNamingStrategy.ts +15 -0
- package/src/options.spec.ts +41 -0
- package/src/options.ts +18 -0
- package/src/postgres/index.ts +3 -0
- package/src/postgres/manual-types.d.ts +4 -0
- package/src/postgres/pgQuerier.test.ts +25 -0
- package/src/postgres/pgQuerier.ts +45 -0
- package/src/postgres/pgQuerierPool.test.ts +28 -0
- package/src/postgres/pgQuerierPool.ts +21 -0
- package/src/postgres/postgresDialect.spec.ts +428 -0
- package/src/postgres/postgresDialect.ts +144 -0
- package/src/querier/abstractQuerier-test.ts +584 -0
- package/src/querier/abstractQuerier.ts +353 -0
- package/src/querier/abstractQuerierPool-test.ts +20 -0
- package/src/querier/abstractQuerierPool.ts +18 -0
- package/src/querier/abstractSqlQuerier-spec.ts +979 -0
- package/src/querier/abstractSqlQuerier-test.ts +21 -0
- package/src/querier/abstractSqlQuerier.ts +138 -0
- package/src/querier/decorator/index.ts +3 -0
- package/src/querier/decorator/injectQuerier.spec.ts +74 -0
- package/src/querier/decorator/injectQuerier.ts +45 -0
- package/src/querier/decorator/serialized.spec.ts +98 -0
- package/src/querier/decorator/serialized.ts +13 -0
- package/src/querier/decorator/transactional.spec.ts +240 -0
- package/src/querier/decorator/transactional.ts +56 -0
- package/src/querier/index.ts +4 -0
- package/src/repository/genericRepository.spec.ts +111 -0
- package/src/repository/genericRepository.ts +74 -0
- package/src/repository/index.ts +1 -0
- package/src/sqlite/index.ts +3 -0
- package/src/sqlite/manual-types.d.ts +4 -0
- package/src/sqlite/sqliteDialect.spec.ts +155 -0
- package/src/sqlite/sqliteDialect.ts +76 -0
- package/src/sqlite/sqliteQuerier.spec.ts +36 -0
- package/src/sqlite/sqliteQuerier.test.ts +21 -0
- package/src/sqlite/sqliteQuerier.ts +37 -0
- package/src/sqlite/sqliteQuerierPool.test.ts +12 -0
- package/src/sqlite/sqliteQuerierPool.ts +38 -0
- package/src/test/entityMock.ts +375 -0
- package/src/test/index.ts +3 -0
- package/src/test/it.util.ts +69 -0
- package/src/test/spec.util.ts +57 -0
- package/src/type/entity.ts +218 -0
- package/src/type/index.ts +9 -0
- package/src/type/migration.ts +241 -0
- package/src/type/namingStrategy.ts +17 -0
- package/src/type/querier.ts +143 -0
- package/src/type/querierPool.ts +26 -0
- package/src/type/query.ts +506 -0
- package/src/type/repository.ts +142 -0
- package/src/type/universalQuerier.ts +133 -0
- package/src/type/utility.ts +21 -0
- package/src/util/dialect.util-extra.spec.ts +96 -0
- package/src/util/dialect.util.spec.ts +23 -0
- package/src/util/dialect.util.ts +134 -0
- package/src/util/index.ts +5 -0
- package/src/util/object.util.spec.ts +29 -0
- package/src/util/object.util.ts +27 -0
- package/src/util/raw.ts +11 -0
- package/src/util/sql.util-extra.spec.ts +17 -0
- package/src/util/sql.util.spec.ts +208 -0
- package/src/util/sql.util.ts +104 -0
- package/src/util/string.util.spec.ts +46 -0
- package/src/util/string.util.ts +35 -0
- package/tsconfig.build.json +5 -0
- package/tsconfig.json +8 -0
- package/README.md +0 -177
- package/dialect/abstractSqlDialect.d.ts +0 -30
- package/dialect/abstractSqlDialect.js +0 -365
- package/dialect/index.d.ts +0 -4
- package/dialect/index.js +0 -8
- package/dialect/mysqlDialect.d.ts +0 -6
- package/dialect/mysqlDialect.js +0 -21
- package/dialect/postgresDialect.d.ts +0 -8
- package/dialect/postgresDialect.js +0 -44
- package/dialect/sqliteDialect.d.ts +0 -4
- package/dialect/sqliteDialect.js +0 -11
- package/entity/decorator/definition.js +0 -223
- package/entity/decorator/entity.js +0 -11
- package/entity/decorator/field.js +0 -12
- package/entity/decorator/id.js +0 -12
- package/entity/decorator/index.d.ts +0 -5
- package/entity/decorator/index.js +0 -12
- package/entity/decorator/relation.js +0 -27
- package/entity/index.d.ts +0 -1
- package/entity/index.js +0 -5
- package/index.d.ts +0 -1
- package/index.js +0 -5
- package/options.js +0 -20
- package/querier/abstractQuerier.d.ts +0 -30
- package/querier/abstractQuerier.js +0 -230
- package/querier/abstractSqlQuerier.d.ts +0 -27
- package/querier/abstractSqlQuerier.js +0 -88
- package/querier/decorator/index.d.ts +0 -2
- package/querier/decorator/index.js +0 -6
- package/querier/decorator/injectQuerier.d.ts +0 -3
- package/querier/decorator/injectQuerier.js +0 -39
- package/querier/decorator/transactional.js +0 -52
- package/querier/index.d.ts +0 -3
- package/querier/index.js +0 -7
- package/repository/genericRepository.d.ts +0 -19
- package/repository/genericRepository.js +0 -52
- package/repository/index.d.ts +0 -1
- package/repository/index.js +0 -5
- package/type/entity.js +0 -5
- package/type/index.d.ts +0 -7
- package/type/index.js +0 -11
- package/type/querier.d.ts +0 -53
- package/type/querier.js +0 -3
- package/type/querierPool.js +0 -3
- package/type/query.js +0 -13
- package/type/repository.js +0 -3
- package/type/universalQuerier.js +0 -3
- package/type/utility.d.ts +0 -12
- package/type/utility.js +0 -3
- package/util/dialect.util.d.ts +0 -17
- package/util/dialect.util.js +0 -114
- package/util/index.d.ts +0 -5
- package/util/index.js +0 -9
- package/util/object.util.d.ts +0 -3
- package/util/object.util.js +0 -22
- package/util/raw.d.ts +0 -2
- package/util/raw.js +0 -9
- package/util/sql.util.d.ts +0 -2
- package/util/sql.util.js +0 -55
- package/util/string.util.js +0 -20
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcmllclBvb2wuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZS9xdWVyaWVyUG9vbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBEaWFsZWN0LCBFeHRyYU9wdGlvbnMsIFF1ZXJpZXIgfSBmcm9tICcuL3F1ZXJpZXIuanMnO1xuXG4vKipcbiAqIHF1ZXJpZXIgcG9vbC5cbiAqL1xuZXhwb3J0IHR5cGUgUXVlcmllclBvb2w8USBleHRlbmRzIFF1ZXJpZXIgPSBRdWVyaWVyPiA9IHtcbiAgLyoqXG4gICAqIHRoZSBkYXRhYmFzZSBkaWFsZWN0LlxuICAgKi9cbiAgcmVhZG9ubHkgZGlhbGVjdDogRGlhbGVjdDtcblxuICAvKipcbiAgICogZXh0cmEgb3B0aW9uc1xuICAgKi9cbiAgcmVhZG9ubHkgZXh0cmE/OiBFeHRyYU9wdGlvbnM7XG5cbiAgLyoqXG4gICAqIGdldCBhIHF1ZXJpZXIgZnJvbSB0aGUgcG9vbC5cbiAgICovXG4gIGdldFF1ZXJpZXI6ICgpID0+IFByb21pc2U8UT47XG5cbiAgLyoqXG4gICAqIGVuZCB0aGUgcG9vbC5cbiAgICovXG4gIGVuZCgpOiBQcm9taXNlPHZvaWQ+O1xufTtcbiJdfQ==
|
|
@@ -1,60 +1,68 @@
|
|
|
1
|
-
import { FieldKey, IdValue, Key, RelationKey } from './entity';
|
|
2
|
-
import { BooleanLike, ExpandScalar, Scalar, Type, Unpacked } from './utility';
|
|
1
|
+
import type { FieldKey, IdValue, Key, RelationKey } from './entity.js';
|
|
2
|
+
import type { BooleanLike, ExpandScalar, Scalar, Type, Unpacked } from './utility.js';
|
|
3
3
|
export type QueryOptions = {
|
|
4
4
|
/**
|
|
5
5
|
* use or omit `softDelete` attribute.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
softDelete?: boolean;
|
|
8
8
|
/**
|
|
9
9
|
* prefix the query with this.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
prefix?: string;
|
|
12
12
|
/**
|
|
13
13
|
* automatically infer the prefix for the query.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
autoPrefix?: boolean;
|
|
16
16
|
};
|
|
17
|
-
export type
|
|
17
|
+
export type QuerySelectOptions = {
|
|
18
18
|
/**
|
|
19
19
|
* prefix the query with this.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
prefix?: string;
|
|
22
22
|
/**
|
|
23
23
|
* automatically add the prefix for the alias.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
autoPrefixAlias?: boolean;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
* query
|
|
28
|
+
* query selection as an array.
|
|
29
29
|
*/
|
|
30
|
-
export type
|
|
30
|
+
export type QuerySelectArray<E> = (Key<E> | QueryRaw)[];
|
|
31
31
|
/**
|
|
32
|
-
* query
|
|
32
|
+
* query selection as a map.
|
|
33
33
|
*/
|
|
34
|
-
export type
|
|
34
|
+
export type QuerySelectMap<E> = QuerySelectFieldMap<E> | QuerySelectRelationMap<E>;
|
|
35
35
|
/**
|
|
36
|
-
* query
|
|
36
|
+
* query selection.
|
|
37
37
|
*/
|
|
38
|
-
export type
|
|
38
|
+
export type QuerySelect<E> = QuerySelectArray<E> | QuerySelectMap<E>;
|
|
39
39
|
/**
|
|
40
|
-
* query
|
|
40
|
+
* query selection of fields as a map.
|
|
41
41
|
*/
|
|
42
|
-
export type
|
|
42
|
+
export type QuerySelectFieldMap<E> = {
|
|
43
43
|
[K in FieldKey<E>]?: BooleanLike;
|
|
44
|
-
} | {
|
|
45
|
-
[K: string]: QueryRaw;
|
|
46
44
|
};
|
|
47
45
|
/**
|
|
48
|
-
* query
|
|
46
|
+
* query conflict paths map.
|
|
49
47
|
*/
|
|
50
|
-
export type
|
|
51
|
-
[K in
|
|
48
|
+
export type QueryConflictPathsMap<E> = {
|
|
49
|
+
[K in FieldKey<E>]?: true;
|
|
52
50
|
};
|
|
53
51
|
/**
|
|
54
|
-
*
|
|
52
|
+
* query conflict paths.
|
|
55
53
|
*/
|
|
56
|
-
export type
|
|
57
|
-
|
|
54
|
+
export type QueryConflictPaths<E> = QueryConflictPathsMap<E>;
|
|
55
|
+
/**
|
|
56
|
+
* query selection of relations as a map.
|
|
57
|
+
*/
|
|
58
|
+
export type QuerySelectRelationMap<E> = {
|
|
59
|
+
[K in RelationKey<E>]?: BooleanLike | Key<Unpacked<E[K]>>[] | QuerySelectRelationOptions<E[K]>;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* options to select a relation.
|
|
63
|
+
*/
|
|
64
|
+
export type QuerySelectRelationOptions<E> = (E extends unknown[] ? Query<Unpacked<E>> : QueryUnique<Unpacked<E>>) & {
|
|
65
|
+
$required?: boolean;
|
|
58
66
|
};
|
|
59
67
|
/**
|
|
60
68
|
* options for full-text-search operator.
|
|
@@ -63,137 +71,142 @@ export type QueryTextSearchOptions<E> = {
|
|
|
63
71
|
/**
|
|
64
72
|
* text to search for.
|
|
65
73
|
*/
|
|
66
|
-
|
|
74
|
+
$value: string;
|
|
67
75
|
/**
|
|
68
76
|
* list of fields to search on.
|
|
69
77
|
*/
|
|
70
|
-
|
|
78
|
+
$fields?: FieldKey<E>[];
|
|
71
79
|
};
|
|
72
|
-
/**
|
|
73
|
-
* value for a logical filtering.
|
|
74
|
-
*/
|
|
75
|
-
export type QueryFilterLogical<E> = readonly QueryFilter<E>[];
|
|
76
80
|
/**
|
|
77
81
|
* comparison by fields.
|
|
78
82
|
*/
|
|
79
|
-
export type
|
|
80
|
-
|
|
83
|
+
export type QueryWhereFieldMap<E> = {
|
|
84
|
+
[K in FieldKey<E>]?: QueryWhereFieldValue<E[K]>;
|
|
81
85
|
};
|
|
82
86
|
/**
|
|
83
87
|
* complex operators.
|
|
84
88
|
*/
|
|
85
|
-
export type
|
|
89
|
+
export type QueryWhereMap<E> = QueryWhereFieldMap<E> & QueryWhereRootOperator<E>;
|
|
90
|
+
export type QueryWhereRootOperator<E> = {
|
|
86
91
|
/**
|
|
87
92
|
* joins query clauses with a logical `AND`, returns records that match all the clauses.
|
|
88
93
|
*/
|
|
89
|
-
|
|
94
|
+
$and?: QueryWhereArray<E>;
|
|
90
95
|
/**
|
|
91
96
|
* joins query clauses with a logical `OR`, returns records that match any of the clauses.
|
|
92
97
|
*/
|
|
93
|
-
|
|
98
|
+
$or?: QueryWhereArray<E>;
|
|
94
99
|
/**
|
|
95
100
|
* joins query clauses with a logical `AND`, returns records that do not match all the clauses.
|
|
96
101
|
*/
|
|
97
|
-
|
|
102
|
+
$not?: QueryWhereArray<E>;
|
|
98
103
|
/**
|
|
99
104
|
* joins query clauses with a logical `OR`, returns records that do not match any of the clauses.
|
|
100
105
|
*/
|
|
101
|
-
|
|
106
|
+
$nor?: QueryWhereArray<E>;
|
|
102
107
|
/**
|
|
103
108
|
* whether the specified fields match against a full-text search of the given string.
|
|
104
109
|
*/
|
|
105
|
-
|
|
110
|
+
$text?: QueryTextSearchOptions<E>;
|
|
106
111
|
/**
|
|
107
112
|
* whether the record exists in the given sub-query.
|
|
108
113
|
*/
|
|
109
|
-
|
|
114
|
+
$exists?: QueryRaw;
|
|
110
115
|
/**
|
|
111
116
|
* whether the record does not exists in the given sub-query.
|
|
112
117
|
*/
|
|
113
|
-
|
|
118
|
+
$nexists?: QueryRaw;
|
|
114
119
|
};
|
|
115
|
-
export type
|
|
120
|
+
export type QueryWhereFieldOperatorMap<T> = {
|
|
116
121
|
/**
|
|
117
122
|
* whether a value is equal to the given value.
|
|
118
123
|
*/
|
|
119
|
-
|
|
124
|
+
$eq?: ExpandScalar<T>;
|
|
120
125
|
/**
|
|
121
126
|
* whether a value is not equal to the given value.
|
|
122
127
|
*/
|
|
123
|
-
|
|
128
|
+
$ne?: ExpandScalar<T>;
|
|
124
129
|
/**
|
|
125
130
|
* negates the given comparison.
|
|
126
131
|
*/
|
|
127
|
-
|
|
132
|
+
$not?: QueryWhereFieldValue<T>;
|
|
128
133
|
/**
|
|
129
134
|
* whether a value is less than the given value.
|
|
130
135
|
*/
|
|
131
|
-
|
|
136
|
+
$lt?: ExpandScalar<T>;
|
|
132
137
|
/**
|
|
133
138
|
* whether a value is less than or equal to the given value.
|
|
134
139
|
*/
|
|
135
|
-
|
|
140
|
+
$lte?: ExpandScalar<T>;
|
|
136
141
|
/**
|
|
137
142
|
* whether a value is greater than the given value.
|
|
138
143
|
*/
|
|
139
|
-
|
|
144
|
+
$gt?: ExpandScalar<T>;
|
|
140
145
|
/**
|
|
141
146
|
* whether a value is greater than or equal to the given value.
|
|
142
147
|
*/
|
|
143
|
-
|
|
148
|
+
$gte?: ExpandScalar<T>;
|
|
144
149
|
/**
|
|
145
150
|
* whether a string begins with the given string (case sensitive).
|
|
146
151
|
*/
|
|
147
|
-
|
|
152
|
+
$startsWith?: string;
|
|
148
153
|
/**
|
|
149
154
|
* whether a string begins with the given string (case insensitive).
|
|
150
155
|
*/
|
|
151
|
-
|
|
156
|
+
$istartsWith?: string;
|
|
152
157
|
/**
|
|
153
158
|
* whether a string ends with the given string (case sensitive).
|
|
154
159
|
*/
|
|
155
|
-
|
|
160
|
+
$endsWith?: string;
|
|
156
161
|
/**
|
|
157
162
|
* whether a string ends with the given string (case insensitive).
|
|
158
163
|
*/
|
|
159
|
-
|
|
164
|
+
$iendsWith?: string;
|
|
160
165
|
/**
|
|
161
166
|
* whether a string is contained within the given string (case sensitive).
|
|
162
167
|
*/
|
|
163
|
-
|
|
168
|
+
$includes?: string;
|
|
164
169
|
/**
|
|
165
170
|
* whether a string is contained within the given string (case insensitive).
|
|
166
171
|
*/
|
|
167
|
-
|
|
172
|
+
$iincludes?: string;
|
|
168
173
|
/**
|
|
169
174
|
* whether a string fulfills the given pattern (case sensitive).
|
|
170
175
|
*/
|
|
171
|
-
|
|
176
|
+
$like?: string;
|
|
172
177
|
/**
|
|
173
178
|
* whether a string fulfills the given pattern (case insensitive).
|
|
174
179
|
*/
|
|
175
|
-
|
|
180
|
+
$ilike?: string;
|
|
176
181
|
/**
|
|
177
182
|
* whether a string matches the given regular expression.
|
|
178
183
|
*/
|
|
179
|
-
|
|
184
|
+
$regex?: string;
|
|
180
185
|
/**
|
|
181
186
|
* whether a value matches any of the given values.
|
|
182
187
|
*/
|
|
183
|
-
|
|
188
|
+
$in?: ExpandScalar<T>[];
|
|
184
189
|
/**
|
|
185
190
|
* whether a value does not match any of the given values.
|
|
186
191
|
*/
|
|
187
|
-
|
|
192
|
+
$nin?: ExpandScalar<T>[];
|
|
188
193
|
};
|
|
189
194
|
/**
|
|
190
195
|
* Value for a field comparison.
|
|
191
196
|
*/
|
|
192
|
-
export type
|
|
197
|
+
export type QueryWhereFieldValue<T> = T | T[] | QueryWhereFieldOperatorMap<T> | QueryRaw;
|
|
198
|
+
/**
|
|
199
|
+
* query single filter.
|
|
200
|
+
*/
|
|
201
|
+
export type QueryWhereSingle<E> = IdValue<E> | IdValue<E>[] | QueryWhereMap<E> | QueryRaw;
|
|
202
|
+
/**
|
|
203
|
+
* query filter array.
|
|
204
|
+
*/
|
|
205
|
+
export type QueryWhereArray<E> = QueryWhereSingle<E>[];
|
|
193
206
|
/**
|
|
194
207
|
* query filter.
|
|
195
208
|
*/
|
|
196
|
-
export type
|
|
209
|
+
export type QueryWhere<E> = QueryWhereSingle<E> | QueryWhereArray<E>;
|
|
197
210
|
/**
|
|
198
211
|
* direction for the sort.
|
|
199
212
|
*/
|
|
@@ -201,13 +214,13 @@ export type QuerySortDirection = -1 | 1 | 'asc' | 'desc';
|
|
|
201
214
|
/**
|
|
202
215
|
* sort by tuples
|
|
203
216
|
*/
|
|
204
|
-
export type QuerySortTuples<E> =
|
|
217
|
+
export type QuerySortTuples<E> = [FieldKey<E>, QuerySortDirection][];
|
|
205
218
|
/**
|
|
206
219
|
* sort by objects.
|
|
207
220
|
*/
|
|
208
|
-
export type QuerySortObjects<E> =
|
|
209
|
-
|
|
210
|
-
|
|
221
|
+
export type QuerySortObjects<E> = {
|
|
222
|
+
field: FieldKey<E>;
|
|
223
|
+
sort: QuerySortDirection;
|
|
211
224
|
}[];
|
|
212
225
|
/**
|
|
213
226
|
* sort by fields.
|
|
@@ -233,7 +246,13 @@ export type QuerySort<E> = QuerySortMap<E> | QuerySortTuples<E> | QuerySortObjec
|
|
|
233
246
|
* pager options.
|
|
234
247
|
*/
|
|
235
248
|
export type QueryPager = {
|
|
249
|
+
/**
|
|
250
|
+
* Index from where start the search
|
|
251
|
+
*/
|
|
236
252
|
$skip?: number;
|
|
253
|
+
/**
|
|
254
|
+
* Max number of records to retrieve
|
|
255
|
+
*/
|
|
237
256
|
$limit?: number;
|
|
238
257
|
};
|
|
239
258
|
/**
|
|
@@ -243,34 +262,25 @@ export type QuerySearch<E> = {
|
|
|
243
262
|
/**
|
|
244
263
|
* filtering options.
|
|
245
264
|
*/
|
|
246
|
-
$
|
|
247
|
-
/**
|
|
248
|
-
* list of fields to group.
|
|
249
|
-
*/
|
|
250
|
-
$group?: readonly FieldKey<E>[];
|
|
251
|
-
/**
|
|
252
|
-
* having options.
|
|
253
|
-
*/
|
|
254
|
-
$having?: QueryFilter<E>;
|
|
255
|
-
};
|
|
256
|
-
/**
|
|
257
|
-
* criteria options.
|
|
258
|
-
*/
|
|
259
|
-
export type QueryCriteria<E> = QuerySearch<E> & {
|
|
265
|
+
$where?: QueryWhere<E>;
|
|
260
266
|
/**
|
|
261
267
|
* sorting options.
|
|
262
268
|
*/
|
|
263
269
|
$sort?: QuerySort<E>;
|
|
264
270
|
} & QueryPager;
|
|
271
|
+
/**
|
|
272
|
+
* criteria one options.
|
|
273
|
+
*/
|
|
274
|
+
export type QuerySearchOne<E> = Omit<QuerySearch<E>, '$limit'>;
|
|
265
275
|
/**
|
|
266
276
|
* query options.
|
|
267
277
|
*/
|
|
268
278
|
export type Query<E> = {
|
|
269
279
|
/**
|
|
270
|
-
*
|
|
280
|
+
* selection options.
|
|
271
281
|
*/
|
|
272
|
-
$
|
|
273
|
-
} &
|
|
282
|
+
$select?: QuerySelect<E>;
|
|
283
|
+
} & QuerySearch<E>;
|
|
274
284
|
/**
|
|
275
285
|
* options to get a single record.
|
|
276
286
|
*/
|
|
@@ -278,25 +288,29 @@ export type QueryOne<E> = Omit<Query<E>, '$limit'>;
|
|
|
278
288
|
/**
|
|
279
289
|
* options to get an unique record.
|
|
280
290
|
*/
|
|
281
|
-
export type QueryUnique<E> = Pick<
|
|
291
|
+
export type QueryUnique<E> = Pick<QueryOne<E>, '$select' | '$where'>;
|
|
282
292
|
/**
|
|
283
293
|
* stringified query.
|
|
284
294
|
*/
|
|
285
295
|
export type QueryStringified = {
|
|
286
|
-
|
|
296
|
+
[K in keyof Query<unknown>]?: string;
|
|
287
297
|
};
|
|
288
298
|
/**
|
|
289
299
|
* result of an update operation.
|
|
290
300
|
*/
|
|
291
301
|
export type QueryUpdateResult = {
|
|
292
302
|
/**
|
|
293
|
-
* number of
|
|
303
|
+
* number of affected records.
|
|
294
304
|
*/
|
|
295
|
-
|
|
305
|
+
changes?: number;
|
|
306
|
+
/**
|
|
307
|
+
* the inserted IDs.
|
|
308
|
+
*/
|
|
309
|
+
ids?: number[] | string[];
|
|
296
310
|
/**
|
|
297
311
|
* first inserted ID.
|
|
298
312
|
*/
|
|
299
|
-
|
|
313
|
+
firstId?: number | string;
|
|
300
314
|
};
|
|
301
315
|
/**
|
|
302
316
|
* options for the `raw` function.
|
|
@@ -305,20 +319,24 @@ export type QueryRawFnOptions = {
|
|
|
305
319
|
/**
|
|
306
320
|
* the current dialect.
|
|
307
321
|
*/
|
|
308
|
-
|
|
322
|
+
dialect?: QueryDialect;
|
|
309
323
|
/**
|
|
310
324
|
* the prefix.
|
|
311
325
|
*/
|
|
312
|
-
|
|
326
|
+
prefix?: string;
|
|
313
327
|
/**
|
|
314
328
|
* the escaped prefix.
|
|
315
329
|
*/
|
|
316
|
-
|
|
330
|
+
escapedPrefix?: string;
|
|
331
|
+
/**
|
|
332
|
+
* the query context.
|
|
333
|
+
*/
|
|
334
|
+
ctx?: QueryContext;
|
|
317
335
|
};
|
|
318
336
|
/**
|
|
319
337
|
* a `raw` function
|
|
320
338
|
*/
|
|
321
|
-
export type QueryRawFn = (opts?: QueryRawFnOptions) =>
|
|
339
|
+
export type QueryRawFn = (opts?: QueryRawFnOptions) => void | Scalar;
|
|
322
340
|
export declare class QueryRaw {
|
|
323
341
|
readonly value: Scalar | QueryRawFn;
|
|
324
342
|
readonly alias?: string;
|
|
@@ -331,54 +349,74 @@ export type QueryComparisonOptions = QueryOptions & {
|
|
|
331
349
|
/**
|
|
332
350
|
* use precedence for the comparison or not.
|
|
333
351
|
*/
|
|
334
|
-
|
|
352
|
+
usePrecedence?: boolean;
|
|
335
353
|
};
|
|
336
354
|
/**
|
|
337
355
|
* query filter options.
|
|
338
356
|
*/
|
|
339
|
-
export type
|
|
357
|
+
export type QueryWhereOptions = QueryComparisonOptions & {
|
|
340
358
|
/**
|
|
341
359
|
* clause to be used in the filter.
|
|
342
360
|
*/
|
|
343
|
-
|
|
361
|
+
clause?: 'WHERE' | false;
|
|
344
362
|
};
|
|
363
|
+
export interface QueryContext {
|
|
364
|
+
append(sql: string): this;
|
|
365
|
+
addValue(value: unknown): this;
|
|
366
|
+
pushValue(value: unknown): this;
|
|
367
|
+
readonly sql: string;
|
|
368
|
+
readonly values: unknown[];
|
|
369
|
+
}
|
|
345
370
|
export interface QueryDialect {
|
|
346
371
|
/**
|
|
347
|
-
*
|
|
372
|
+
* obtains the records matching the given search parameters.
|
|
373
|
+
* @param ctx the query context
|
|
348
374
|
* @param entity the target entity
|
|
349
|
-
* @param
|
|
375
|
+
* @param q the criteria options
|
|
350
376
|
* @param opts the query options
|
|
351
377
|
*/
|
|
352
|
-
|
|
378
|
+
find<E>(ctx: QueryContext, entity: Type<E>, q: Query<E>, opts?: QueryOptions): void;
|
|
353
379
|
/**
|
|
354
|
-
*
|
|
380
|
+
* counts the number of records matching the given search parameters.
|
|
381
|
+
* @param ctx the query context
|
|
355
382
|
* @param entity the target entity
|
|
356
|
-
* @param
|
|
383
|
+
* @param q the criteria options
|
|
357
384
|
* @param opts the query options
|
|
358
385
|
*/
|
|
359
|
-
|
|
386
|
+
count<E>(ctx: QueryContext, entity: Type<E>, q: QuerySearch<E>, opts?: QueryOptions): void;
|
|
360
387
|
/**
|
|
361
|
-
*
|
|
388
|
+
* insert records.
|
|
389
|
+
* @param ctx the query context
|
|
362
390
|
* @param entity the target entity
|
|
363
|
-
* @param
|
|
391
|
+
* @param payload the payload
|
|
364
392
|
* @param opts the query options
|
|
365
393
|
*/
|
|
366
|
-
insert<E>(entity: Type<E>, payload: E |
|
|
394
|
+
insert<E>(ctx: QueryContext, entity: Type<E>, payload: E | E[], opts?: QueryOptions): void;
|
|
367
395
|
/**
|
|
368
396
|
* update records.
|
|
397
|
+
* @param ctx the query context
|
|
369
398
|
* @param entity the target entity
|
|
370
|
-
* @param
|
|
399
|
+
* @param q the criteria options
|
|
371
400
|
* @param payload
|
|
372
401
|
* @param opts the query options
|
|
373
402
|
*/
|
|
374
|
-
update<E>(entity: Type<E>,
|
|
403
|
+
update<E>(ctx: QueryContext, entity: Type<E>, q: QuerySearch<E>, payload: E, opts?: QueryOptions): void;
|
|
404
|
+
/**
|
|
405
|
+
* upsert records.
|
|
406
|
+
* @param ctx the query context
|
|
407
|
+
* @param entity the target entity
|
|
408
|
+
* @param conflictPaths the conflict paths
|
|
409
|
+
* @param payload
|
|
410
|
+
*/
|
|
411
|
+
upsert<E>(ctx: QueryContext, entity: Type<E>, conflictPaths: QueryConflictPaths<E>, payload: E): void;
|
|
375
412
|
/**
|
|
376
413
|
* delete records.
|
|
414
|
+
* @param ctx the query context
|
|
377
415
|
* @param entity the target entity
|
|
378
|
-
* @param
|
|
416
|
+
* @param q the criteria options
|
|
379
417
|
* @param opts the query options
|
|
380
418
|
*/
|
|
381
|
-
delete<E>(entity: Type<E>,
|
|
419
|
+
delete<E>(ctx: QueryContext, entity: Type<E>, q: QuerySearch<E>, opts?: QueryOptions): void;
|
|
382
420
|
/**
|
|
383
421
|
* escape an identifier.
|
|
384
422
|
* @param val the value to be escaped
|
|
@@ -390,5 +428,29 @@ export interface QueryDialect {
|
|
|
390
428
|
* escape a value.
|
|
391
429
|
* @param val the value to escape
|
|
392
430
|
*/
|
|
393
|
-
escape(val:
|
|
431
|
+
escape(val: unknown): string;
|
|
432
|
+
/**
|
|
433
|
+
* add a value to the query.
|
|
434
|
+
* @param values the values array
|
|
435
|
+
* @param value the value to add
|
|
436
|
+
*/
|
|
437
|
+
addValue(values: unknown[], value: unknown): string;
|
|
438
|
+
/**
|
|
439
|
+
* create a new query context.
|
|
440
|
+
*/
|
|
441
|
+
createContext(): QueryContext;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Minimal dialect interface exposing escapeIdChar for SQL operations
|
|
445
|
+
*/
|
|
446
|
+
export interface SqlQueryDialect extends QueryDialect {
|
|
447
|
+
/**
|
|
448
|
+
* the escape character for identifiers.
|
|
449
|
+
*/
|
|
450
|
+
readonly escapeIdChar: '"' | '`';
|
|
451
|
+
/**
|
|
452
|
+
* Get the placeholder for a parameter at the given index (1-based).
|
|
453
|
+
* Default: '?' for MySQL/MariaDB/SQLite, '$n' for PostgreSQL.
|
|
454
|
+
*/
|
|
455
|
+
placeholder(index: number): string;
|
|
394
456
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export class QueryRaw {
|
|
2
|
+
value;
|
|
3
|
+
alias;
|
|
4
|
+
constructor(value, alias) {
|
|
5
|
+
this.value = value;
|
|
6
|
+
this.alias = alias;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnkuanMiLCJzb3VyY2VSb290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