kysely 0.18.0 → 0.19.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.
Files changed (82) hide show
  1. package/README.md +22 -17
  2. package/dist/cjs/dialect/database-introspector.d.ts +13 -0
  3. package/dist/cjs/dialect/mysql/mysql-dialect-config.d.ts +24 -207
  4. package/dist/cjs/dialect/mysql/mysql-dialect.d.ts +26 -3
  5. package/dist/cjs/dialect/mysql/mysql-dialect.js +27 -5
  6. package/dist/cjs/dialect/mysql/mysql-driver.d.ts +13 -4
  7. package/dist/cjs/dialect/mysql/mysql-driver.js +33 -51
  8. package/dist/cjs/dialect/mysql/mysql-introspector.d.ts +11 -1
  9. package/dist/cjs/dialect/mysql/mysql-introspector.js +29 -7
  10. package/dist/cjs/dialect/postgres/postgres-dialect-config.d.ts +25 -89
  11. package/dist/cjs/dialect/postgres/postgres-dialect.d.ts +25 -5
  12. package/dist/cjs/dialect/postgres/postgres-dialect.js +26 -7
  13. package/dist/cjs/dialect/postgres/postgres-driver.d.ts +12 -3
  14. package/dist/cjs/dialect/postgres/postgres-driver.js +21 -39
  15. package/dist/cjs/dialect/postgres/postgres-introspector.d.ts +11 -1
  16. package/dist/cjs/dialect/postgres/postgres-introspector.js +15 -4
  17. package/dist/cjs/dialect/sqlite/sqlite-dialect-config.d.ts +25 -28
  18. package/dist/cjs/dialect/sqlite/sqlite-dialect.d.ts +19 -3
  19. package/dist/cjs/dialect/sqlite/sqlite-dialect.js +19 -3
  20. package/dist/cjs/dialect/sqlite/sqlite-driver.js +3 -37
  21. package/dist/cjs/dialect/sqlite/sqlite-introspector.d.ts +11 -1
  22. package/dist/cjs/dialect/sqlite/sqlite-introspector.js +11 -4
  23. package/dist/cjs/index.d.ts +153 -2
  24. package/dist/cjs/index.js +147 -3
  25. package/dist/cjs/migration/file-migration-provider.d.ts +21 -5
  26. package/dist/cjs/migration/file-migration-provider.js +14 -13
  27. package/dist/cjs/migration/migrator.d.ts +44 -2
  28. package/dist/cjs/migration/migrator.js +77 -18
  29. package/dist/cjs/plugin/noop-plugin.d.ts +42 -0
  30. package/dist/cjs/plugin/noop-plugin.js +12 -0
  31. package/dist/cjs/query-creator.d.ts +9 -0
  32. package/dist/cjs/query-creator.js +18 -0
  33. package/dist/cjs/schema/alter-table-builder.d.ts +2 -5
  34. package/dist/cjs/schema/alter-table-builder.js +3 -7
  35. package/dist/cjs/schema/schema.d.ts +9 -0
  36. package/dist/cjs/schema/schema.js +12 -0
  37. package/dist/cjs/util/column-type.d.ts +9 -1
  38. package/dist/cjs/util/stack-trace-utils.d.ts +1 -0
  39. package/dist/cjs/util/stack-trace-utils.js +17 -0
  40. package/dist/esm/dialect/database-introspector.d.ts +13 -0
  41. package/dist/esm/dialect/mysql/mysql-dialect-config.d.ts +24 -207
  42. package/dist/esm/dialect/mysql/mysql-dialect.d.ts +26 -3
  43. package/dist/esm/dialect/mysql/mysql-dialect.js +27 -5
  44. package/dist/esm/dialect/mysql/mysql-driver.d.ts +13 -4
  45. package/dist/esm/dialect/mysql/mysql-driver.js +33 -51
  46. package/dist/esm/dialect/mysql/mysql-introspector.d.ts +11 -1
  47. package/dist/esm/dialect/mysql/mysql-introspector.js +30 -8
  48. package/dist/esm/dialect/postgres/postgres-dialect-config.d.ts +25 -89
  49. package/dist/esm/dialect/postgres/postgres-dialect.d.ts +25 -5
  50. package/dist/esm/dialect/postgres/postgres-dialect.js +26 -7
  51. package/dist/esm/dialect/postgres/postgres-driver.d.ts +12 -3
  52. package/dist/esm/dialect/postgres/postgres-driver.js +21 -39
  53. package/dist/esm/dialect/postgres/postgres-introspector.d.ts +11 -1
  54. package/dist/esm/dialect/postgres/postgres-introspector.js +16 -5
  55. package/dist/esm/dialect/sqlite/sqlite-dialect-config.d.ts +25 -28
  56. package/dist/esm/dialect/sqlite/sqlite-dialect.d.ts +19 -3
  57. package/dist/esm/dialect/sqlite/sqlite-dialect.js +19 -3
  58. package/dist/esm/dialect/sqlite/sqlite-driver.js +4 -38
  59. package/dist/esm/dialect/sqlite/sqlite-introspector.d.ts +11 -1
  60. package/dist/esm/dialect/sqlite/sqlite-introspector.js +12 -5
  61. package/dist/esm/index.d.ts +153 -2
  62. package/dist/esm/index.js +142 -2
  63. package/dist/esm/migration/file-migration-provider.d.ts +21 -5
  64. package/dist/esm/migration/file-migration-provider.js +14 -13
  65. package/dist/esm/migration/migrator.d.ts +44 -2
  66. package/dist/esm/migration/migrator.js +76 -17
  67. package/dist/esm/plugin/noop-plugin.d.ts +42 -0
  68. package/dist/esm/plugin/noop-plugin.js +9 -0
  69. package/dist/esm/query-creator.d.ts +9 -0
  70. package/dist/esm/query-creator.js +18 -0
  71. package/dist/esm/schema/alter-table-builder.d.ts +2 -5
  72. package/dist/esm/schema/alter-table-builder.js +4 -8
  73. package/dist/esm/schema/schema.d.ts +9 -0
  74. package/dist/esm/schema/schema.js +12 -0
  75. package/dist/esm/util/column-type.d.ts +9 -1
  76. package/dist/esm/util/stack-trace-utils.d.ts +1 -0
  77. package/dist/esm/util/stack-trace-utils.js +14 -0
  78. package/package.json +10 -15
  79. package/dist/cjs/index-nodeless.d.ts +0 -152
  80. package/dist/cjs/index-nodeless.js +0 -153
  81. package/dist/esm/index-nodeless.d.ts +0 -152
  82. package/dist/esm/index-nodeless.js +0 -142
@@ -0,0 +1,42 @@
1
+ import { QueryResult } from '../driver/database-connection.js';
2
+ import { RootOperationNode } from '../query-compiler/query-compiler.js';
3
+ import { UnknownRow } from '../util/type-utils.js';
4
+ import { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from './kysely-plugin.js';
5
+ export declare class NoopPlugin implements KyselyPlugin {
6
+ /**
7
+ * This is called for each query before it is executed. You can modify the query by
8
+ * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node}
9
+ * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer}
10
+ * for this.
11
+ *
12
+ * If you need to pass some query-related data between this method and `transformResult` you
13
+ * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key:
14
+ *
15
+ * ```ts
16
+ * const plugin = {
17
+ * data: new WeakMap<QueryId, SomeData>(),
18
+ *
19
+ * transformQuery(args: PluginTransformQueryArgs): RootOperationNode {
20
+ * this.data.set(args.queryId, something)
21
+ * return args.node
22
+ * },
23
+ *
24
+ * transformResult(args: PluginTransformResultArgs): QueryResult<UnknownRow> {
25
+ * const data = this.data.get(args.queryId)
26
+ * return args.result
27
+ * }
28
+ * }
29
+ * ```
30
+ *
31
+ * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery`
32
+ * is not always matched by a call to `transformResult` which would leave orphaned items in the map
33
+ * and cause a memory leak.
34
+ */
35
+ transformQuery(args: PluginTransformQueryArgs): RootOperationNode;
36
+ /**
37
+ * This method is called for each query after it has been executed. The result
38
+ * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}.
39
+ * You can modify the result and return the modifier result.
40
+ */
41
+ transformResult(args: PluginTransformResultArgs): Promise<QueryResult<UnknownRow>>;
42
+ }
@@ -0,0 +1,9 @@
1
+ /// <reference types="./noop-plugin.d.ts" />
2
+ export class NoopPlugin {
3
+ transformQuery(args) {
4
+ return args.node;
5
+ }
6
+ async transformResult(args) {
7
+ return args.result;
8
+ }
9
+ }
@@ -9,6 +9,7 @@ import { WithNode } from './operation-node/with-node.js';
9
9
  import { InsertResult } from './query-builder/insert-result.js';
10
10
  import { DeleteResult } from './query-builder/delete-result.js';
11
11
  import { UpdateResult } from './query-builder/update-result.js';
12
+ import { KyselyPlugin } from './plugin/kysely-plugin.js';
12
13
  export declare class QueryCreator<DB> {
13
14
  #private;
14
15
  constructor(props: QueryCreatorProps);
@@ -252,6 +253,14 @@ export declare class QueryCreator<DB> {
252
253
  * See the {@link with} method for examples and more documentation.
253
254
  */
254
255
  withRecursive<N extends string, E extends RecursiveCommonTableExpression<DB, N>>(name: N, expression: E): QueryCreatorWithCommonTableExpression<DB, N, E>;
256
+ /**
257
+ * Returns a copy of this query creator instance with the given plugin installed.
258
+ */
259
+ withPlugin(plugin: KyselyPlugin): QueryCreator<DB>;
260
+ /**
261
+ * Returns a copy of this query creator instance without any plugins.
262
+ */
263
+ withoutPlugins(): QueryCreator<DB>;
255
264
  /**
256
265
  * Sets the schema to be used for all table references that don't explicitly
257
266
  * specify a schema.
@@ -190,6 +190,24 @@ export class QueryCreator {
190
190
  : WithNode.create(cte, { recursive: true }),
191
191
  });
192
192
  }
193
+ /**
194
+ * Returns a copy of this query creator instance with the given plugin installed.
195
+ */
196
+ withPlugin(plugin) {
197
+ return new QueryCreator({
198
+ ...this.#props,
199
+ executor: this.#props.executor.withPlugin(plugin),
200
+ });
201
+ }
202
+ /**
203
+ * Returns a copy of this query creator instance without any plugins.
204
+ */
205
+ withoutPlugins() {
206
+ return new QueryCreator({
207
+ ...this.#props,
208
+ executor: this.#props.executor.withoutPlugins(),
209
+ });
210
+ }
193
211
  /**
194
212
  * Sets the schema to be used for all table references that don't explicitly
195
213
  * specify a schema.
@@ -25,12 +25,8 @@ export declare class AlterTableBuilder {
25
25
  renameColumn(column: string, newColumn: string): AlterTableExecutor;
26
26
  /**
27
27
  * See {@link CreateTableBuilder.addColumn}
28
- *
29
- * Unlike {@link CreateTableBuilder.addColumn} this method returns the column builder
30
- * and doesn't take a callback as the last argument. This is because you can only
31
- * add one column per `ALTER TABLE` query.
32
28
  */
33
- addColumn(columnName: string, dataType: DataTypeExpression): AlterTableAddColumnBuilder;
29
+ addColumn(columnName: string, dataType: DataTypeExpression, build?: AlterTableAddColumnBuilderCallback): AlterTableAddColumnBuilder;
34
30
  /**
35
31
  * Creates an `alter table modify column` query. The `modify column` statement
36
32
  * is only implemeted by MySQL and oracle AFAIK. On other databases you
@@ -245,6 +241,7 @@ export declare class AlterTableAddColumnBuilder implements ColumnDefinitionBuild
245
241
  export interface AlterTableAddColumnBuilderProps extends AlterTableBuilderProps {
246
242
  readonly columnBuilder: ColumnDefinitionBuilder;
247
243
  }
244
+ export declare type AlterTableAddColumnBuilderCallback = (builder: AlterTableAddColumnBuilder) => AlterTableAddColumnBuilder;
248
245
  export declare class AlterTableModifyColumnBuilder implements ColumnDefinitionBuilderInterface, OperationNodeSource, Compilable {
249
246
  #private;
250
247
  constructor(props: AlterTableModifyColumnBuilderProps);
@@ -7,7 +7,7 @@ import { DataTypeNode, } from '../operation-node/data-type-node.js';
7
7
  import { DropColumnNode } from '../operation-node/drop-column-node.js';
8
8
  import { IdentifierNode } from '../operation-node/identifier-node.js';
9
9
  import { RenameColumnNode } from '../operation-node/rename-column-node.js';
10
- import { freeze } from '../util/object-utils.js';
10
+ import { freeze, noop } from '../util/object-utils.js';
11
11
  import { preventAwait } from '../util/prevent-await.js';
12
12
  import { ColumnDefinitionBuilder, } from './column-definition-builder.js';
13
13
  import { ModifyColumnNode } from '../operation-node/modify-column-node.js';
@@ -68,16 +68,12 @@ export class AlterTableBuilder {
68
68
  }
69
69
  /**
70
70
  * See {@link CreateTableBuilder.addColumn}
71
- *
72
- * Unlike {@link CreateTableBuilder.addColumn} this method returns the column builder
73
- * and doesn't take a callback as the last argument. This is because you can only
74
- * add one column per `ALTER TABLE` query.
75
71
  */
76
- addColumn(columnName, dataType) {
77
- return new AlterTableAddColumnBuilder({
72
+ addColumn(columnName, dataType, build = noop) {
73
+ return build(new AlterTableAddColumnBuilder({
78
74
  ...this.#props,
79
75
  columnBuilder: new ColumnDefinitionBuilder(ColumnDefinitionNode.create(columnName, parseDataTypeExpression(dataType))),
80
- });
76
+ }));
81
77
  }
82
78
  /**
83
79
  * Creates an `alter table modify column` query. The `modify column` statement
@@ -8,6 +8,7 @@ import { DropSchemaBuilder } from './drop-schema-builder.js';
8
8
  import { DropTableBuilder } from './drop-table-builder.js';
9
9
  import { CreateViewBuilder } from './create-view-builder.js';
10
10
  import { DropViewBuilder } from './drop-view-builder.js';
11
+ import { KyselyPlugin } from '../plugin/kysely-plugin.js';
11
12
  /**
12
13
  * Provides methods for building database schema.
13
14
  */
@@ -169,6 +170,14 @@ export declare class SchemaModule {
169
170
  * ```
170
171
  */
171
172
  dropView(viewName: string): DropViewBuilder;
173
+ /**
174
+ * Returns a copy of this schema module with the given plugin installed.
175
+ */
176
+ withPlugin(plugin: KyselyPlugin): SchemaModule;
177
+ /**
178
+ * Returns a copy of this schema module without any plugins.
179
+ */
180
+ withoutPlugins(): SchemaModule;
172
181
  /**
173
182
  * See {@link QueryCreator.withSchema}
174
183
  */
@@ -237,6 +237,18 @@ export class SchemaModule {
237
237
  dropViewNode: DropViewNode.create(viewName),
238
238
  });
239
239
  }
240
+ /**
241
+ * Returns a copy of this schema module with the given plugin installed.
242
+ */
243
+ withPlugin(plugin) {
244
+ return new SchemaModule(this.#executor.withPlugin(plugin));
245
+ }
246
+ /**
247
+ * Returns a copy of this schema module without any plugins.
248
+ */
249
+ withoutPlugins() {
250
+ return new SchemaModule(this.#executor.withoutPlugins());
251
+ }
240
252
  /**
241
253
  * See {@link QueryCreator.withSchema}
242
254
  */
@@ -43,13 +43,21 @@ export declare type ColumnType<SelectType, InsertType = SelectType, UpdateType =
43
43
  * is the same for all selects, inserts and updates but the
44
44
  * column is optional for inserts and updates.
45
45
  *
46
- * This is implemented using {@link ColumnType} like this:
46
+ * The implementation:
47
47
  *
48
48
  * ```ts
49
+ * // The update type is `S` instead of `S | undefined` because
50
+ * // updates are always optional --> no need to specify optionality.
49
51
  * type Generated<S> = ColumnType<S, S | undefined, S>
50
52
  * ```
51
53
  */
52
54
  export declare type Generated<S> = ColumnType<S, S | undefined, S>;
55
+ /**
56
+ * A shortcut for defining columns that are only database-generated
57
+ * (like postgres GENERATED ALWAYS AS IDENTITY). No insert/update
58
+ * is allowed.
59
+ */
60
+ export declare type GeneratedAlways<S> = ColumnType<S, never, never>;
53
61
  /**
54
62
  * Evaluates to `K` if `T` can be `null` or `undefined`.
55
63
  */
@@ -0,0 +1 @@
1
+ export declare function extendStackTrace(err: unknown, stackError: Error): unknown;
@@ -0,0 +1,14 @@
1
+ /// <reference types="./stack-trace-utils.d.ts" />
2
+ import { isObject, isString } from './object-utils.js';
3
+ export function extendStackTrace(err, stackError) {
4
+ if (isStackHolder(err) && stackError.stack) {
5
+ // Remove the first line that just says `Error`.
6
+ const stackExtension = stackError.stack.split('\n').slice(1).join('\n');
7
+ err.stack += `\n${stackExtension}`;
8
+ return err;
9
+ }
10
+ return err;
11
+ }
12
+ function isStackHolder(obj) {
13
+ return isObject(obj) && isString(obj.stack);
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kysely",
3
- "version": "0.18.0",
3
+ "version": "0.19.1",
4
4
  "description": "Type safe SQL query builder",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,9 +15,7 @@
15
15
  ".": {
16
16
  "import": "./dist/esm/index.js",
17
17
  "require": "./dist/cjs/index.js"
18
- },
19
- "./dist/cjs/index-nodeless.js": "./dist/cjs/index-nodeless.js",
20
- "./dist/esm/index-nodeless.js": "./dist/esm/index-nodeless.js"
18
+ }
21
19
  },
22
20
  "scripts": {
23
21
  "clean": "rm -rf dist && rm -rf test/node/dist && rm -rf test/browser/bundle.js",
@@ -43,26 +41,23 @@
43
41
  },
44
42
  "author": "Sami Koskimäki <sami@jakso.me>",
45
43
  "license": "MIT",
46
- "dependencies": {
47
- "@types/node": "^16.11.9"
48
- },
49
44
  "devDependencies": {
50
45
  "@types/better-sqlite3": "^7.5.0",
51
- "@types/chai": "^4.3.0",
46
+ "@types/chai": "^4.3.1",
52
47
  "@types/chai-subset": "^1.3.3",
53
48
  "@types/mocha": "^9.1.0",
54
49
  "@types/pg": "^8.6.5",
55
- "better-sqlite3": "^7.5.0",
50
+ "better-sqlite3": "^7.5.1",
56
51
  "chai": "^4.3.6",
57
52
  "chai-subset": "^1.6.0",
58
- "esbuild": "^0.14.27",
53
+ "esbuild": "^0.14.36",
59
54
  "mocha": "^9.2.2",
60
55
  "mysql2": "^2.3.3",
61
56
  "pg": "^8.7.3",
62
- "playwright": "^1.20.0",
63
- "prettier": "^2.6.0",
64
- "tsd": "^0.19.1",
65
- "typedoc": "^0.22.13",
66
- "typescript": "4.6.2"
57
+ "playwright": "^1.21.0",
58
+ "prettier": "^2.6.2",
59
+ "tsd": "^0.20.0",
60
+ "typedoc": "^0.22.15",
61
+ "typescript": "4.6.3"
67
62
  }
68
63
  }
@@ -1,152 +0,0 @@
1
- export * from './kysely.js';
2
- export * from './query-creator.js';
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';
12
- export * from './query-builder/join-builder.js';
13
- export * from './query-builder/expression-builder.js';
14
- export * from './query-builder/function-builder.js';
15
- export * from './query-builder/insert-result.js';
16
- export * from './query-builder/delete-result.js';
17
- export * from './query-builder/update-result.js';
18
- export * from './query-builder/on-conflict-builder.js';
19
- export * from './raw-builder/raw-builder.js';
20
- export * from './raw-builder/sql.js';
21
- export * from './query-executor/query-executor.js';
22
- export * from './query-executor/default-query-executor.js';
23
- export * from './query-executor/noop-query-executor.js';
24
- export * from './query-executor/query-executor-provider.js';
25
- export * from './query-compiler/default-query-compiler.js';
26
- export * from './query-compiler/compiled-query.js';
27
- export * from './schema/schema.js';
28
- export * from './schema/create-table-builder.js';
29
- export * from './schema/drop-table-builder.js';
30
- export * from './schema/create-index-builder.js';
31
- export * from './schema/drop-index-builder.js';
32
- export * from './schema/create-schema-builder.js';
33
- export * from './schema/drop-schema-builder.js';
34
- export * from './schema/column-definition-builder.js';
35
- export * from './schema/foreign-key-constraint-builder.js';
36
- export * from './schema/alter-table-builder.js';
37
- export * from './schema/create-view-builder.js';
38
- export * from './schema/drop-view-builder.js';
39
- export * from './dynamic/dynamic.js';
40
- export * from './driver/driver.js';
41
- export * from './driver/database-connection.js';
42
- export * from './driver/connection-provider.js';
43
- export * from './driver/default-connection-provider.js';
44
- export * from './driver/single-connection-provider.js';
45
- export * from './driver/dummy-driver.js';
46
- export * from './dialect/dialect.js';
47
- export * from './dialect/dialect-adapter.js';
48
- export * from './dialect/dialect-adapter-base.js';
49
- export * from './dialect/database-introspector.js';
50
- export * from './dialect/postgres/postgres-query-compiler.js';
51
- export * from './dialect/postgres/postgres-introspector.js';
52
- export * from './dialect/postgres/postgres-adapter.js';
53
- export * from './dialect/mysql/mysql-query-compiler.js';
54
- export * from './dialect/mysql/mysql-introspector.js';
55
- export * from './dialect/mysql/mysql-adapter.js';
56
- export * from './dialect/sqlite/sqlite-query-compiler.js';
57
- export * from './dialect/sqlite/sqlite-introspector.js';
58
- export * from './dialect/sqlite/sqlite-adapter.js';
59
- export * from './query-compiler/default-query-compiler.js';
60
- export * from './query-compiler/query-compiler.js';
61
- export * from './migration/migrator.js';
62
- export * from './plugin/kysely-plugin.js';
63
- export * from './plugin/camel-case/camel-case-plugin.js';
64
- export * from './plugin/deduplicate-joins/deduplicate-joins-plugin.js';
65
- export * from './operation-node/add-column-node.js';
66
- export * from './operation-node/add-constraint-node.js';
67
- export * from './operation-node/alias-node.js';
68
- export * from './operation-node/alter-column-node.js';
69
- export * from './operation-node/alter-table-node.js';
70
- export * from './operation-node/and-node.js';
71
- export * from './operation-node/check-constraint-node.js';
72
- export * from './operation-node/column-definition-node.js';
73
- export * from './operation-node/column-node.js';
74
- export * from './operation-node/column-update-node.js';
75
- export * from './operation-node/common-table-expression-node.js';
76
- export * from './operation-node/common-table-expression-name-node.js';
77
- export * from './operation-node/constraint-node.js';
78
- export * from './operation-node/create-index-node.js';
79
- export * from './operation-node/create-schema-node.js';
80
- export * from './operation-node/create-table-node.js';
81
- export * from './operation-node/create-view-node.js';
82
- export * from './operation-node/data-type-node.js';
83
- export * from './operation-node/default-value-node.js';
84
- export * from './operation-node/delete-query-node.js';
85
- export * from './operation-node/drop-column-node.js';
86
- export * from './operation-node/drop-constraint-node.js';
87
- export * from './operation-node/drop-index-node.js';
88
- export * from './operation-node/drop-schema-node.js';
89
- export * from './operation-node/drop-table-node.js';
90
- export * from './operation-node/drop-view-node.js';
91
- export * from './operation-node/filter-node.js';
92
- export * from './operation-node/foreign-key-constraint-node.js';
93
- export * from './operation-node/from-node.js';
94
- export * from './operation-node/generated-node.js';
95
- export * from './operation-node/group-by-item-node.js';
96
- export * from './operation-node/group-by-node.js';
97
- export * from './operation-node/having-node.js';
98
- export * from './operation-node/identifier-node.js';
99
- export * from './operation-node/insert-query-node.js';
100
- export * from './operation-node/join-node.js';
101
- export * from './operation-node/limit-node.js';
102
- export * from './operation-node/list-node.js';
103
- export * from './operation-node/modify-column-node.js';
104
- export * from './operation-node/offset-node.js';
105
- export * from './operation-node/on-conflict-node.js';
106
- export * from './operation-node/on-duplicate-key-node.js';
107
- export * from './operation-node/on-node.js';
108
- export * from './operation-node/operation-node-source.js';
109
- export * from './operation-node/operation-node-transformer.js';
110
- export * from './operation-node/operation-node-utils.js';
111
- export * from './operation-node/operation-node-visitor.js';
112
- export * from './operation-node/operation-node.js';
113
- export * from './operation-node/operator-node.js';
114
- export * from './operation-node/or-node.js';
115
- export * from './operation-node/order-by-item-node.js';
116
- export * from './operation-node/order-by-node.js';
117
- export * from './operation-node/parens-node.js';
118
- export * from './operation-node/primary-constraint-node.js';
119
- export * from './operation-node/primitive-value-list-node.js';
120
- export * from './operation-node/query-node.js';
121
- export * from './operation-node/raw-node.js';
122
- export * from './operation-node/reference-node.js';
123
- export * from './operation-node/references-node.js';
124
- export * from './operation-node/rename-column-node.js';
125
- export * from './operation-node/returning-node.js';
126
- export * from './operation-node/select-all-node.js';
127
- export * from './operation-node/select-query-node.js';
128
- export * from './operation-node/select-query-node.js';
129
- export * from './operation-node/selection-node.js';
130
- export * from './operation-node/table-node.js';
131
- export * from './operation-node/union-node.js';
132
- export * from './operation-node/unique-constraint-node.js';
133
- export * from './operation-node/update-query-node.js';
134
- export * from './operation-node/value-list-node.js';
135
- export * from './operation-node/value-node.js';
136
- export * from './operation-node/values-node.js';
137
- export * from './operation-node/where-node.js';
138
- export * from './operation-node/with-node.js';
139
- export * from './util/column-type.js';
140
- export * from './util/compilable.js';
141
- export * from './util/log.js';
142
- export { AnyColumn, UnknownRow, AnySelectQueryBuilder, } from './util/type-utils.js';
143
- export { SelectExpression, SelectExpressionOrList, Selection, } from './parser/select-parser.js';
144
- export { ReferenceExpression, ReferenceExpressionOrList, } from './parser/reference-parser.js';
145
- export { ValueExpression, ValueExpressionOrList, } from './parser/value-parser.js';
146
- export { FilterValueExpression, FilterValueExpressionOrList, ExistsExpression, FilterOperator, } from './parser/filter-parser.js';
147
- export { TableExpression, TableExpressionOrList, } from './parser/table-parser.js';
148
- export { JoinReferenceExpression, JoinCallbackExpression, } from './parser/join-parser.js';
149
- export { InsertObject } from './parser/insert-values-parser.js';
150
- export { MutationObject } from './parser/update-set-parser.js';
151
- export { OrderByExpression, OrderByDirectionExpression, } from './parser/order-by-parser.js';
152
- export { UnionExpression } from './parser/union-parser.js';
@@ -1,153 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./kysely.js"), exports);
14
- __exportStar(require("./query-creator.js"), exports);
15
- __exportStar(require("./query-builder/where-interface.js"), exports);
16
- __exportStar(require("./query-builder/join-interface.js"), exports);
17
- __exportStar(require("./query-builder/returning-interface.js"), exports);
18
- __exportStar(require("./query-builder/having-interface.js"), exports);
19
- __exportStar(require("./query-builder/select-query-builder.js"), exports);
20
- __exportStar(require("./query-builder/insert-query-builder.js"), exports);
21
- __exportStar(require("./query-builder/update-query-builder.js"), exports);
22
- __exportStar(require("./query-builder/delete-query-builder.js"), exports);
23
- __exportStar(require("./query-builder/no-result-error.js"), exports);
24
- __exportStar(require("./query-builder/join-builder.js"), exports);
25
- __exportStar(require("./query-builder/expression-builder.js"), exports);
26
- __exportStar(require("./query-builder/function-builder.js"), exports);
27
- __exportStar(require("./query-builder/insert-result.js"), exports);
28
- __exportStar(require("./query-builder/delete-result.js"), exports);
29
- __exportStar(require("./query-builder/update-result.js"), exports);
30
- __exportStar(require("./query-builder/on-conflict-builder.js"), exports);
31
- __exportStar(require("./raw-builder/raw-builder.js"), exports);
32
- __exportStar(require("./raw-builder/sql.js"), exports);
33
- __exportStar(require("./query-executor/query-executor.js"), exports);
34
- __exportStar(require("./query-executor/default-query-executor.js"), exports);
35
- __exportStar(require("./query-executor/noop-query-executor.js"), exports);
36
- __exportStar(require("./query-executor/query-executor-provider.js"), exports);
37
- __exportStar(require("./query-compiler/default-query-compiler.js"), exports);
38
- __exportStar(require("./query-compiler/compiled-query.js"), exports);
39
- __exportStar(require("./schema/schema.js"), exports);
40
- __exportStar(require("./schema/create-table-builder.js"), exports);
41
- __exportStar(require("./schema/drop-table-builder.js"), exports);
42
- __exportStar(require("./schema/create-index-builder.js"), exports);
43
- __exportStar(require("./schema/drop-index-builder.js"), exports);
44
- __exportStar(require("./schema/create-schema-builder.js"), exports);
45
- __exportStar(require("./schema/drop-schema-builder.js"), exports);
46
- __exportStar(require("./schema/column-definition-builder.js"), exports);
47
- __exportStar(require("./schema/foreign-key-constraint-builder.js"), exports);
48
- __exportStar(require("./schema/alter-table-builder.js"), exports);
49
- __exportStar(require("./schema/create-view-builder.js"), exports);
50
- __exportStar(require("./schema/drop-view-builder.js"), exports);
51
- __exportStar(require("./dynamic/dynamic.js"), exports);
52
- __exportStar(require("./driver/driver.js"), exports);
53
- __exportStar(require("./driver/database-connection.js"), exports);
54
- __exportStar(require("./driver/connection-provider.js"), exports);
55
- __exportStar(require("./driver/default-connection-provider.js"), exports);
56
- __exportStar(require("./driver/single-connection-provider.js"), exports);
57
- __exportStar(require("./driver/dummy-driver.js"), exports);
58
- __exportStar(require("./dialect/dialect.js"), exports);
59
- __exportStar(require("./dialect/dialect-adapter.js"), exports);
60
- __exportStar(require("./dialect/dialect-adapter-base.js"), exports);
61
- __exportStar(require("./dialect/database-introspector.js"), exports);
62
- __exportStar(require("./dialect/postgres/postgres-query-compiler.js"), exports);
63
- __exportStar(require("./dialect/postgres/postgres-introspector.js"), exports);
64
- __exportStar(require("./dialect/postgres/postgres-adapter.js"), exports);
65
- __exportStar(require("./dialect/mysql/mysql-query-compiler.js"), exports);
66
- __exportStar(require("./dialect/mysql/mysql-introspector.js"), exports);
67
- __exportStar(require("./dialect/mysql/mysql-adapter.js"), exports);
68
- __exportStar(require("./dialect/sqlite/sqlite-query-compiler.js"), exports);
69
- __exportStar(require("./dialect/sqlite/sqlite-introspector.js"), exports);
70
- __exportStar(require("./dialect/sqlite/sqlite-adapter.js"), exports);
71
- __exportStar(require("./query-compiler/default-query-compiler.js"), exports);
72
- __exportStar(require("./query-compiler/query-compiler.js"), exports);
73
- __exportStar(require("./migration/migrator.js"), exports);
74
- __exportStar(require("./plugin/kysely-plugin.js"), exports);
75
- __exportStar(require("./plugin/camel-case/camel-case-plugin.js"), exports);
76
- __exportStar(require("./plugin/deduplicate-joins/deduplicate-joins-plugin.js"), exports);
77
- __exportStar(require("./operation-node/add-column-node.js"), exports);
78
- __exportStar(require("./operation-node/add-constraint-node.js"), exports);
79
- __exportStar(require("./operation-node/alias-node.js"), exports);
80
- __exportStar(require("./operation-node/alter-column-node.js"), exports);
81
- __exportStar(require("./operation-node/alter-table-node.js"), exports);
82
- __exportStar(require("./operation-node/and-node.js"), exports);
83
- __exportStar(require("./operation-node/check-constraint-node.js"), exports);
84
- __exportStar(require("./operation-node/column-definition-node.js"), exports);
85
- __exportStar(require("./operation-node/column-node.js"), exports);
86
- __exportStar(require("./operation-node/column-update-node.js"), exports);
87
- __exportStar(require("./operation-node/common-table-expression-node.js"), exports);
88
- __exportStar(require("./operation-node/common-table-expression-name-node.js"), exports);
89
- __exportStar(require("./operation-node/constraint-node.js"), exports);
90
- __exportStar(require("./operation-node/create-index-node.js"), exports);
91
- __exportStar(require("./operation-node/create-schema-node.js"), exports);
92
- __exportStar(require("./operation-node/create-table-node.js"), exports);
93
- __exportStar(require("./operation-node/create-view-node.js"), exports);
94
- __exportStar(require("./operation-node/data-type-node.js"), exports);
95
- __exportStar(require("./operation-node/default-value-node.js"), exports);
96
- __exportStar(require("./operation-node/delete-query-node.js"), exports);
97
- __exportStar(require("./operation-node/drop-column-node.js"), exports);
98
- __exportStar(require("./operation-node/drop-constraint-node.js"), exports);
99
- __exportStar(require("./operation-node/drop-index-node.js"), exports);
100
- __exportStar(require("./operation-node/drop-schema-node.js"), exports);
101
- __exportStar(require("./operation-node/drop-table-node.js"), exports);
102
- __exportStar(require("./operation-node/drop-view-node.js"), exports);
103
- __exportStar(require("./operation-node/filter-node.js"), exports);
104
- __exportStar(require("./operation-node/foreign-key-constraint-node.js"), exports);
105
- __exportStar(require("./operation-node/from-node.js"), exports);
106
- __exportStar(require("./operation-node/generated-node.js"), exports);
107
- __exportStar(require("./operation-node/group-by-item-node.js"), exports);
108
- __exportStar(require("./operation-node/group-by-node.js"), exports);
109
- __exportStar(require("./operation-node/having-node.js"), exports);
110
- __exportStar(require("./operation-node/identifier-node.js"), exports);
111
- __exportStar(require("./operation-node/insert-query-node.js"), exports);
112
- __exportStar(require("./operation-node/join-node.js"), exports);
113
- __exportStar(require("./operation-node/limit-node.js"), exports);
114
- __exportStar(require("./operation-node/list-node.js"), exports);
115
- __exportStar(require("./operation-node/modify-column-node.js"), exports);
116
- __exportStar(require("./operation-node/offset-node.js"), exports);
117
- __exportStar(require("./operation-node/on-conflict-node.js"), exports);
118
- __exportStar(require("./operation-node/on-duplicate-key-node.js"), exports);
119
- __exportStar(require("./operation-node/on-node.js"), exports);
120
- __exportStar(require("./operation-node/operation-node-source.js"), exports);
121
- __exportStar(require("./operation-node/operation-node-transformer.js"), exports);
122
- __exportStar(require("./operation-node/operation-node-utils.js"), exports);
123
- __exportStar(require("./operation-node/operation-node-visitor.js"), exports);
124
- __exportStar(require("./operation-node/operation-node.js"), exports);
125
- __exportStar(require("./operation-node/operator-node.js"), exports);
126
- __exportStar(require("./operation-node/or-node.js"), exports);
127
- __exportStar(require("./operation-node/order-by-item-node.js"), exports);
128
- __exportStar(require("./operation-node/order-by-node.js"), exports);
129
- __exportStar(require("./operation-node/parens-node.js"), exports);
130
- __exportStar(require("./operation-node/primary-constraint-node.js"), exports);
131
- __exportStar(require("./operation-node/primitive-value-list-node.js"), exports);
132
- __exportStar(require("./operation-node/query-node.js"), exports);
133
- __exportStar(require("./operation-node/raw-node.js"), exports);
134
- __exportStar(require("./operation-node/reference-node.js"), exports);
135
- __exportStar(require("./operation-node/references-node.js"), exports);
136
- __exportStar(require("./operation-node/rename-column-node.js"), exports);
137
- __exportStar(require("./operation-node/returning-node.js"), exports);
138
- __exportStar(require("./operation-node/select-all-node.js"), exports);
139
- __exportStar(require("./operation-node/select-query-node.js"), exports);
140
- __exportStar(require("./operation-node/select-query-node.js"), exports);
141
- __exportStar(require("./operation-node/selection-node.js"), exports);
142
- __exportStar(require("./operation-node/table-node.js"), exports);
143
- __exportStar(require("./operation-node/union-node.js"), exports);
144
- __exportStar(require("./operation-node/unique-constraint-node.js"), exports);
145
- __exportStar(require("./operation-node/update-query-node.js"), exports);
146
- __exportStar(require("./operation-node/value-list-node.js"), exports);
147
- __exportStar(require("./operation-node/value-node.js"), exports);
148
- __exportStar(require("./operation-node/values-node.js"), exports);
149
- __exportStar(require("./operation-node/where-node.js"), exports);
150
- __exportStar(require("./operation-node/with-node.js"), exports);
151
- __exportStar(require("./util/column-type.js"), exports);
152
- __exportStar(require("./util/compilable.js"), exports);
153
- __exportStar(require("./util/log.js"), exports);