kysely 0.11.2 → 0.12.1
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 +1 -1
- package/dist/cjs/dialect/dialect-adapter-base.d.ts +36 -0
- package/dist/cjs/dialect/mysql/mysql-adapter.d.ts +36 -0
- package/dist/cjs/dialect/mysql/mysql-dialect.d.ts +16 -0
- package/dist/cjs/dialect/mysql/mysql-driver.d.ts +29 -0
- package/dist/cjs/dialect/mysql/mysql-introspector.d.ts +3 -0
- package/dist/cjs/dialect/mysql/mysql-query-compiler.d.ts +0 -2
- package/dist/cjs/dialect/mysql/mysql-query-compiler.js +0 -6
- package/dist/cjs/dialect/postgres/postgres-adapter.d.ts +36 -0
- package/dist/cjs/dialect/postgres/postgres-dialect.d.ts +16 -0
- package/dist/cjs/dialect/postgres/postgres-driver.d.ts +29 -0
- package/dist/cjs/dialect/postgres/postgres-introspector.d.ts +3 -0
- package/dist/cjs/dialect/postgres/postgres-query-compiler.d.ts +3 -0
- package/dist/cjs/dialect/postgres/postgres-query-compiler.js +9 -1
- package/dist/cjs/dialect/sqlite/sqlite-adapter.d.ts +36 -0
- package/dist/cjs/dialect/sqlite/sqlite-adapter.js +6 -2
- package/dist/cjs/dialect/sqlite/sqlite-dialect.d.ts +16 -0
- package/dist/cjs/dialect/sqlite/sqlite-driver.d.ts +29 -0
- package/dist/cjs/dialect/sqlite/sqlite-introspector.d.ts +3 -0
- package/dist/cjs/dialect/sqlite/sqlite-query-compiler.d.ts +2 -2
- package/dist/cjs/dialect/sqlite/sqlite-query-compiler.js +6 -6
- package/dist/cjs/driver/default-connection-provider.d.ts +4 -0
- package/dist/cjs/driver/runtime-driver.d.ts +29 -0
- package/dist/cjs/driver/runtime-driver.js +1 -1
- package/dist/cjs/driver/single-connection-provider.d.ts +4 -0
- package/dist/cjs/dynamic/dynamic-reference-builder.d.ts +1 -0
- package/dist/cjs/dynamic/dynamic-reference-builder.js +9 -1
- package/dist/cjs/dynamic/dynamic.d.ts +6 -7
- package/dist/cjs/dynamic/dynamic.js +6 -7
- package/dist/cjs/index.d.ts +14 -3
- package/dist/cjs/index.js +12 -1
- package/dist/cjs/kysely.d.ts +39 -15
- package/dist/cjs/kysely.js +32 -9
- package/dist/cjs/migration/migration.d.ts +2 -2
- package/dist/cjs/operation-node/create-table-node.d.ts +6 -2
- package/dist/cjs/operation-node/create-table-node.js +6 -6
- package/dist/cjs/operation-node/create-view-node.d.ts +1 -0
- package/dist/cjs/operation-node/insert-query-node.d.ts +4 -4
- package/dist/cjs/operation-node/operation-node-transformer.d.ts +2 -0
- package/dist/cjs/operation-node/operation-node-transformer.js +11 -1
- package/dist/cjs/operation-node/operation-node-visitor.d.ts +2 -0
- package/dist/cjs/operation-node/operation-node-visitor.js +1 -0
- package/dist/cjs/operation-node/operation-node.d.ts +1 -1
- package/dist/cjs/operation-node/query-node.d.ts +0 -2
- package/dist/cjs/operation-node/query-node.js +0 -10
- package/dist/cjs/operation-node/values-node.d.ts +15 -0
- package/dist/cjs/operation-node/values-node.js +18 -0
- package/dist/cjs/package.json +1 -3
- package/dist/cjs/parser/complex-expression-parser.d.ts +9 -0
- package/dist/cjs/parser/complex-expression-parser.js +25 -0
- package/dist/cjs/parser/filter-parser.d.ts +13 -4
- package/dist/cjs/parser/filter-parser.js +21 -24
- package/dist/cjs/parser/insert-values-parser.d.ts +7 -10
- package/dist/cjs/parser/insert-values-parser.js +31 -39
- package/dist/cjs/parser/order-by-parser.d.ts +1 -1
- package/dist/cjs/parser/parse-context.d.ts +22 -8
- package/dist/cjs/parser/parse-context.js +10 -10
- package/dist/cjs/parser/reference-parser.d.ts +8 -7
- package/dist/cjs/parser/reference-parser.js +8 -17
- package/dist/cjs/parser/returning-parser.d.ts +1 -5
- package/dist/cjs/parser/select-parser.d.ts +12 -14
- package/dist/cjs/parser/select-parser.js +5 -9
- package/dist/cjs/parser/table-parser.d.ts +9 -11
- package/dist/cjs/parser/table-parser.js +2 -8
- package/dist/cjs/parser/union-parser.d.ts +2 -2
- package/dist/cjs/parser/union-parser.js +1 -6
- package/dist/cjs/parser/update-set-parser.d.ts +2 -8
- package/dist/cjs/parser/update-set-parser.js +6 -26
- package/dist/cjs/parser/value-parser.d.ts +9 -6
- package/dist/cjs/parser/value-parser.js +7 -30
- package/dist/cjs/parser/with-parser.d.ts +6 -3
- package/dist/cjs/plugin/camel-case/camel-case-plugin.d.ts +34 -0
- package/dist/cjs/plugin/immediate-value.ts/immediate-value-plugin.d.ts +34 -0
- package/dist/cjs/plugin/immediate-value.ts/immediate-value-plugin.js +2 -2
- package/dist/cjs/plugin/with-schema/with-schema-plugin.d.ts +34 -0
- package/dist/cjs/query-builder/delete-query-builder.d.ts +647 -0
- package/dist/cjs/query-builder/delete-query-builder.js +185 -0
- package/dist/cjs/query-builder/expression-builder.d.ts +8 -6
- package/dist/cjs/query-builder/expression-builder.js +3 -3
- package/dist/cjs/query-builder/function-builder.d.ts +2 -1
- package/dist/cjs/query-builder/function-builder.js +2 -1
- package/dist/cjs/query-builder/having-interface.d.ts +49 -0
- package/dist/cjs/query-builder/having-interface.js +2 -0
- package/dist/cjs/query-builder/insert-query-builder.d.ts +504 -0
- package/dist/cjs/query-builder/insert-query-builder.js +256 -0
- package/dist/cjs/query-builder/insert-result.d.ts +3 -2
- package/dist/cjs/query-builder/insert-result.js +3 -2
- package/dist/cjs/query-builder/join-builder.d.ts +19 -20
- package/dist/cjs/query-builder/join-builder.js +12 -12
- package/dist/cjs/query-builder/join-interface.d.ts +130 -0
- package/dist/cjs/query-builder/join-interface.js +2 -0
- package/dist/cjs/query-builder/no-result-error.d.ts +9 -0
- package/dist/cjs/query-builder/no-result-error.js +14 -0
- package/dist/cjs/query-builder/returning-interface.d.ts +73 -0
- package/dist/cjs/query-builder/returning-interface.js +2 -0
- package/dist/cjs/query-builder/{query-builder.d.ts → select-query-builder.d.ts} +145 -634
- package/dist/cjs/query-builder/select-query-builder.js +571 -0
- package/dist/cjs/query-builder/update-query-builder.d.ts +735 -0
- package/dist/cjs/query-builder/update-query-builder.js +279 -0
- package/dist/cjs/query-builder/where-interface.d.ts +378 -0
- package/dist/cjs/query-builder/where-interface.js +2 -0
- package/dist/cjs/query-compiler/default-query-compiler.d.ts +2 -0
- package/dist/cjs/query-compiler/default-query-compiler.js +22 -5
- package/dist/cjs/query-creator.d.ts +42 -40
- package/dist/cjs/query-creator.js +33 -28
- package/dist/cjs/query-executor/query-executor.d.ts +1 -1
- package/dist/cjs/query-executor/query-executor.js +1 -1
- package/dist/cjs/raw-builder/raw-builder.d.ts +2 -0
- package/dist/cjs/raw-builder/raw-builder.js +6 -0
- package/dist/cjs/schema/alter-table-builder.d.ts +218 -2
- package/dist/cjs/schema/column-definition-builder.d.ts +135 -20
- package/dist/cjs/schema/create-index-builder.d.ts +2 -1
- package/dist/cjs/schema/create-index-builder.js +2 -1
- package/dist/cjs/schema/create-table-builder.d.ts +26 -9
- package/dist/cjs/schema/create-table-builder.js +42 -9
- package/dist/cjs/schema/create-view-builder.d.ts +17 -3
- package/dist/cjs/schema/create-view-builder.js +25 -16
- package/dist/cjs/schema/schema.d.ts +18 -11
- package/dist/cjs/schema/schema.js +18 -11
- package/dist/cjs/util/log.d.ts +11 -8
- package/dist/cjs/util/log.js +25 -12
- package/dist/cjs/util/type-utils.d.ts +7 -7
- package/dist/esm/dialect/dialect-adapter-base.d.ts +36 -0
- package/dist/esm/dialect/mysql/mysql-adapter.d.ts +36 -0
- package/dist/esm/dialect/mysql/mysql-dialect.d.ts +16 -0
- package/dist/esm/dialect/mysql/mysql-driver.d.ts +29 -0
- package/dist/esm/dialect/mysql/mysql-introspector.d.ts +3 -0
- package/dist/esm/dialect/mysql/mysql-query-compiler.d.ts +0 -2
- package/dist/esm/dialect/mysql/mysql-query-compiler.js +0 -6
- package/dist/esm/dialect/postgres/postgres-adapter.d.ts +36 -0
- package/dist/esm/dialect/postgres/postgres-dialect.d.ts +16 -0
- package/dist/esm/dialect/postgres/postgres-driver.d.ts +29 -0
- package/dist/esm/dialect/postgres/postgres-introspector.d.ts +3 -0
- package/dist/esm/dialect/postgres/postgres-query-compiler.d.ts +3 -0
- package/dist/esm/dialect/postgres/postgres-query-compiler.js +9 -1
- package/dist/esm/dialect/sqlite/sqlite-adapter.d.ts +36 -0
- package/dist/esm/dialect/sqlite/sqlite-adapter.js +6 -2
- package/dist/esm/dialect/sqlite/sqlite-dialect.d.ts +16 -0
- package/dist/esm/dialect/sqlite/sqlite-driver.d.ts +29 -0
- package/dist/esm/dialect/sqlite/sqlite-introspector.d.ts +3 -0
- package/dist/esm/dialect/sqlite/sqlite-query-compiler.d.ts +2 -2
- package/dist/esm/dialect/sqlite/sqlite-query-compiler.js +6 -6
- package/dist/esm/driver/default-connection-provider.d.ts +4 -0
- package/dist/esm/driver/runtime-driver.d.ts +29 -0
- package/dist/esm/driver/runtime-driver.js +1 -1
- package/dist/esm/driver/single-connection-provider.d.ts +4 -0
- package/dist/esm/dynamic/dynamic-reference-builder.d.ts +1 -0
- package/dist/esm/dynamic/dynamic-reference-builder.js +7 -0
- package/dist/esm/dynamic/dynamic.d.ts +6 -7
- package/dist/esm/dynamic/dynamic.js +6 -7
- package/dist/esm/index.d.ts +14 -3
- package/dist/esm/index.js +12 -1
- package/dist/esm/kysely.d.ts +39 -15
- package/dist/esm/kysely.js +32 -9
- package/dist/esm/migration/migration.d.ts +2 -2
- package/dist/esm/operation-node/create-table-node.d.ts +6 -2
- package/dist/esm/operation-node/create-table-node.js +6 -6
- package/dist/esm/operation-node/create-view-node.d.ts +1 -0
- package/dist/esm/operation-node/insert-query-node.d.ts +4 -4
- package/dist/esm/operation-node/operation-node-transformer.d.ts +2 -0
- package/dist/esm/operation-node/operation-node-transformer.js +11 -1
- package/dist/esm/operation-node/operation-node-visitor.d.ts +2 -0
- package/dist/esm/operation-node/operation-node-visitor.js +1 -0
- package/dist/esm/operation-node/operation-node.d.ts +1 -1
- package/dist/esm/operation-node/query-node.d.ts +0 -2
- package/dist/esm/operation-node/query-node.js +0 -10
- package/dist/esm/operation-node/values-node.d.ts +15 -0
- package/dist/esm/operation-node/values-node.js +15 -0
- package/dist/esm/package.json +1 -3
- package/dist/esm/parser/complex-expression-parser.d.ts +9 -0
- package/dist/esm/parser/complex-expression-parser.js +20 -0
- package/dist/esm/parser/filter-parser.d.ts +13 -4
- package/dist/esm/parser/filter-parser.js +21 -24
- package/dist/esm/parser/insert-values-parser.d.ts +7 -10
- package/dist/esm/parser/insert-values-parser.js +31 -38
- package/dist/esm/parser/order-by-parser.d.ts +1 -1
- package/dist/esm/parser/parse-context.d.ts +22 -8
- package/dist/esm/parser/parse-context.js +10 -10
- package/dist/esm/parser/reference-parser.d.ts +8 -7
- package/dist/esm/parser/reference-parser.js +9 -18
- package/dist/esm/parser/returning-parser.d.ts +1 -5
- package/dist/esm/parser/select-parser.d.ts +12 -14
- package/dist/esm/parser/select-parser.js +6 -10
- package/dist/esm/parser/table-parser.d.ts +9 -11
- package/dist/esm/parser/table-parser.js +3 -9
- package/dist/esm/parser/union-parser.d.ts +2 -2
- package/dist/esm/parser/union-parser.js +1 -6
- package/dist/esm/parser/update-set-parser.d.ts +2 -8
- package/dist/esm/parser/update-set-parser.js +5 -24
- package/dist/esm/parser/value-parser.d.ts +9 -6
- package/dist/esm/parser/value-parser.js +8 -31
- package/dist/esm/parser/with-parser.d.ts +6 -3
- package/dist/esm/plugin/camel-case/camel-case-plugin.d.ts +34 -0
- package/dist/esm/plugin/immediate-value.ts/immediate-value-plugin.d.ts +34 -0
- package/dist/esm/plugin/immediate-value.ts/immediate-value-plugin.js +2 -2
- package/dist/esm/plugin/with-schema/with-schema-plugin.d.ts +34 -0
- package/dist/esm/query-builder/delete-query-builder.d.ts +647 -0
- package/dist/esm/query-builder/delete-query-builder.js +181 -0
- package/dist/esm/query-builder/expression-builder.d.ts +8 -6
- package/dist/esm/query-builder/expression-builder.js +3 -3
- package/dist/esm/query-builder/function-builder.d.ts +2 -1
- package/dist/esm/query-builder/function-builder.js +2 -1
- package/dist/esm/query-builder/having-interface.d.ts +49 -0
- package/dist/esm/query-builder/having-interface.js +1 -0
- package/dist/esm/query-builder/insert-query-builder.d.ts +504 -0
- package/dist/esm/query-builder/insert-query-builder.js +252 -0
- package/dist/esm/query-builder/insert-result.d.ts +3 -2
- package/dist/esm/query-builder/insert-result.js +3 -2
- package/dist/esm/query-builder/join-builder.d.ts +19 -20
- package/dist/esm/query-builder/join-builder.js +12 -12
- package/dist/esm/query-builder/join-interface.d.ts +130 -0
- package/dist/esm/query-builder/join-interface.js +1 -0
- package/dist/esm/query-builder/no-result-error.d.ts +9 -0
- package/dist/esm/query-builder/no-result-error.js +10 -0
- package/dist/esm/query-builder/returning-interface.d.ts +73 -0
- package/dist/esm/query-builder/returning-interface.js +1 -0
- package/dist/esm/query-builder/{query-builder.d.ts → select-query-builder.d.ts} +145 -634
- package/dist/esm/query-builder/select-query-builder.js +566 -0
- package/dist/esm/query-builder/update-query-builder.d.ts +735 -0
- package/dist/esm/query-builder/update-query-builder.js +275 -0
- package/dist/esm/query-builder/where-interface.d.ts +378 -0
- package/dist/esm/query-builder/where-interface.js +1 -0
- package/dist/esm/query-compiler/default-query-compiler.d.ts +2 -0
- package/dist/esm/query-compiler/default-query-compiler.js +22 -5
- package/dist/esm/query-creator.d.ts +42 -40
- package/dist/esm/query-creator.js +33 -28
- package/dist/esm/query-executor/query-executor.d.ts +1 -1
- package/dist/esm/query-executor/query-executor.js +1 -1
- package/dist/esm/raw-builder/raw-builder.d.ts +2 -0
- package/dist/esm/raw-builder/raw-builder.js +6 -0
- package/dist/esm/schema/alter-table-builder.d.ts +218 -2
- package/dist/esm/schema/column-definition-builder.d.ts +135 -20
- package/dist/esm/schema/create-index-builder.d.ts +2 -1
- package/dist/esm/schema/create-index-builder.js +2 -1
- package/dist/esm/schema/create-table-builder.d.ts +26 -9
- package/dist/esm/schema/create-table-builder.js +43 -10
- package/dist/esm/schema/create-view-builder.d.ts +17 -3
- package/dist/esm/schema/create-view-builder.js +25 -16
- package/dist/esm/schema/schema.d.ts +18 -11
- package/dist/esm/schema/schema.js +18 -11
- package/dist/esm/util/log.d.ts +11 -8
- package/dist/esm/util/log.js +25 -12
- package/dist/esm/util/type-utils.d.ts +7 -7
- package/package.json +9 -7
- package/dist/cjs/query-builder/query-builder.js +0 -1067
- package/dist/esm/query-builder/query-builder.js +0 -1061
|
@@ -4,11 +4,40 @@ import { MysqlDialectConfig } from './mysql-dialect.js';
|
|
|
4
4
|
export declare class MysqlDriver implements Driver {
|
|
5
5
|
#private;
|
|
6
6
|
constructor(config: MysqlDialectConfig);
|
|
7
|
+
/**
|
|
8
|
+
* Initializes the driver.
|
|
9
|
+
*
|
|
10
|
+
* After calling this method the driver should be usable and `acquireConnection` etc.
|
|
11
|
+
* methods should be callable.
|
|
12
|
+
*
|
|
13
|
+
* IMPORTANT: The underlying database engine driver (like [pg](https://node-postgres.com/))
|
|
14
|
+
* should be imported inside this function, not at the top of the driver file! This is
|
|
15
|
+
* important so that Kysely is usable without installing all database driver libraries
|
|
16
|
+
* it supports.
|
|
17
|
+
*/
|
|
7
18
|
init(): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Acquires a new connection from the pool.
|
|
21
|
+
*/
|
|
8
22
|
acquireConnection(): Promise<DatabaseConnection>;
|
|
23
|
+
/**
|
|
24
|
+
* Begins a transaction.
|
|
25
|
+
*/
|
|
9
26
|
beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Commits a transaction.
|
|
29
|
+
*/
|
|
10
30
|
commitTransaction(connection: DatabaseConnection): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Rolls back a transaction.
|
|
33
|
+
*/
|
|
11
34
|
rollbackTransaction(connection: DatabaseConnection): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Releases a connection back to the pool.
|
|
37
|
+
*/
|
|
12
38
|
releaseConnection(connection: DatabaseConnection): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Destroys the driver and releases all resources.
|
|
41
|
+
*/
|
|
13
42
|
destroy(): Promise<void>;
|
|
14
43
|
}
|
|
@@ -3,5 +3,8 @@ import { Kysely } from '../../kysely.js';
|
|
|
3
3
|
export declare class MysqlIntrospector implements DatabaseIntrospector {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(db: Kysely<any>);
|
|
6
|
+
/**
|
|
7
|
+
* Get the database metadata such as the names of the tables and columns.
|
|
8
|
+
*/
|
|
6
9
|
getMetadata(options?: DatabaseMetadataOptions): Promise<DatabaseMetadata>;
|
|
7
10
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js';
|
|
2
2
|
export declare class MysqlQueryCompiler extends DefaultQueryCompiler {
|
|
3
|
-
protected visitReturning(): void;
|
|
4
|
-
protected getSql(): string;
|
|
5
3
|
protected getCurrentParameterPlaceholder(): string;
|
|
6
4
|
protected getLeftIdentifierWrapper(): string;
|
|
7
5
|
protected getRightIdentifierWrapper(): string;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js';
|
|
2
2
|
export class MysqlQueryCompiler extends DefaultQueryCompiler {
|
|
3
|
-
visitReturning() {
|
|
4
|
-
// Do nothing.
|
|
5
|
-
}
|
|
6
|
-
getSql() {
|
|
7
|
-
return super.getSql().trimEnd();
|
|
8
|
-
}
|
|
9
3
|
getCurrentParameterPlaceholder() {
|
|
10
4
|
return '?';
|
|
11
5
|
}
|
|
@@ -1,8 +1,44 @@
|
|
|
1
1
|
import { Kysely } from '../../kysely.js';
|
|
2
2
|
import { DialectAdapter } from '../dialect-adapter.js';
|
|
3
3
|
export declare class PostgresAdapter implements DialectAdapter {
|
|
4
|
+
/**
|
|
5
|
+
* Whether or not this dialect supports transactional DDL.
|
|
6
|
+
*
|
|
7
|
+
* If this is true, migrations are executed inside a transaction.
|
|
8
|
+
*/
|
|
4
9
|
get supportsTransactionalDdl(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Whether or not this dialect supports the `returning` in inserts
|
|
12
|
+
* updates and deletes.
|
|
13
|
+
*/
|
|
5
14
|
get supportsReturning(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* This method is used to acquire a lock for the migrations so that
|
|
17
|
+
* it's not possible for two migration processes to run in parallel.
|
|
18
|
+
*
|
|
19
|
+
* Most dialects have explicit locks that can be used, like advisory locks
|
|
20
|
+
* in PostgreSQL and the get_lock function in MySQL.
|
|
21
|
+
*
|
|
22
|
+
* If the dialect doesn't have explicit locks the {@link MIGRATION_LOCK_TABLE}
|
|
23
|
+
* created by Kysely can be used instead. {@link MIGRATION_LOCK_TABLE}
|
|
24
|
+
* has two columns `id` and `is_locked` and there's only one row in the
|
|
25
|
+
* table whose id is {@link MIGRATION_LOCK_ID}. `is_locked` is an integer.
|
|
26
|
+
* Kysely takes care of creating the lock table and inserting the one single
|
|
27
|
+
* row to it before this method is executed.
|
|
28
|
+
*
|
|
29
|
+
* If `supportsTransactionalDdl` is `true` then the `db` passed to this method
|
|
30
|
+
* is a transaction inside which the migrations will be executed. Otherwise
|
|
31
|
+
* `db` is a single connection (session) that will be used to execute the
|
|
32
|
+
* migrations.
|
|
33
|
+
*/
|
|
6
34
|
acquireMigrationLock(db: Kysely<any>): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Releases the migration lock. See {@link acquireMigrationLock}.
|
|
37
|
+
*
|
|
38
|
+
* If `supportsTransactionalDdl` is `true` then the `db` passed to this method
|
|
39
|
+
* is a transaction inside which the migrations were executed. Otherwise `db`
|
|
40
|
+
* is a single connection (session) that was used to execute the migrations
|
|
41
|
+
* and the `acquireMigrationLock` call.
|
|
42
|
+
*/
|
|
7
43
|
releaseMigrationLock(): Promise<void>;
|
|
8
44
|
}
|
|
@@ -21,9 +21,25 @@ import { DatabaseConnection } from '../../driver/database-connection.js';
|
|
|
21
21
|
export declare class PostgresDialect implements Dialect {
|
|
22
22
|
#private;
|
|
23
23
|
constructor(config: PostgresDialectConfig);
|
|
24
|
+
/**
|
|
25
|
+
* Creates a driver for the dialect.
|
|
26
|
+
*/
|
|
24
27
|
createDriver(): Driver;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a query compiler for the dialect.
|
|
30
|
+
*/
|
|
25
31
|
createQueryCompiler(): QueryCompiler;
|
|
32
|
+
/**
|
|
33
|
+
* Creates an adapter for the dialect.
|
|
34
|
+
*/
|
|
26
35
|
createAdapter(): DialectAdapter;
|
|
36
|
+
/**
|
|
37
|
+
* Creates a database introspector that can be used to get the database metadata
|
|
38
|
+
* such as the tables and columns that exist in the database.
|
|
39
|
+
*
|
|
40
|
+
* `db` never has any plugins installed. It's created using
|
|
41
|
+
* {@link Kysely.withoutPlugins}.
|
|
42
|
+
*/
|
|
27
43
|
createIntrospector(db: Kysely<any>): DatabaseIntrospector;
|
|
28
44
|
}
|
|
29
45
|
/**
|
|
@@ -4,11 +4,40 @@ import { PostgresDialectConfig } from './postgres-dialect.js';
|
|
|
4
4
|
export declare class PostgresDriver implements Driver {
|
|
5
5
|
#private;
|
|
6
6
|
constructor(config: PostgresDialectConfig);
|
|
7
|
+
/**
|
|
8
|
+
* Initializes the driver.
|
|
9
|
+
*
|
|
10
|
+
* After calling this method the driver should be usable and `acquireConnection` etc.
|
|
11
|
+
* methods should be callable.
|
|
12
|
+
*
|
|
13
|
+
* IMPORTANT: The underlying database engine driver (like [pg](https://node-postgres.com/))
|
|
14
|
+
* should be imported inside this function, not at the top of the driver file! This is
|
|
15
|
+
* important so that Kysely is usable without installing all database driver libraries
|
|
16
|
+
* it supports.
|
|
17
|
+
*/
|
|
7
18
|
init(): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Acquires a new connection from the pool.
|
|
21
|
+
*/
|
|
8
22
|
acquireConnection(): Promise<DatabaseConnection>;
|
|
23
|
+
/**
|
|
24
|
+
* Begins a transaction.
|
|
25
|
+
*/
|
|
9
26
|
beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Commits a transaction.
|
|
29
|
+
*/
|
|
10
30
|
commitTransaction(connection: DatabaseConnection): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Rolls back a transaction.
|
|
33
|
+
*/
|
|
11
34
|
rollbackTransaction(connection: DatabaseConnection): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Releases a connection back to the pool.
|
|
37
|
+
*/
|
|
12
38
|
releaseConnection(connection: DatabaseConnection): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Destroys the driver and releases all resources.
|
|
41
|
+
*/
|
|
13
42
|
destroy(): Promise<void>;
|
|
14
43
|
}
|
|
@@ -3,5 +3,8 @@ import { Kysely } from '../../kysely.js';
|
|
|
3
3
|
export declare class PostgresIntrospector implements DatabaseIntrospector {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(db: Kysely<any>);
|
|
6
|
+
/**
|
|
7
|
+
* Get the database metadata such as the names of the tables and columns.
|
|
8
|
+
*/
|
|
6
9
|
getMetadata(options?: DatabaseMetadataOptions): Promise<DatabaseMetadata>;
|
|
7
10
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js';
|
|
2
2
|
export declare class PostgresQueryCompiler extends DefaultQueryCompiler {
|
|
3
|
+
protected getCurrentParameterPlaceholder(): string;
|
|
4
|
+
protected getLeftIdentifierWrapper(): string;
|
|
5
|
+
protected getRightIdentifierWrapper(): string;
|
|
3
6
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js';
|
|
2
|
-
// The default query compiler is for PostgreSQL.
|
|
3
2
|
export class PostgresQueryCompiler extends DefaultQueryCompiler {
|
|
3
|
+
getCurrentParameterPlaceholder() {
|
|
4
|
+
return '$' + this.numParameters;
|
|
5
|
+
}
|
|
6
|
+
getLeftIdentifierWrapper() {
|
|
7
|
+
return '"';
|
|
8
|
+
}
|
|
9
|
+
getRightIdentifierWrapper() {
|
|
10
|
+
return '"';
|
|
11
|
+
}
|
|
4
12
|
}
|
|
@@ -1,7 +1,43 @@
|
|
|
1
1
|
import { DialectAdapter } from '../dialect-adapter.js';
|
|
2
2
|
export declare class SqliteAdapter implements DialectAdapter {
|
|
3
|
+
/**
|
|
4
|
+
* Whether or not this dialect supports transactional DDL.
|
|
5
|
+
*
|
|
6
|
+
* If this is true, migrations are executed inside a transaction.
|
|
7
|
+
*/
|
|
3
8
|
get supportsTransactionalDdl(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether or not this dialect supports the `returning` in inserts
|
|
11
|
+
* updates and deletes.
|
|
12
|
+
*/
|
|
4
13
|
get supportsReturning(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* This method is used to acquire a lock for the migrations so that
|
|
16
|
+
* it's not possible for two migration processes to run in parallel.
|
|
17
|
+
*
|
|
18
|
+
* Most dialects have explicit locks that can be used, like advisory locks
|
|
19
|
+
* in PostgreSQL and the get_lock function in MySQL.
|
|
20
|
+
*
|
|
21
|
+
* If the dialect doesn't have explicit locks the {@link MIGRATION_LOCK_TABLE}
|
|
22
|
+
* created by Kysely can be used instead. {@link MIGRATION_LOCK_TABLE}
|
|
23
|
+
* has two columns `id` and `is_locked` and there's only one row in the
|
|
24
|
+
* table whose id is {@link MIGRATION_LOCK_ID}. `is_locked` is an integer.
|
|
25
|
+
* Kysely takes care of creating the lock table and inserting the one single
|
|
26
|
+
* row to it before this method is executed.
|
|
27
|
+
*
|
|
28
|
+
* If `supportsTransactionalDdl` is `true` then the `db` passed to this method
|
|
29
|
+
* is a transaction inside which the migrations will be executed. Otherwise
|
|
30
|
+
* `db` is a single connection (session) that will be used to execute the
|
|
31
|
+
* migrations.
|
|
32
|
+
*/
|
|
5
33
|
acquireMigrationLock(): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Releases the migration lock. See {@link acquireMigrationLock}.
|
|
36
|
+
*
|
|
37
|
+
* If `supportsTransactionalDdl` is `true` then the `db` passed to this method
|
|
38
|
+
* is a transaction inside which the migrations were executed. Otherwise `db`
|
|
39
|
+
* is a single connection (session) that was used to execute the migrations
|
|
40
|
+
* and the `acquireMigrationLock` call.
|
|
41
|
+
*/
|
|
6
42
|
releaseMigrationLock(): Promise<void>;
|
|
7
43
|
}
|
|
@@ -6,9 +6,13 @@ export class SqliteAdapter {
|
|
|
6
6
|
return false;
|
|
7
7
|
}
|
|
8
8
|
async acquireMigrationLock() {
|
|
9
|
-
//
|
|
9
|
+
// SQLite only has one connection that's reserved by the migration system
|
|
10
|
+
// for the whole time between acquireMigrationLock and releaseMigrationLock.
|
|
11
|
+
// We don't need to do anything here.
|
|
10
12
|
}
|
|
11
13
|
async releaseMigrationLock() {
|
|
12
|
-
//
|
|
14
|
+
// SQLite only has one connection that's reserved by the migration system
|
|
15
|
+
// for the whole time between acquireMigrationLock and releaseMigrationLock.
|
|
16
|
+
// We don't need to do anything here.
|
|
13
17
|
}
|
|
14
18
|
}
|
|
@@ -15,9 +15,25 @@ import { DatabaseConnection } from '../../driver/database-connection.js';
|
|
|
15
15
|
export declare class SqliteDialect implements Dialect {
|
|
16
16
|
#private;
|
|
17
17
|
constructor(config: SqliteDialectConfig);
|
|
18
|
+
/**
|
|
19
|
+
* Creates a driver for the dialect.
|
|
20
|
+
*/
|
|
18
21
|
createDriver(): Driver;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a query compiler for the dialect.
|
|
24
|
+
*/
|
|
19
25
|
createQueryCompiler(): QueryCompiler;
|
|
26
|
+
/**
|
|
27
|
+
* Creates an adapter for the dialect.
|
|
28
|
+
*/
|
|
20
29
|
createAdapter(): DialectAdapter;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a database introspector that can be used to get the database metadata
|
|
32
|
+
* such as the tables and columns that exist in the database.
|
|
33
|
+
*
|
|
34
|
+
* `db` never has any plugins installed. It's created using
|
|
35
|
+
* {@link Kysely.withoutPlugins}.
|
|
36
|
+
*/
|
|
21
37
|
createIntrospector(db: Kysely<any>): DatabaseIntrospector;
|
|
22
38
|
}
|
|
23
39
|
/**
|
|
@@ -4,11 +4,40 @@ import { SqliteDialectConfig } from './sqlite-dialect.js';
|
|
|
4
4
|
export declare class SqliteDriver implements Driver {
|
|
5
5
|
#private;
|
|
6
6
|
constructor(config: SqliteDialectConfig);
|
|
7
|
+
/**
|
|
8
|
+
* Initializes the driver.
|
|
9
|
+
*
|
|
10
|
+
* After calling this method the driver should be usable and `acquireConnection` etc.
|
|
11
|
+
* methods should be callable.
|
|
12
|
+
*
|
|
13
|
+
* IMPORTANT: The underlying database engine driver (like [pg](https://node-postgres.com/))
|
|
14
|
+
* should be imported inside this function, not at the top of the driver file! This is
|
|
15
|
+
* important so that Kysely is usable without installing all database driver libraries
|
|
16
|
+
* it supports.
|
|
17
|
+
*/
|
|
7
18
|
init(): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Acquires a new connection from the pool.
|
|
21
|
+
*/
|
|
8
22
|
acquireConnection(): Promise<DatabaseConnection>;
|
|
23
|
+
/**
|
|
24
|
+
* Begins a transaction.
|
|
25
|
+
*/
|
|
9
26
|
beginTransaction(connection: DatabaseConnection): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Commits a transaction.
|
|
29
|
+
*/
|
|
10
30
|
commitTransaction(connection: DatabaseConnection): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Rolls back a transaction.
|
|
33
|
+
*/
|
|
11
34
|
rollbackTransaction(connection: DatabaseConnection): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Releases a connection back to the pool.
|
|
37
|
+
*/
|
|
12
38
|
releaseConnection(): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Destroys the driver and releases all resources.
|
|
41
|
+
*/
|
|
13
42
|
destroy(): Promise<void>;
|
|
14
43
|
}
|
|
@@ -3,5 +3,8 @@ import { Kysely } from '../../kysely.js';
|
|
|
3
3
|
export declare class SqliteIntrospector implements DatabaseIntrospector {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(db: Kysely<any>);
|
|
6
|
+
/**
|
|
7
|
+
* Get the database metadata such as the names of the tables and columns.
|
|
8
|
+
*/
|
|
6
9
|
getMetadata(options?: DatabaseMetadataOptions): Promise<DatabaseMetadata>;
|
|
7
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js';
|
|
2
2
|
export declare class SqliteQueryCompiler extends DefaultQueryCompiler {
|
|
3
|
-
protected visitReturning(): void;
|
|
4
|
-
protected getSql(): string;
|
|
5
3
|
protected getCurrentParameterPlaceholder(): string;
|
|
4
|
+
protected getLeftIdentifierWrapper(): string;
|
|
5
|
+
protected getRightIdentifierWrapper(): string;
|
|
6
6
|
protected getAutoIncrement(): string;
|
|
7
7
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js';
|
|
2
2
|
export class SqliteQueryCompiler extends DefaultQueryCompiler {
|
|
3
|
-
visitReturning() {
|
|
4
|
-
// Do nothing.
|
|
5
|
-
}
|
|
6
|
-
getSql() {
|
|
7
|
-
return super.getSql().trimEnd();
|
|
8
|
-
}
|
|
9
3
|
getCurrentParameterPlaceholder() {
|
|
10
4
|
return '?';
|
|
11
5
|
}
|
|
6
|
+
getLeftIdentifierWrapper() {
|
|
7
|
+
return '"';
|
|
8
|
+
}
|
|
9
|
+
getRightIdentifierWrapper() {
|
|
10
|
+
return '"';
|
|
11
|
+
}
|
|
12
12
|
getAutoIncrement() {
|
|
13
13
|
return 'autoincrement';
|
|
14
14
|
}
|
|
@@ -4,5 +4,9 @@ import { Driver } from './driver.js';
|
|
|
4
4
|
export declare class DefaultConnectionProvider implements ConnectionProvider {
|
|
5
5
|
#private;
|
|
6
6
|
constructor(driver: Driver);
|
|
7
|
+
/**
|
|
8
|
+
* Provides a connection for the callback and takes care of disposing
|
|
9
|
+
* the connection after the callback has been run.
|
|
10
|
+
*/
|
|
7
11
|
withConnection<T>(runner: (connection: DatabaseConnection) => Promise<T>): Promise<T>;
|
|
8
12
|
}
|
|
@@ -9,11 +9,40 @@ import { Driver, TransactionSettings } from './driver.js';
|
|
|
9
9
|
export declare class RuntimeDriver implements Driver {
|
|
10
10
|
#private;
|
|
11
11
|
constructor(driver: Driver, log: Log);
|
|
12
|
+
/**
|
|
13
|
+
* Initializes the driver.
|
|
14
|
+
*
|
|
15
|
+
* After calling this method the driver should be usable and `acquireConnection` etc.
|
|
16
|
+
* methods should be callable.
|
|
17
|
+
*
|
|
18
|
+
* IMPORTANT: The underlying database engine driver (like [pg](https://node-postgres.com/))
|
|
19
|
+
* should be imported inside this function, not at the top of the driver file! This is
|
|
20
|
+
* important so that Kysely is usable without installing all database driver libraries
|
|
21
|
+
* it supports.
|
|
22
|
+
*/
|
|
12
23
|
init(): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Acquires a new connection from the pool.
|
|
26
|
+
*/
|
|
13
27
|
acquireConnection(): Promise<DatabaseConnection>;
|
|
28
|
+
/**
|
|
29
|
+
* Releases a connection back to the pool.
|
|
30
|
+
*/
|
|
14
31
|
releaseConnection(runtimeConnection: DatabaseConnection): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Begins a transaction.
|
|
34
|
+
*/
|
|
15
35
|
beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Commits a transaction.
|
|
38
|
+
*/
|
|
16
39
|
commitTransaction(connection: DatabaseConnection): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Rolls back a transaction.
|
|
42
|
+
*/
|
|
17
43
|
rollbackTransaction(connection: DatabaseConnection): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Destroys the driver and releases all resources.
|
|
46
|
+
*/
|
|
18
47
|
destroy(): Promise<void>;
|
|
19
48
|
}
|
|
@@ -3,5 +3,9 @@ import { ConnectionProvider } from './connection-provider.js';
|
|
|
3
3
|
export declare class SingleConnectionProvider implements ConnectionProvider {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(connection: DatabaseConnection);
|
|
6
|
+
/**
|
|
7
|
+
* Provides a connection for the callback and takes care of disposing
|
|
8
|
+
* the connection after the callback has been run.
|
|
9
|
+
*/
|
|
6
10
|
withConnection<T>(runner: (connection: DatabaseConnection) => Promise<T>): Promise<T>;
|
|
7
11
|
}
|
|
@@ -16,3 +16,4 @@ export declare class DynamicReferenceBuilder<R extends string = never> implement
|
|
|
16
16
|
constructor(reference: string);
|
|
17
17
|
toOperationNode(): ReferenceNode | ColumnNode;
|
|
18
18
|
}
|
|
19
|
+
export declare function isDynamicReferenceBuilder(obj: unknown): obj is DynamicReferenceBuilder<any>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { isOperationNodeSource, } from '../operation-node/operation-node-source.js';
|
|
1
2
|
import { parseStringReference } from '../parser/reference-parser.js';
|
|
3
|
+
import { isObject, isString } from '../util/object-utils.js';
|
|
2
4
|
export class DynamicReferenceBuilder {
|
|
3
5
|
#dynamicReference;
|
|
4
6
|
get dynamicReference() {
|
|
@@ -22,3 +24,8 @@ export class DynamicReferenceBuilder {
|
|
|
22
24
|
return parseStringReference(this.#dynamicReference);
|
|
23
25
|
}
|
|
24
26
|
}
|
|
27
|
+
export function isDynamicReferenceBuilder(obj) {
|
|
28
|
+
return (isObject(obj) &&
|
|
29
|
+
isOperationNodeSource(obj) &&
|
|
30
|
+
isString(obj.dynamicReference));
|
|
31
|
+
}
|
|
@@ -20,7 +20,8 @@ export declare class DynamicModule {
|
|
|
20
20
|
* `ref` to other methods as well. If the types allow you to pass a `ref`
|
|
21
21
|
* value to some place, it should work.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
23
|
+
* ### Examples
|
|
24
|
+
*
|
|
24
25
|
* Filter by a column not know at compile time:
|
|
25
26
|
*
|
|
26
27
|
* ```ts
|
|
@@ -38,7 +39,6 @@ export declare class DynamicModule {
|
|
|
38
39
|
* someQuery('person.last_name', 'Aniston')
|
|
39
40
|
* ```
|
|
40
41
|
*
|
|
41
|
-
* @example
|
|
42
42
|
* Order by a column not know at compile time:
|
|
43
43
|
*
|
|
44
44
|
* ```ts
|
|
@@ -55,7 +55,6 @@ export declare class DynamicModule {
|
|
|
55
55
|
* someQuery('fn')
|
|
56
56
|
* ```
|
|
57
57
|
*
|
|
58
|
-
* @example
|
|
59
58
|
* In this example we add selections dynamically:
|
|
60
59
|
*
|
|
61
60
|
* ```ts
|
|
@@ -66,7 +65,7 @@ export declare class DynamicModule {
|
|
|
66
65
|
*
|
|
67
66
|
* // A type that lists all possible values `columnFromUserInput` can have.
|
|
68
67
|
* // You can use `keyof Person` if any column of an interface is allowed.
|
|
69
|
-
* type PossibleColumns = 'last_name' |
|
|
68
|
+
* type PossibleColumns = 'last_name' | 'first_name' | 'birth_date'
|
|
70
69
|
*
|
|
71
70
|
* const [person] = await db.selectFrom('person')
|
|
72
71
|
* .select([
|
|
@@ -78,9 +77,9 @@ export declare class DynamicModule {
|
|
|
78
77
|
* // The resulting type contains all `PossibleColumns` as optional fields
|
|
79
78
|
* // because we cannot know which field was actually selected before
|
|
80
79
|
* // running the code.
|
|
81
|
-
* const lastName: string |
|
|
82
|
-
* const firstName: string |
|
|
83
|
-
* const birthDate: string |
|
|
80
|
+
* const lastName: string | undefined = person.last_name
|
|
81
|
+
* const firstName: string | undefined = person.first_name
|
|
82
|
+
* const birthDate: string | undefined = person.birth_date
|
|
84
83
|
*
|
|
85
84
|
* // The result type also contains the compile time selection `id`.
|
|
86
85
|
* person.id
|
|
@@ -20,7 +20,8 @@ export class DynamicModule {
|
|
|
20
20
|
* `ref` to other methods as well. If the types allow you to pass a `ref`
|
|
21
21
|
* value to some place, it should work.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
23
|
+
* ### Examples
|
|
24
|
+
*
|
|
24
25
|
* Filter by a column not know at compile time:
|
|
25
26
|
*
|
|
26
27
|
* ```ts
|
|
@@ -38,7 +39,6 @@ export class DynamicModule {
|
|
|
38
39
|
* someQuery('person.last_name', 'Aniston')
|
|
39
40
|
* ```
|
|
40
41
|
*
|
|
41
|
-
* @example
|
|
42
42
|
* Order by a column not know at compile time:
|
|
43
43
|
*
|
|
44
44
|
* ```ts
|
|
@@ -55,7 +55,6 @@ export class DynamicModule {
|
|
|
55
55
|
* someQuery('fn')
|
|
56
56
|
* ```
|
|
57
57
|
*
|
|
58
|
-
* @example
|
|
59
58
|
* In this example we add selections dynamically:
|
|
60
59
|
*
|
|
61
60
|
* ```ts
|
|
@@ -66,7 +65,7 @@ export class DynamicModule {
|
|
|
66
65
|
*
|
|
67
66
|
* // A type that lists all possible values `columnFromUserInput` can have.
|
|
68
67
|
* // You can use `keyof Person` if any column of an interface is allowed.
|
|
69
|
-
* type PossibleColumns = 'last_name' |
|
|
68
|
+
* type PossibleColumns = 'last_name' | 'first_name' | 'birth_date'
|
|
70
69
|
*
|
|
71
70
|
* const [person] = await db.selectFrom('person')
|
|
72
71
|
* .select([
|
|
@@ -78,9 +77,9 @@ export class DynamicModule {
|
|
|
78
77
|
* // The resulting type contains all `PossibleColumns` as optional fields
|
|
79
78
|
* // because we cannot know which field was actually selected before
|
|
80
79
|
* // running the code.
|
|
81
|
-
* const lastName: string |
|
|
82
|
-
* const firstName: string |
|
|
83
|
-
* const birthDate: string |
|
|
80
|
+
* const lastName: string | undefined = person.last_name
|
|
81
|
+
* const firstName: string | undefined = person.first_name
|
|
82
|
+
* const birthDate: string | undefined = person.birth_date
|
|
84
83
|
*
|
|
85
84
|
* // The result type also contains the compile time selection `id`.
|
|
86
85
|
* person.id
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
export * from './kysely.js';
|
|
2
2
|
export * from './query-creator.js';
|
|
3
|
-
export * from './query-builder/
|
|
3
|
+
export * from './query-builder/where-interface.js';
|
|
4
|
+
export * from './query-builder/join-interface.js';
|
|
5
|
+
export * from './query-builder/returning-interface.js';
|
|
6
|
+
export * from './query-builder/having-interface.js';
|
|
7
|
+
export * from './query-builder/select-query-builder.js';
|
|
8
|
+
export * from './query-builder/insert-query-builder.js';
|
|
9
|
+
export * from './query-builder/update-query-builder.js';
|
|
10
|
+
export * from './query-builder/delete-query-builder.js';
|
|
11
|
+
export * from './query-builder/no-result-error.js';
|
|
4
12
|
export * from './query-builder/join-builder.js';
|
|
5
13
|
export * from './query-builder/expression-builder.js';
|
|
14
|
+
export * from './query-builder/function-builder.js';
|
|
6
15
|
export * from './query-builder/insert-result.js';
|
|
7
16
|
export * from './query-builder/delete-result.js';
|
|
8
17
|
export * from './query-builder/update-result.js';
|
|
@@ -123,15 +132,17 @@ export * from './operation-node/unique-constraint-node.js';
|
|
|
123
132
|
export * from './operation-node/update-query-node.js';
|
|
124
133
|
export * from './operation-node/value-list-node.js';
|
|
125
134
|
export * from './operation-node/value-node.js';
|
|
135
|
+
export * from './operation-node/values-node.js';
|
|
126
136
|
export * from './operation-node/where-node.js';
|
|
127
137
|
export * from './operation-node/with-node.js';
|
|
128
138
|
export * from './introspection/database-introspector.js';
|
|
129
139
|
export * from './util/compilable.js';
|
|
130
|
-
export
|
|
140
|
+
export * from './util/log.js';
|
|
141
|
+
export { AnyColumn, UnknownRow, AnySelectQueryBuilder, } from './util/type-utils.js';
|
|
131
142
|
export { SelectExpression, SelectExpressionOrList, } from './parser/select-parser.js';
|
|
132
143
|
export { ReferenceExpression, ReferenceExpressionOrList, } from './parser/reference-parser.js';
|
|
133
144
|
export { ValueExpression, ValueExpressionOrList, } from './parser/value-parser.js';
|
|
134
|
-
export { ExistsExpression, FilterOperator } from './parser/filter-parser.js';
|
|
145
|
+
export { FilterValueExpression, FilterValueExpressionOrList, ExistsExpression, FilterOperator, } from './parser/filter-parser.js';
|
|
135
146
|
export { TableExpression, TableExpressionOrList, } from './parser/table-parser.js';
|
|
136
147
|
export { JoinReferenceExpression, JoinCallbackExpression, } from './parser/join-parser.js';
|
|
137
148
|
export { InsertObject } from './parser/insert-values-parser.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
export * from './kysely.js';
|
|
2
2
|
export * from './query-creator.js';
|
|
3
|
-
export * from './query-builder/
|
|
3
|
+
export * from './query-builder/where-interface.js';
|
|
4
|
+
export * from './query-builder/join-interface.js';
|
|
5
|
+
export * from './query-builder/returning-interface.js';
|
|
6
|
+
export * from './query-builder/having-interface.js';
|
|
7
|
+
export * from './query-builder/select-query-builder.js';
|
|
8
|
+
export * from './query-builder/insert-query-builder.js';
|
|
9
|
+
export * from './query-builder/update-query-builder.js';
|
|
10
|
+
export * from './query-builder/delete-query-builder.js';
|
|
11
|
+
export * from './query-builder/no-result-error.js';
|
|
4
12
|
export * from './query-builder/join-builder.js';
|
|
5
13
|
export * from './query-builder/expression-builder.js';
|
|
14
|
+
export * from './query-builder/function-builder.js';
|
|
6
15
|
export * from './query-builder/insert-result.js';
|
|
7
16
|
export * from './query-builder/delete-result.js';
|
|
8
17
|
export * from './query-builder/update-result.js';
|
|
@@ -123,7 +132,9 @@ export * from './operation-node/unique-constraint-node.js';
|
|
|
123
132
|
export * from './operation-node/update-query-node.js';
|
|
124
133
|
export * from './operation-node/value-list-node.js';
|
|
125
134
|
export * from './operation-node/value-node.js';
|
|
135
|
+
export * from './operation-node/values-node.js';
|
|
126
136
|
export * from './operation-node/where-node.js';
|
|
127
137
|
export * from './operation-node/with-node.js';
|
|
128
138
|
export * from './introspection/database-introspector.js';
|
|
129
139
|
export * from './util/compilable.js';
|
|
140
|
+
export * from './util/log.js';
|