kysely 0.14.0 → 0.15.2

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 (73) hide show
  1. package/README.md +95 -39
  2. package/dist/cjs/dialect/mysql/mysql-introspector.js +3 -3
  3. package/dist/cjs/dialect/postgres/postgres-introspector.js +3 -3
  4. package/dist/cjs/dialect/sqlite/sqlite-introspector.js +3 -3
  5. package/dist/cjs/index-nodeless.d.ts +148 -0
  6. package/dist/cjs/index-nodeless.js +149 -0
  7. package/dist/cjs/index.d.ts +6 -150
  8. package/dist/cjs/index.js +6 -139
  9. package/dist/cjs/kysely.d.ts +7 -39
  10. package/dist/cjs/kysely.js +8 -40
  11. package/dist/cjs/migration/file-migration-provider.d.ts +52 -0
  12. package/dist/cjs/migration/file-migration-provider.js +52 -0
  13. package/dist/cjs/migration/{migration.d.ts → migrator.d.ts} +159 -134
  14. package/dist/cjs/migration/{migration.js → migrator.js} +166 -57
  15. package/dist/cjs/parser/insert-values-parser.d.ts +4 -4
  16. package/dist/cjs/parser/insert-values-parser.js +2 -3
  17. package/dist/cjs/parser/reference-parser.d.ts +4 -3
  18. package/dist/cjs/parser/select-parser.d.ts +10 -4
  19. package/dist/cjs/parser/update-set-parser.d.ts +2 -1
  20. package/dist/cjs/query-builder/delete-query-builder.d.ts +2 -4
  21. package/dist/cjs/query-builder/insert-query-builder.d.ts +5 -21
  22. package/dist/cjs/query-builder/insert-query-builder.js +2 -7
  23. package/dist/cjs/query-builder/on-conflict-builder.d.ts +5 -3
  24. package/dist/cjs/query-builder/on-conflict-builder.js +2 -2
  25. package/dist/cjs/query-builder/returning-interface.d.ts +2 -4
  26. package/dist/cjs/query-builder/select-query-builder.d.ts +1 -1
  27. package/dist/cjs/query-builder/update-query-builder.d.ts +2 -4
  28. package/dist/cjs/query-creator.d.ts +0 -2
  29. package/dist/cjs/query-creator.js +0 -2
  30. package/dist/cjs/util/column-type.d.ts +165 -0
  31. package/dist/cjs/util/column-type.js +2 -0
  32. package/dist/cjs/util/private-symbols.d.ts +5 -0
  33. package/dist/cjs/util/private-symbols.js +8 -0
  34. package/dist/cjs/util/type-utils.d.ts +6 -42
  35. package/dist/esm/dialect/mysql/mysql-introspector.js +1 -1
  36. package/dist/esm/dialect/postgres/postgres-introspector.js +1 -1
  37. package/dist/esm/dialect/sqlite/sqlite-introspector.js +1 -1
  38. package/dist/esm/index-nodeless.d.ts +148 -0
  39. package/dist/esm/index-nodeless.js +137 -0
  40. package/dist/esm/index.d.ts +6 -150
  41. package/dist/esm/index.js +6 -139
  42. package/dist/esm/kysely.d.ts +7 -39
  43. package/dist/esm/kysely.js +8 -40
  44. package/dist/esm/migration/file-migration-provider.d.ts +52 -0
  45. package/dist/esm/migration/file-migration-provider.js +48 -0
  46. package/dist/esm/migration/{migration.d.ts → migrator.d.ts} +159 -134
  47. package/dist/esm/migration/{migration.js → migrator.js} +165 -56
  48. package/dist/esm/parser/insert-values-parser.d.ts +4 -4
  49. package/dist/esm/parser/insert-values-parser.js +2 -3
  50. package/dist/esm/parser/reference-parser.d.ts +4 -3
  51. package/dist/esm/parser/select-parser.d.ts +10 -4
  52. package/dist/esm/parser/update-set-parser.d.ts +2 -1
  53. package/dist/esm/query-builder/delete-query-builder.d.ts +2 -4
  54. package/dist/esm/query-builder/insert-query-builder.d.ts +5 -21
  55. package/dist/esm/query-builder/insert-query-builder.js +1 -6
  56. package/dist/esm/query-builder/on-conflict-builder.d.ts +5 -3
  57. package/dist/esm/query-builder/on-conflict-builder.js +2 -2
  58. package/dist/esm/query-builder/returning-interface.d.ts +2 -4
  59. package/dist/esm/query-builder/select-query-builder.d.ts +1 -1
  60. package/dist/esm/query-builder/update-query-builder.d.ts +2 -4
  61. package/dist/esm/query-creator.d.ts +0 -2
  62. package/dist/esm/query-creator.js +0 -2
  63. package/dist/esm/util/column-type.d.ts +165 -0
  64. package/dist/esm/util/column-type.js +1 -0
  65. package/dist/esm/util/private-symbols.d.ts +5 -0
  66. package/dist/esm/util/private-symbols.js +5 -0
  67. package/dist/esm/util/type-utils.d.ts +6 -42
  68. package/package.json +1 -1
  69. package/test.js +3 -0
  70. package/dist/cjs/util/generated-placeholder.d.ts +0 -3
  71. package/dist/cjs/util/generated-placeholder.js +0 -11
  72. package/dist/esm/util/generated-placeholder.d.ts +0 -3
  73. package/dist/esm/util/generated-placeholder.js +0 -7
package/README.md CHANGED
@@ -4,8 +4,7 @@
4
4
  # [Kysely](https://koskimas.github.io/kysely/index.html)
5
5
 
6
6
  A type-safe and autocompletion-friendly typescript SQL query builder for node.js. Inspired by
7
- [knex](http://knexjs.org/). [Here's](https://www.jakso.me/blog/kysely-a-type-safe-sql-query-builder-for-typescript)
8
- an introductory blog post for you.
7
+ [knex](http://knexjs.org/).
9
8
 
10
9
  ![](https://github.com/koskimas/kysely/blob/master/assets/demo.gif)
11
10
 
@@ -20,15 +19,14 @@ much anything you can think of. Typescript is always there for you offering comp
20
19
  you build a valid query.
21
20
 
22
21
  Of course there are cases where things cannot be typed at compile time, and Kysely offers escape
23
- hatches for these situations. With typescript you can always cast something to `any` if the types
24
- fail you. With Kysely you can also explicitly tell it to ignore the typings, but the default is always
25
- type-safety! See the [DynamicModule](https://koskimas.github.io/kysely/classes/DynamicModule.html#ref)
22
+ hatches for these situations. See the [DynamicModule](https://koskimas.github.io/kysely/classes/DynamicModule.html#ref)
26
23
  for more info.
27
24
 
28
- Kysely is still young and some useful features are propably not yet implemented. If you start
29
- using Kysely and can't find something you'd want to use, please open an issue or join our
25
+ If you start using Kysely and can't find something you'd want to use, please open an issue or join our
30
26
  [discord server](https://discord.gg/C9aJ49mCra).
31
27
 
28
+ You can find a more thorough introduction [here](https://www.jakso.me/blog/kysely-a-type-safe-sql-query-builder-for-typescript).
29
+
32
30
  # Table of contents
33
31
 
34
32
  - [Installation](#installation)
@@ -36,10 +34,11 @@ using Kysely and can't find something you'd want to use, please open an issue or
36
34
  - [Query examples](#query-examples)
37
35
  - [Migrations](#migrations)
38
36
  - [API reference](https://koskimas.github.io/kysely/index.html)
37
+ - [Changelog](https://github.com/koskimas/kysely/releases)
39
38
 
40
39
  # Installation
41
40
 
42
- Kysely currently works on PostgreSQL, MySQL and SQLite. You can install it using
41
+ Kysely currently works on PostgreSQL, MySQL and SQLite. You can install it using:
43
42
 
44
43
  ```
45
44
  # PostgreSQL
@@ -65,34 +64,55 @@ All you need to do is define an interface for each table in the database and pas
65
64
  interfaces to the `Kysely` constructor:
66
65
 
67
66
  ```ts
68
- import { Kysely, PostgresDialect } from 'kysely'
67
+ import {
68
+ Kysely,
69
+ PostgresDialect,
70
+ Generated,
71
+ ColumnType,
72
+ Selectable,
73
+ Insertable,
74
+ Updateable,
75
+ } from 'kysely'
76
+
77
+ interface PersonTable {
78
+ // Columns that are generated by the database should be marked
79
+ // using the `Generated` type. This way they are automatically
80
+ // made optional in inserts and updates.
81
+ id: Generated<number>
69
82
 
70
- interface Person {
71
- id: number
72
83
  first_name: string
73
- // If the column is nullable in the db, make its type nullable.
74
- // Don't use optional properties.
75
- last_name: string | null
76
84
  gender: 'male' | 'female' | 'other'
85
+
86
+ // If the column is nullable in the database, make its type nullable.
87
+ // Don't use optional properties. Optionality is always determined
88
+ // automatically by Kysely.
89
+ last_name: string | null
90
+
91
+ // You can specity a different type for each operation (select, insert and
92
+ // update) using the `ColumnType<SelectType, InsertType, UpdateType>`
93
+ // wrapper. Here we define a column `modified_at` that is selected as
94
+ // a `Date`, can optionally be provided as a `string` in inserts and
95
+ // can never be updated:
96
+ modified_at: ColumnType<Date, string | undefined, never>
77
97
  }
78
98
 
79
- interface Pet {
80
- id: number
99
+ interface PetTable {
100
+ id: Generated<number>
81
101
  name: string
82
102
  owner_id: number
83
103
  species: 'dog' | 'cat'
84
104
  }
85
105
 
86
- interface Movie {
87
- id: string
106
+ interface MovieTable {
107
+ id: Generated<string>
88
108
  stars: number
89
109
  }
90
110
 
91
111
  // Keys of this interface are table names.
92
112
  interface Database {
93
- person: Person
94
- pet: Pet
95
- movie: Movie
113
+ person: PersonTable
114
+ pet: PetTable
115
+ movie: MovieTable
96
116
  }
97
117
 
98
118
  // You'd create one of these when you start your app.
@@ -101,15 +121,26 @@ const db = new Kysely<Database>({
101
121
  dialect: new PostgresDialect({
102
122
  host: 'localhost',
103
123
  database: 'kysely_test',
104
- })
124
+ }),
105
125
  })
106
126
 
107
127
  async function demo() {
128
+ const { id } = await db
129
+ .insertInto('person')
130
+ .values({ first_name: 'Jennifer', gender: 'female' })
131
+ .returning('id')
132
+ .executeTakeFirstOrThrow()
133
+
134
+ await db
135
+ .insertInto('pet')
136
+ .values({ name: 'Catto', species: 'cat', owner_id: id })
137
+ .execute()
138
+
108
139
  const person = await db
109
140
  .selectFrom('person')
110
141
  .innerJoin('pet', 'pet.owner_id', 'person.id')
111
142
  .select(['first_name', 'pet.name as pet_name'])
112
- .where('person.id', '=', 1)
143
+ .where('person.id', '=', id)
113
144
  .executeTakeFirst()
114
145
 
115
146
  if (person) {
@@ -118,6 +149,14 @@ async function demo() {
118
149
  }
119
150
  ```
120
151
 
152
+ ```ts
153
+ // You can extract the select, insert and update interfaces like this
154
+ // if you want (you don't need to):
155
+ type Person = Selectable<PersonTable>
156
+ type InsertablePerson = Insertable<PersonTable>
157
+ type UpdateablePerson = Updateable<PersonTable>
158
+ ```
159
+
121
160
  # Query examples
122
161
 
123
162
  ## Select queries
@@ -167,7 +206,7 @@ should never depend on the current code of your app because they need to work ev
167
206
  changes completely. Migrations need to be "frozen in time".
168
207
 
169
208
  The migrations can use the [Kysely.schema](https://koskimas.github.io/kysely/classes/SchemaModule.html)
170
- module to modify the schema. Migrations can also run normal queries to modify the data.
209
+ module to modify the schema. Migrations can also run normal queries to modify data.
171
210
 
172
211
  ### PostgreSQL migration example
173
212
 
@@ -248,37 +287,54 @@ export async function down(db: Kysely<any>): Promise<void> {
248
287
  You can then use
249
288
 
250
289
  ```ts
251
- await db.migration.migrateToLatest(pathToMigrationsFolder)
290
+ const migrator = new Migrator(migratorConfig);
291
+ await migrator.migrateToLatest(pathToMigrationsFolder)
252
292
  ```
253
293
 
254
294
  to run all migrations that have not yet been run. The migrations are executed in alphabetical
255
- order by their name. See the [migration module](https://koskimas.github.io/kysely/classes/MigrationModule.html)
295
+ order by their name. See the [Migrator](https://koskimas.github.io/kysely/classes/Migrator.html)
256
296
  documentation for more info.
257
297
 
258
298
  Kysely doesn't have a CLI for running migrations and probably never will. This is because Kysely's
259
299
  migrations are also written in typescript. To run the migrations, you need to first build the
260
- typescript code into javascript. The CLI would cause confusion over which migrations are being
300
+ typescript code into javascript. A CLI would cause confusion over which migrations are being
261
301
  run, the typescript ones or the javascript ones. If we added support for both, the CLI would
262
302
  need to depend on a typescript compiler, which most production environments don't (and shouldn't)
263
303
  have. You will probably want to add a simple migration script to your projects like this:
264
304
 
265
305
  ```ts
266
- import path from 'path'
306
+ import * as path from 'path'
307
+ import * as fs from 'fs/promises'
267
308
 
268
- // This example assumes you have a file named `database.ts` that
269
- // creates and exports a `Kysely` instance `db`. You can just
270
- // as well create a new `Kysely` instance in the function below
271
- // or do something completely different to obtain an instance
272
- // of `Kysely`.
273
- import { db } from './database'
309
+ import {
310
+ Kysely,
311
+ Migrator,
312
+ PostgresDialect,
313
+ FileMigrationProvider
314
+ } from 'kysely'
274
315
 
275
316
  async function migrateToLatest() {
276
- const { error, results } = await db.migration.migrateToLatest(
277
- path.join(__dirname, 'migrations')
278
- )
317
+ const db = new Kysely<Database>({
318
+ dialect: new PostgresDialect({
319
+ host: 'localhost',
320
+ database: 'kysely_test',
321
+ }),
322
+ })
323
+
324
+ const migrator = new Migrator({
325
+ db,
326
+ // The constructor signature of FileMigrationProvider is a
327
+ // bit weird to keep Kysely independent of node.js or any
328
+ // other environment.
329
+ provider: new FileMigrationProvider(
330
+ fs.readdir,
331
+ path.join,
332
+ // Path to the folder that contains all your migrations.
333
+ 'migrations'
334
+ )
335
+ })
279
336
 
280
- // Destroy the `Kysely` instance to make the script exit faster.
281
- await db.destroy()
337
+ const { error, results } = await migrator.migrateToLatest()
282
338
 
283
339
  results?.forEach((it) => {
284
340
  if (it.status === 'Success') {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MysqlIntrospector = void 0;
4
- const migration_js_1 = require("../../migration/migration.js");
4
+ const migrator_js_1 = require("../../migration/migrator.js");
5
5
  const object_utils_js_1 = require("../../util/object-utils.js");
6
6
  class MysqlIntrospector {
7
7
  #db;
@@ -16,8 +16,8 @@ class MysqlIntrospector {
16
16
  .castTo();
17
17
  if (!options.withInternalKyselyTables) {
18
18
  query = query
19
- .where('table_name', '!=', migration_js_1.MIGRATION_TABLE)
20
- .where('table_name', '!=', migration_js_1.MIGRATION_LOCK_TABLE);
19
+ .where('table_name', '!=', migrator_js_1.MIGRATION_TABLE)
20
+ .where('table_name', '!=', migrator_js_1.MIGRATION_LOCK_TABLE);
21
21
  }
22
22
  const rawColumns = await query.execute();
23
23
  return {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostgresIntrospector = void 0;
4
- const migration_js_1 = require("../../migration/migration.js");
4
+ const migrator_js_1 = require("../../migration/migrator.js");
5
5
  const object_utils_js_1 = require("../../util/object-utils.js");
6
6
  class PostgresIntrospector {
7
7
  #db;
@@ -28,8 +28,8 @@ class PostgresIntrospector {
28
28
  .castTo();
29
29
  if (!options.withInternalKyselyTables) {
30
30
  query = query
31
- .where('t.tablename', '!=', migration_js_1.MIGRATION_TABLE)
32
- .where('t.tablename', '!=', migration_js_1.MIGRATION_LOCK_TABLE);
31
+ .where('t.tablename', '!=', migrator_js_1.MIGRATION_TABLE)
32
+ .where('t.tablename', '!=', migrator_js_1.MIGRATION_LOCK_TABLE);
33
33
  }
34
34
  const rawColumns = await query.execute();
35
35
  return {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SqliteIntrospector = void 0;
4
- const migration_js_1 = require("../../migration/migration.js");
4
+ const migrator_js_1 = require("../../migration/migrator.js");
5
5
  class SqliteIntrospector {
6
6
  #db;
7
7
  constructor(db) {
@@ -16,8 +16,8 @@ class SqliteIntrospector {
16
16
  .castTo();
17
17
  if (!options.withInternalKyselyTables) {
18
18
  query = query
19
- .where('name', '!=', migration_js_1.MIGRATION_TABLE)
20
- .where('name', '!=', migration_js_1.MIGRATION_LOCK_TABLE);
19
+ .where('name', '!=', migrator_js_1.MIGRATION_TABLE)
20
+ .where('name', '!=', migrator_js_1.MIGRATION_LOCK_TABLE);
21
21
  }
22
22
  const tables = await query.execute();
23
23
  return {
@@ -0,0 +1,148 @@
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 './query-executor/query-executor.js';
21
+ export * from './query-executor/default-query-executor.js';
22
+ export * from './query-executor/noop-query-executor.js';
23
+ export * from './query-compiler/default-query-compiler.js';
24
+ export * from './query-compiler/compiled-query.js';
25
+ export * from './schema/schema.js';
26
+ export * from './schema/create-table-builder.js';
27
+ export * from './schema/drop-table-builder.js';
28
+ export * from './schema/create-index-builder.js';
29
+ export * from './schema/drop-index-builder.js';
30
+ export * from './schema/create-schema-builder.js';
31
+ export * from './schema/drop-schema-builder.js';
32
+ export * from './schema/column-definition-builder.js';
33
+ export * from './schema/foreign-key-constraint-builder.js';
34
+ export * from './schema/alter-table-builder.js';
35
+ export * from './schema/create-view-builder.js';
36
+ export * from './schema/drop-view-builder.js';
37
+ export * from './dynamic/dynamic.js';
38
+ export * from './driver/driver.js';
39
+ export * from './driver/database-connection.js';
40
+ export * from './driver/connection-provider.js';
41
+ export * from './driver/default-connection-provider.js';
42
+ export * from './driver/single-connection-provider.js';
43
+ export * from './dialect/dialect.js';
44
+ export * from './dialect/dialect-adapter.js';
45
+ export * from './dialect/dialect-adapter-base.js';
46
+ export * from './dialect/database-introspector.js';
47
+ export * from './dialect/postgres/postgres-query-compiler.js';
48
+ export * from './dialect/postgres/postgres-introspector.js';
49
+ export * from './dialect/postgres/postgres-adapter.js';
50
+ export * from './dialect/mysql/mysql-query-compiler.js';
51
+ export * from './dialect/mysql/mysql-introspector.js';
52
+ export * from './dialect/mysql/mysql-adapter.js';
53
+ export * from './dialect/sqlite/sqlite-query-compiler.js';
54
+ export * from './dialect/sqlite/sqlite-introspector.js';
55
+ export * from './dialect/sqlite/sqlite-adapter.js';
56
+ export * from './query-compiler/default-query-compiler.js';
57
+ export * from './query-compiler/query-compiler.js';
58
+ export * from './migration/migrator.js';
59
+ export * from './plugin/kysely-plugin.js';
60
+ export * from './plugin/camel-case/camel-case-plugin.js';
61
+ export * from './operation-node/add-column-node.js';
62
+ export * from './operation-node/add-constraint-node.js';
63
+ export * from './operation-node/alias-node.js';
64
+ export * from './operation-node/alter-column-node.js';
65
+ export * from './operation-node/alter-table-node.js';
66
+ export * from './operation-node/and-node.js';
67
+ export * from './operation-node/check-constraint-node.js';
68
+ export * from './operation-node/column-definition-node.js';
69
+ export * from './operation-node/column-node.js';
70
+ export * from './operation-node/column-update-node.js';
71
+ export * from './operation-node/common-table-expression-node.js';
72
+ export * from './operation-node/common-table-expression-name-node.js';
73
+ export * from './operation-node/constraint-node.js';
74
+ export * from './operation-node/create-index-node.js';
75
+ export * from './operation-node/create-schema-node.js';
76
+ export * from './operation-node/create-table-node.js';
77
+ export * from './operation-node/create-view-node.js';
78
+ export * from './operation-node/data-type-node.js';
79
+ export * from './operation-node/default-value-node.js';
80
+ export * from './operation-node/delete-query-node.js';
81
+ export * from './operation-node/drop-column-node.js';
82
+ export * from './operation-node/drop-constraint-node.js';
83
+ export * from './operation-node/drop-index-node.js';
84
+ export * from './operation-node/drop-schema-node.js';
85
+ export * from './operation-node/drop-table-node.js';
86
+ export * from './operation-node/drop-view-node.js';
87
+ export * from './operation-node/filter-node.js';
88
+ export * from './operation-node/foreign-key-constraint-node.js';
89
+ export * from './operation-node/from-node.js';
90
+ export * from './operation-node/generated-node.js';
91
+ export * from './operation-node/group-by-item-node.js';
92
+ export * from './operation-node/group-by-node.js';
93
+ export * from './operation-node/having-node.js';
94
+ export * from './operation-node/identifier-node.js';
95
+ export * from './operation-node/insert-query-node.js';
96
+ export * from './operation-node/join-node.js';
97
+ export * from './operation-node/limit-node.js';
98
+ export * from './operation-node/list-node.js';
99
+ export * from './operation-node/modify-column-node.js';
100
+ export * from './operation-node/offset-node.js';
101
+ export * from './operation-node/on-conflict-node.js';
102
+ export * from './operation-node/on-duplicate-key-node.js';
103
+ export * from './operation-node/on-node.js';
104
+ export * from './operation-node/operation-node-source.js';
105
+ export * from './operation-node/operation-node-transformer.js';
106
+ export * from './operation-node/operation-node-utils.js';
107
+ export * from './operation-node/operation-node-visitor.js';
108
+ export * from './operation-node/operation-node.js';
109
+ export * from './operation-node/operator-node.js';
110
+ export * from './operation-node/or-node.js';
111
+ export * from './operation-node/order-by-item-node.js';
112
+ export * from './operation-node/order-by-node.js';
113
+ export * from './operation-node/parens-node.js';
114
+ export * from './operation-node/primary-constraint-node.js';
115
+ export * from './operation-node/primitive-value-list-node.js';
116
+ export * from './operation-node/query-node.js';
117
+ export * from './operation-node/raw-node.js';
118
+ export * from './operation-node/reference-node.js';
119
+ export * from './operation-node/references-node.js';
120
+ export * from './operation-node/rename-column-node.js';
121
+ export * from './operation-node/returning-node.js';
122
+ export * from './operation-node/select-all-node.js';
123
+ export * from './operation-node/select-query-node.js';
124
+ export * from './operation-node/select-query-node.js';
125
+ export * from './operation-node/selection-node.js';
126
+ export * from './operation-node/table-node.js';
127
+ export * from './operation-node/union-node.js';
128
+ export * from './operation-node/unique-constraint-node.js';
129
+ export * from './operation-node/update-query-node.js';
130
+ export * from './operation-node/value-list-node.js';
131
+ export * from './operation-node/value-node.js';
132
+ export * from './operation-node/values-node.js';
133
+ export * from './operation-node/where-node.js';
134
+ export * from './operation-node/with-node.js';
135
+ export * from './util/column-type.js';
136
+ export * from './util/compilable.js';
137
+ export * from './util/log.js';
138
+ export { AnyColumn, UnknownRow, AnySelectQueryBuilder, } from './util/type-utils.js';
139
+ export { SelectExpression, SelectExpressionOrList, Selection, } from './parser/select-parser.js';
140
+ export { ReferenceExpression, ReferenceExpressionOrList, } from './parser/reference-parser.js';
141
+ export { ValueExpression, ValueExpressionOrList, } from './parser/value-parser.js';
142
+ export { FilterValueExpression, FilterValueExpressionOrList, ExistsExpression, FilterOperator, } from './parser/filter-parser.js';
143
+ export { TableExpression, TableExpressionOrList, } from './parser/table-parser.js';
144
+ export { JoinReferenceExpression, JoinCallbackExpression, } from './parser/join-parser.js';
145
+ export { InsertObject } from './parser/insert-values-parser.js';
146
+ export { MutationObject } from './parser/update-set-parser.js';
147
+ export { OrderByExpression, OrderByDirectionExpression, } from './parser/order-by-parser.js';
148
+ export { UnionExpression } from './parser/union-parser.js';
@@ -0,0 +1,149 @@
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("./query-executor/query-executor.js"), exports);
33
+ __exportStar(require("./query-executor/default-query-executor.js"), exports);
34
+ __exportStar(require("./query-executor/noop-query-executor.js"), exports);
35
+ __exportStar(require("./query-compiler/default-query-compiler.js"), exports);
36
+ __exportStar(require("./query-compiler/compiled-query.js"), exports);
37
+ __exportStar(require("./schema/schema.js"), exports);
38
+ __exportStar(require("./schema/create-table-builder.js"), exports);
39
+ __exportStar(require("./schema/drop-table-builder.js"), exports);
40
+ __exportStar(require("./schema/create-index-builder.js"), exports);
41
+ __exportStar(require("./schema/drop-index-builder.js"), exports);
42
+ __exportStar(require("./schema/create-schema-builder.js"), exports);
43
+ __exportStar(require("./schema/drop-schema-builder.js"), exports);
44
+ __exportStar(require("./schema/column-definition-builder.js"), exports);
45
+ __exportStar(require("./schema/foreign-key-constraint-builder.js"), exports);
46
+ __exportStar(require("./schema/alter-table-builder.js"), exports);
47
+ __exportStar(require("./schema/create-view-builder.js"), exports);
48
+ __exportStar(require("./schema/drop-view-builder.js"), exports);
49
+ __exportStar(require("./dynamic/dynamic.js"), exports);
50
+ __exportStar(require("./driver/driver.js"), exports);
51
+ __exportStar(require("./driver/database-connection.js"), exports);
52
+ __exportStar(require("./driver/connection-provider.js"), exports);
53
+ __exportStar(require("./driver/default-connection-provider.js"), exports);
54
+ __exportStar(require("./driver/single-connection-provider.js"), exports);
55
+ __exportStar(require("./dialect/dialect.js"), exports);
56
+ __exportStar(require("./dialect/dialect-adapter.js"), exports);
57
+ __exportStar(require("./dialect/dialect-adapter-base.js"), exports);
58
+ __exportStar(require("./dialect/database-introspector.js"), exports);
59
+ __exportStar(require("./dialect/postgres/postgres-query-compiler.js"), exports);
60
+ __exportStar(require("./dialect/postgres/postgres-introspector.js"), exports);
61
+ __exportStar(require("./dialect/postgres/postgres-adapter.js"), exports);
62
+ __exportStar(require("./dialect/mysql/mysql-query-compiler.js"), exports);
63
+ __exportStar(require("./dialect/mysql/mysql-introspector.js"), exports);
64
+ __exportStar(require("./dialect/mysql/mysql-adapter.js"), exports);
65
+ __exportStar(require("./dialect/sqlite/sqlite-query-compiler.js"), exports);
66
+ __exportStar(require("./dialect/sqlite/sqlite-introspector.js"), exports);
67
+ __exportStar(require("./dialect/sqlite/sqlite-adapter.js"), exports);
68
+ __exportStar(require("./query-compiler/default-query-compiler.js"), exports);
69
+ __exportStar(require("./query-compiler/query-compiler.js"), exports);
70
+ __exportStar(require("./migration/migrator.js"), exports);
71
+ __exportStar(require("./plugin/kysely-plugin.js"), exports);
72
+ __exportStar(require("./plugin/camel-case/camel-case-plugin.js"), exports);
73
+ __exportStar(require("./operation-node/add-column-node.js"), exports);
74
+ __exportStar(require("./operation-node/add-constraint-node.js"), exports);
75
+ __exportStar(require("./operation-node/alias-node.js"), exports);
76
+ __exportStar(require("./operation-node/alter-column-node.js"), exports);
77
+ __exportStar(require("./operation-node/alter-table-node.js"), exports);
78
+ __exportStar(require("./operation-node/and-node.js"), exports);
79
+ __exportStar(require("./operation-node/check-constraint-node.js"), exports);
80
+ __exportStar(require("./operation-node/column-definition-node.js"), exports);
81
+ __exportStar(require("./operation-node/column-node.js"), exports);
82
+ __exportStar(require("./operation-node/column-update-node.js"), exports);
83
+ __exportStar(require("./operation-node/common-table-expression-node.js"), exports);
84
+ __exportStar(require("./operation-node/common-table-expression-name-node.js"), exports);
85
+ __exportStar(require("./operation-node/constraint-node.js"), exports);
86
+ __exportStar(require("./operation-node/create-index-node.js"), exports);
87
+ __exportStar(require("./operation-node/create-schema-node.js"), exports);
88
+ __exportStar(require("./operation-node/create-table-node.js"), exports);
89
+ __exportStar(require("./operation-node/create-view-node.js"), exports);
90
+ __exportStar(require("./operation-node/data-type-node.js"), exports);
91
+ __exportStar(require("./operation-node/default-value-node.js"), exports);
92
+ __exportStar(require("./operation-node/delete-query-node.js"), exports);
93
+ __exportStar(require("./operation-node/drop-column-node.js"), exports);
94
+ __exportStar(require("./operation-node/drop-constraint-node.js"), exports);
95
+ __exportStar(require("./operation-node/drop-index-node.js"), exports);
96
+ __exportStar(require("./operation-node/drop-schema-node.js"), exports);
97
+ __exportStar(require("./operation-node/drop-table-node.js"), exports);
98
+ __exportStar(require("./operation-node/drop-view-node.js"), exports);
99
+ __exportStar(require("./operation-node/filter-node.js"), exports);
100
+ __exportStar(require("./operation-node/foreign-key-constraint-node.js"), exports);
101
+ __exportStar(require("./operation-node/from-node.js"), exports);
102
+ __exportStar(require("./operation-node/generated-node.js"), exports);
103
+ __exportStar(require("./operation-node/group-by-item-node.js"), exports);
104
+ __exportStar(require("./operation-node/group-by-node.js"), exports);
105
+ __exportStar(require("./operation-node/having-node.js"), exports);
106
+ __exportStar(require("./operation-node/identifier-node.js"), exports);
107
+ __exportStar(require("./operation-node/insert-query-node.js"), exports);
108
+ __exportStar(require("./operation-node/join-node.js"), exports);
109
+ __exportStar(require("./operation-node/limit-node.js"), exports);
110
+ __exportStar(require("./operation-node/list-node.js"), exports);
111
+ __exportStar(require("./operation-node/modify-column-node.js"), exports);
112
+ __exportStar(require("./operation-node/offset-node.js"), exports);
113
+ __exportStar(require("./operation-node/on-conflict-node.js"), exports);
114
+ __exportStar(require("./operation-node/on-duplicate-key-node.js"), exports);
115
+ __exportStar(require("./operation-node/on-node.js"), exports);
116
+ __exportStar(require("./operation-node/operation-node-source.js"), exports);
117
+ __exportStar(require("./operation-node/operation-node-transformer.js"), exports);
118
+ __exportStar(require("./operation-node/operation-node-utils.js"), exports);
119
+ __exportStar(require("./operation-node/operation-node-visitor.js"), exports);
120
+ __exportStar(require("./operation-node/operation-node.js"), exports);
121
+ __exportStar(require("./operation-node/operator-node.js"), exports);
122
+ __exportStar(require("./operation-node/or-node.js"), exports);
123
+ __exportStar(require("./operation-node/order-by-item-node.js"), exports);
124
+ __exportStar(require("./operation-node/order-by-node.js"), exports);
125
+ __exportStar(require("./operation-node/parens-node.js"), exports);
126
+ __exportStar(require("./operation-node/primary-constraint-node.js"), exports);
127
+ __exportStar(require("./operation-node/primitive-value-list-node.js"), exports);
128
+ __exportStar(require("./operation-node/query-node.js"), exports);
129
+ __exportStar(require("./operation-node/raw-node.js"), exports);
130
+ __exportStar(require("./operation-node/reference-node.js"), exports);
131
+ __exportStar(require("./operation-node/references-node.js"), exports);
132
+ __exportStar(require("./operation-node/rename-column-node.js"), exports);
133
+ __exportStar(require("./operation-node/returning-node.js"), exports);
134
+ __exportStar(require("./operation-node/select-all-node.js"), exports);
135
+ __exportStar(require("./operation-node/select-query-node.js"), exports);
136
+ __exportStar(require("./operation-node/select-query-node.js"), exports);
137
+ __exportStar(require("./operation-node/selection-node.js"), exports);
138
+ __exportStar(require("./operation-node/table-node.js"), exports);
139
+ __exportStar(require("./operation-node/union-node.js"), exports);
140
+ __exportStar(require("./operation-node/unique-constraint-node.js"), exports);
141
+ __exportStar(require("./operation-node/update-query-node.js"), exports);
142
+ __exportStar(require("./operation-node/value-list-node.js"), exports);
143
+ __exportStar(require("./operation-node/value-node.js"), exports);
144
+ __exportStar(require("./operation-node/values-node.js"), exports);
145
+ __exportStar(require("./operation-node/where-node.js"), exports);
146
+ __exportStar(require("./operation-node/with-node.js"), exports);
147
+ __exportStar(require("./util/column-type.js"), exports);
148
+ __exportStar(require("./util/compilable.js"), exports);
149
+ __exportStar(require("./util/log.js"), exports);