kysely 0.15.1 → 0.16.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 +12 -24
- package/dist/cjs/dialect/database-introspector.d.ts +1 -1
- package/dist/cjs/dialect/dialect-adapter-base.d.ts +1 -1
- package/dist/cjs/dialect/dialect-adapter.d.ts +1 -1
- package/dist/cjs/dialect/dialect.d.ts +2 -2
- package/dist/cjs/dialect/mysql/mysql-adapter.d.ts +1 -1
- package/dist/cjs/dialect/mysql/mysql-dialect.d.ts +2 -2
- package/dist/cjs/dialect/mysql/mysql-introspector.d.ts +1 -1
- package/dist/cjs/dialect/postgres/postgres-adapter.d.ts +1 -1
- package/dist/cjs/dialect/postgres/postgres-dialect.d.ts +2 -2
- package/dist/cjs/dialect/postgres/postgres-introspector.d.ts +1 -1
- package/dist/cjs/dialect/sqlite/sqlite-adapter.d.ts +1 -1
- package/dist/cjs/dialect/sqlite/sqlite-dialect.d.ts +2 -2
- package/dist/cjs/dialect/sqlite/sqlite-introspector.d.ts +1 -1
- package/dist/cjs/index-nodeless.d.ts +148 -0
- package/dist/cjs/index-nodeless.js +149 -0
- package/dist/cjs/index.d.ts +6 -153
- package/dist/cjs/index.js +6 -142
- package/dist/cjs/kysely.js +9 -5
- package/dist/cjs/migration/file-migration-provider.d.ts +2 -25
- package/dist/cjs/migration/file-migration-provider.js +8 -17
- package/dist/cjs/migration/migrator.d.ts +2 -15
- package/dist/cjs/migration/migrator.js +2 -15
- package/dist/cjs/operation-node/constraint-node.d.ts +4 -4
- package/dist/cjs/parser/join-parser.d.ts +4 -4
- package/dist/cjs/query-builder/delete-query-builder.d.ts +3 -3
- package/dist/cjs/query-builder/join-interface.d.ts +3 -3
- package/dist/cjs/query-builder/select-query-builder.d.ts +3 -3
- package/dist/cjs/query-builder/update-query-builder.d.ts +3 -3
- package/dist/esm/dialect/database-introspector.d.ts +1 -1
- package/dist/esm/dialect/dialect-adapter-base.d.ts +1 -1
- package/dist/esm/dialect/dialect-adapter.d.ts +1 -1
- package/dist/esm/dialect/dialect.d.ts +2 -2
- package/dist/esm/dialect/mysql/mysql-adapter.d.ts +1 -1
- package/dist/esm/dialect/mysql/mysql-dialect.d.ts +2 -2
- package/dist/esm/dialect/mysql/mysql-introspector.d.ts +1 -1
- package/dist/esm/dialect/postgres/postgres-adapter.d.ts +1 -1
- package/dist/esm/dialect/postgres/postgres-dialect.d.ts +2 -2
- package/dist/esm/dialect/postgres/postgres-introspector.d.ts +1 -1
- package/dist/esm/dialect/sqlite/sqlite-adapter.d.ts +1 -1
- package/dist/esm/dialect/sqlite/sqlite-dialect.d.ts +2 -2
- package/dist/esm/dialect/sqlite/sqlite-introspector.d.ts +1 -1
- package/dist/esm/index-nodeless.d.ts +148 -0
- package/dist/esm/index-nodeless.js +137 -0
- package/dist/esm/index.d.ts +6 -153
- package/dist/esm/index.js +6 -142
- package/dist/esm/kysely.js +9 -5
- package/dist/esm/migration/file-migration-provider.d.ts +2 -25
- package/dist/esm/migration/file-migration-provider.js +8 -17
- package/dist/esm/migration/migrator.d.ts +2 -15
- package/dist/esm/migration/migrator.js +2 -15
- package/dist/esm/operation-node/constraint-node.d.ts +4 -4
- package/dist/esm/parser/join-parser.d.ts +4 -4
- package/dist/esm/query-builder/delete-query-builder.d.ts +3 -3
- package/dist/esm/query-builder/join-interface.d.ts +3 -3
- package/dist/esm/query-builder/select-query-builder.d.ts +3 -3
- package/dist/esm/query-builder/update-query-builder.d.ts +3 -3
- package/package.json +4 -2
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,155 +1,8 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
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/postgres/postgres-dialect.js';
|
|
44
|
-
export * from './dialect/postgres/postgres-query-compiler.js';
|
|
45
|
-
export * from './dialect/postgres/postgres-driver.js';
|
|
46
|
-
export * from './dialect/postgres/postgres-introspector.js';
|
|
47
|
-
export * from './dialect/postgres/postgres-adapter.js';
|
|
48
|
-
export * from './dialect/mysql/mysql-dialect.js';
|
|
49
|
-
export * from './dialect/mysql/mysql-query-compiler.js';
|
|
50
|
-
export * from './dialect/mysql/mysql-driver.js';
|
|
51
|
-
export * from './dialect/mysql/mysql-introspector.js';
|
|
52
|
-
export * from './dialect/mysql/mysql-adapter.js';
|
|
1
|
+
export * from './index-nodeless.js';
|
|
2
|
+
export * from './migration/file-migration-provider.js';
|
|
53
3
|
export * from './dialect/sqlite/sqlite-dialect.js';
|
|
54
|
-
export * from './dialect/sqlite/sqlite-query-compiler.js';
|
|
55
4
|
export * from './dialect/sqlite/sqlite-driver.js';
|
|
56
|
-
export * from './dialect/
|
|
57
|
-
export * from './dialect/
|
|
58
|
-
export * from './
|
|
59
|
-
export * from './
|
|
60
|
-
export * from './migration/migrator.js';
|
|
61
|
-
export * from './migration/file-migration-provider.js';
|
|
62
|
-
export * from './dialect/dialect.js';
|
|
63
|
-
export * from './dialect/dialect-adapter.js';
|
|
64
|
-
export * from './dialect/dialect-adapter-base.js';
|
|
65
|
-
export * from './plugin/kysely-plugin.js';
|
|
66
|
-
export * from './plugin/camel-case/camel-case-plugin.js';
|
|
67
|
-
export * from './operation-node/add-column-node.js';
|
|
68
|
-
export * from './operation-node/add-constraint-node.js';
|
|
69
|
-
export * from './operation-node/alias-node.js';
|
|
70
|
-
export * from './operation-node/alter-column-node.js';
|
|
71
|
-
export * from './operation-node/alter-table-node.js';
|
|
72
|
-
export * from './operation-node/and-node.js';
|
|
73
|
-
export * from './operation-node/check-constraint-node.js';
|
|
74
|
-
export * from './operation-node/column-definition-node.js';
|
|
75
|
-
export * from './operation-node/column-node.js';
|
|
76
|
-
export * from './operation-node/column-update-node.js';
|
|
77
|
-
export * from './operation-node/common-table-expression-node.js';
|
|
78
|
-
export * from './operation-node/common-table-expression-name-node.js';
|
|
79
|
-
export * from './operation-node/constraint-node.js';
|
|
80
|
-
export * from './operation-node/create-index-node.js';
|
|
81
|
-
export * from './operation-node/create-schema-node.js';
|
|
82
|
-
export * from './operation-node/create-table-node.js';
|
|
83
|
-
export * from './operation-node/create-view-node.js';
|
|
84
|
-
export * from './operation-node/data-type-node.js';
|
|
85
|
-
export * from './operation-node/default-value-node.js';
|
|
86
|
-
export * from './operation-node/delete-query-node.js';
|
|
87
|
-
export * from './operation-node/drop-column-node.js';
|
|
88
|
-
export * from './operation-node/drop-constraint-node.js';
|
|
89
|
-
export * from './operation-node/drop-index-node.js';
|
|
90
|
-
export * from './operation-node/drop-schema-node.js';
|
|
91
|
-
export * from './operation-node/drop-table-node.js';
|
|
92
|
-
export * from './operation-node/drop-view-node.js';
|
|
93
|
-
export * from './operation-node/filter-node.js';
|
|
94
|
-
export * from './operation-node/foreign-key-constraint-node.js';
|
|
95
|
-
export * from './operation-node/from-node.js';
|
|
96
|
-
export * from './operation-node/generated-node.js';
|
|
97
|
-
export * from './operation-node/group-by-item-node.js';
|
|
98
|
-
export * from './operation-node/group-by-node.js';
|
|
99
|
-
export * from './operation-node/having-node.js';
|
|
100
|
-
export * from './operation-node/identifier-node.js';
|
|
101
|
-
export * from './operation-node/insert-query-node.js';
|
|
102
|
-
export * from './operation-node/join-node.js';
|
|
103
|
-
export * from './operation-node/limit-node.js';
|
|
104
|
-
export * from './operation-node/list-node.js';
|
|
105
|
-
export * from './operation-node/modify-column-node.js';
|
|
106
|
-
export * from './operation-node/offset-node.js';
|
|
107
|
-
export * from './operation-node/on-conflict-node.js';
|
|
108
|
-
export * from './operation-node/on-duplicate-key-node.js';
|
|
109
|
-
export * from './operation-node/on-node.js';
|
|
110
|
-
export * from './operation-node/operation-node-source.js';
|
|
111
|
-
export * from './operation-node/operation-node-transformer.js';
|
|
112
|
-
export * from './operation-node/operation-node-utils.js';
|
|
113
|
-
export * from './operation-node/operation-node-visitor.js';
|
|
114
|
-
export * from './operation-node/operation-node.js';
|
|
115
|
-
export * from './operation-node/operator-node.js';
|
|
116
|
-
export * from './operation-node/or-node.js';
|
|
117
|
-
export * from './operation-node/order-by-item-node.js';
|
|
118
|
-
export * from './operation-node/order-by-node.js';
|
|
119
|
-
export * from './operation-node/parens-node.js';
|
|
120
|
-
export * from './operation-node/primary-constraint-node.js';
|
|
121
|
-
export * from './operation-node/primitive-value-list-node.js';
|
|
122
|
-
export * from './operation-node/query-node.js';
|
|
123
|
-
export * from './operation-node/raw-node.js';
|
|
124
|
-
export * from './operation-node/reference-node.js';
|
|
125
|
-
export * from './operation-node/references-node.js';
|
|
126
|
-
export * from './operation-node/rename-column-node.js';
|
|
127
|
-
export * from './operation-node/returning-node.js';
|
|
128
|
-
export * from './operation-node/select-all-node.js';
|
|
129
|
-
export * from './operation-node/select-query-node.js';
|
|
130
|
-
export * from './operation-node/select-query-node.js';
|
|
131
|
-
export * from './operation-node/selection-node.js';
|
|
132
|
-
export * from './operation-node/table-node.js';
|
|
133
|
-
export * from './operation-node/union-node.js';
|
|
134
|
-
export * from './operation-node/unique-constraint-node.js';
|
|
135
|
-
export * from './operation-node/update-query-node.js';
|
|
136
|
-
export * from './operation-node/value-list-node.js';
|
|
137
|
-
export * from './operation-node/value-node.js';
|
|
138
|
-
export * from './operation-node/values-node.js';
|
|
139
|
-
export * from './operation-node/where-node.js';
|
|
140
|
-
export * from './operation-node/with-node.js';
|
|
141
|
-
export * from './dialect/database-introspector.js';
|
|
142
|
-
export * from './util/column-type.js';
|
|
143
|
-
export * from './util/compilable.js';
|
|
144
|
-
export * from './util/log.js';
|
|
145
|
-
export { AnyColumn, UnknownRow, AnySelectQueryBuilder, } from './util/type-utils.js';
|
|
146
|
-
export { SelectExpression, SelectExpressionOrList, Selection, } from './parser/select-parser.js';
|
|
147
|
-
export { ReferenceExpression, ReferenceExpressionOrList, } from './parser/reference-parser.js';
|
|
148
|
-
export { ValueExpression, ValueExpressionOrList, } from './parser/value-parser.js';
|
|
149
|
-
export { FilterValueExpression, FilterValueExpressionOrList, ExistsExpression, FilterOperator, } from './parser/filter-parser.js';
|
|
150
|
-
export { TableExpression, TableExpressionOrList, } from './parser/table-parser.js';
|
|
151
|
-
export { JoinReferenceExpression, JoinCallbackExpression, } from './parser/join-parser.js';
|
|
152
|
-
export { InsertObject } from './parser/insert-values-parser.js';
|
|
153
|
-
export { MutationObject } from './parser/update-set-parser.js';
|
|
154
|
-
export { OrderByExpression, OrderByDirectionExpression, } from './parser/order-by-parser.js';
|
|
155
|
-
export { UnionExpression } from './parser/union-parser.js';
|
|
5
|
+
export * from './dialect/mysql/mysql-dialect.js';
|
|
6
|
+
export * from './dialect/mysql/mysql-driver.js';
|
|
7
|
+
export * from './dialect/postgres/postgres-driver.js';
|
|
8
|
+
export * from './dialect/postgres/postgres-dialect.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -10,147 +10,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./
|
|
14
|
-
__exportStar(require("./
|
|
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/postgres/postgres-dialect.js"), exports);
|
|
56
|
-
__exportStar(require("./dialect/postgres/postgres-query-compiler.js"), exports);
|
|
57
|
-
__exportStar(require("./dialect/postgres/postgres-driver.js"), exports);
|
|
58
|
-
__exportStar(require("./dialect/postgres/postgres-introspector.js"), exports);
|
|
59
|
-
__exportStar(require("./dialect/postgres/postgres-adapter.js"), exports);
|
|
60
|
-
__exportStar(require("./dialect/mysql/mysql-dialect.js"), exports);
|
|
61
|
-
__exportStar(require("./dialect/mysql/mysql-query-compiler.js"), exports);
|
|
62
|
-
__exportStar(require("./dialect/mysql/mysql-driver.js"), exports);
|
|
63
|
-
__exportStar(require("./dialect/mysql/mysql-introspector.js"), exports);
|
|
64
|
-
__exportStar(require("./dialect/mysql/mysql-adapter.js"), exports);
|
|
13
|
+
__exportStar(require("./index-nodeless.js"), exports);
|
|
14
|
+
__exportStar(require("./migration/file-migration-provider.js"), exports);
|
|
65
15
|
__exportStar(require("./dialect/sqlite/sqlite-dialect.js"), exports);
|
|
66
|
-
__exportStar(require("./dialect/sqlite/sqlite-query-compiler.js"), exports);
|
|
67
16
|
__exportStar(require("./dialect/sqlite/sqlite-driver.js"), exports);
|
|
68
|
-
__exportStar(require("./dialect/
|
|
69
|
-
__exportStar(require("./dialect/
|
|
70
|
-
__exportStar(require("./
|
|
71
|
-
__exportStar(require("./
|
|
72
|
-
__exportStar(require("./migration/migrator.js"), exports);
|
|
73
|
-
__exportStar(require("./migration/file-migration-provider.js"), exports);
|
|
74
|
-
__exportStar(require("./dialect/dialect.js"), exports);
|
|
75
|
-
__exportStar(require("./dialect/dialect-adapter.js"), exports);
|
|
76
|
-
__exportStar(require("./dialect/dialect-adapter-base.js"), exports);
|
|
77
|
-
__exportStar(require("./plugin/kysely-plugin.js"), exports);
|
|
78
|
-
__exportStar(require("./plugin/camel-case/camel-case-plugin.js"), exports);
|
|
79
|
-
__exportStar(require("./operation-node/add-column-node.js"), exports);
|
|
80
|
-
__exportStar(require("./operation-node/add-constraint-node.js"), exports);
|
|
81
|
-
__exportStar(require("./operation-node/alias-node.js"), exports);
|
|
82
|
-
__exportStar(require("./operation-node/alter-column-node.js"), exports);
|
|
83
|
-
__exportStar(require("./operation-node/alter-table-node.js"), exports);
|
|
84
|
-
__exportStar(require("./operation-node/and-node.js"), exports);
|
|
85
|
-
__exportStar(require("./operation-node/check-constraint-node.js"), exports);
|
|
86
|
-
__exportStar(require("./operation-node/column-definition-node.js"), exports);
|
|
87
|
-
__exportStar(require("./operation-node/column-node.js"), exports);
|
|
88
|
-
__exportStar(require("./operation-node/column-update-node.js"), exports);
|
|
89
|
-
__exportStar(require("./operation-node/common-table-expression-node.js"), exports);
|
|
90
|
-
__exportStar(require("./operation-node/common-table-expression-name-node.js"), exports);
|
|
91
|
-
__exportStar(require("./operation-node/constraint-node.js"), exports);
|
|
92
|
-
__exportStar(require("./operation-node/create-index-node.js"), exports);
|
|
93
|
-
__exportStar(require("./operation-node/create-schema-node.js"), exports);
|
|
94
|
-
__exportStar(require("./operation-node/create-table-node.js"), exports);
|
|
95
|
-
__exportStar(require("./operation-node/create-view-node.js"), exports);
|
|
96
|
-
__exportStar(require("./operation-node/data-type-node.js"), exports);
|
|
97
|
-
__exportStar(require("./operation-node/default-value-node.js"), exports);
|
|
98
|
-
__exportStar(require("./operation-node/delete-query-node.js"), exports);
|
|
99
|
-
__exportStar(require("./operation-node/drop-column-node.js"), exports);
|
|
100
|
-
__exportStar(require("./operation-node/drop-constraint-node.js"), exports);
|
|
101
|
-
__exportStar(require("./operation-node/drop-index-node.js"), exports);
|
|
102
|
-
__exportStar(require("./operation-node/drop-schema-node.js"), exports);
|
|
103
|
-
__exportStar(require("./operation-node/drop-table-node.js"), exports);
|
|
104
|
-
__exportStar(require("./operation-node/drop-view-node.js"), exports);
|
|
105
|
-
__exportStar(require("./operation-node/filter-node.js"), exports);
|
|
106
|
-
__exportStar(require("./operation-node/foreign-key-constraint-node.js"), exports);
|
|
107
|
-
__exportStar(require("./operation-node/from-node.js"), exports);
|
|
108
|
-
__exportStar(require("./operation-node/generated-node.js"), exports);
|
|
109
|
-
__exportStar(require("./operation-node/group-by-item-node.js"), exports);
|
|
110
|
-
__exportStar(require("./operation-node/group-by-node.js"), exports);
|
|
111
|
-
__exportStar(require("./operation-node/having-node.js"), exports);
|
|
112
|
-
__exportStar(require("./operation-node/identifier-node.js"), exports);
|
|
113
|
-
__exportStar(require("./operation-node/insert-query-node.js"), exports);
|
|
114
|
-
__exportStar(require("./operation-node/join-node.js"), exports);
|
|
115
|
-
__exportStar(require("./operation-node/limit-node.js"), exports);
|
|
116
|
-
__exportStar(require("./operation-node/list-node.js"), exports);
|
|
117
|
-
__exportStar(require("./operation-node/modify-column-node.js"), exports);
|
|
118
|
-
__exportStar(require("./operation-node/offset-node.js"), exports);
|
|
119
|
-
__exportStar(require("./operation-node/on-conflict-node.js"), exports);
|
|
120
|
-
__exportStar(require("./operation-node/on-duplicate-key-node.js"), exports);
|
|
121
|
-
__exportStar(require("./operation-node/on-node.js"), exports);
|
|
122
|
-
__exportStar(require("./operation-node/operation-node-source.js"), exports);
|
|
123
|
-
__exportStar(require("./operation-node/operation-node-transformer.js"), exports);
|
|
124
|
-
__exportStar(require("./operation-node/operation-node-utils.js"), exports);
|
|
125
|
-
__exportStar(require("./operation-node/operation-node-visitor.js"), exports);
|
|
126
|
-
__exportStar(require("./operation-node/operation-node.js"), exports);
|
|
127
|
-
__exportStar(require("./operation-node/operator-node.js"), exports);
|
|
128
|
-
__exportStar(require("./operation-node/or-node.js"), exports);
|
|
129
|
-
__exportStar(require("./operation-node/order-by-item-node.js"), exports);
|
|
130
|
-
__exportStar(require("./operation-node/order-by-node.js"), exports);
|
|
131
|
-
__exportStar(require("./operation-node/parens-node.js"), exports);
|
|
132
|
-
__exportStar(require("./operation-node/primary-constraint-node.js"), exports);
|
|
133
|
-
__exportStar(require("./operation-node/primitive-value-list-node.js"), exports);
|
|
134
|
-
__exportStar(require("./operation-node/query-node.js"), exports);
|
|
135
|
-
__exportStar(require("./operation-node/raw-node.js"), exports);
|
|
136
|
-
__exportStar(require("./operation-node/reference-node.js"), exports);
|
|
137
|
-
__exportStar(require("./operation-node/references-node.js"), exports);
|
|
138
|
-
__exportStar(require("./operation-node/rename-column-node.js"), exports);
|
|
139
|
-
__exportStar(require("./operation-node/returning-node.js"), exports);
|
|
140
|
-
__exportStar(require("./operation-node/select-all-node.js"), exports);
|
|
141
|
-
__exportStar(require("./operation-node/select-query-node.js"), exports);
|
|
142
|
-
__exportStar(require("./operation-node/select-query-node.js"), exports);
|
|
143
|
-
__exportStar(require("./operation-node/selection-node.js"), exports);
|
|
144
|
-
__exportStar(require("./operation-node/table-node.js"), exports);
|
|
145
|
-
__exportStar(require("./operation-node/union-node.js"), exports);
|
|
146
|
-
__exportStar(require("./operation-node/unique-constraint-node.js"), exports);
|
|
147
|
-
__exportStar(require("./operation-node/update-query-node.js"), exports);
|
|
148
|
-
__exportStar(require("./operation-node/value-list-node.js"), exports);
|
|
149
|
-
__exportStar(require("./operation-node/value-node.js"), exports);
|
|
150
|
-
__exportStar(require("./operation-node/values-node.js"), exports);
|
|
151
|
-
__exportStar(require("./operation-node/where-node.js"), exports);
|
|
152
|
-
__exportStar(require("./operation-node/with-node.js"), exports);
|
|
153
|
-
__exportStar(require("./dialect/database-introspector.js"), exports);
|
|
154
|
-
__exportStar(require("./util/column-type.js"), exports);
|
|
155
|
-
__exportStar(require("./util/compilable.js"), exports);
|
|
156
|
-
__exportStar(require("./util/log.js"), exports);
|
|
17
|
+
__exportStar(require("./dialect/mysql/mysql-dialect.js"), exports);
|
|
18
|
+
__exportStar(require("./dialect/mysql/mysql-driver.js"), exports);
|
|
19
|
+
__exportStar(require("./dialect/postgres/postgres-driver.js"), exports);
|
|
20
|
+
__exportStar(require("./dialect/postgres/postgres-dialect.js"), exports);
|
package/dist/cjs/kysely.js
CHANGED
|
@@ -59,9 +59,11 @@ const private_symbols_js_1 = require("./util/private-symbols.js");
|
|
|
59
59
|
class Kysely extends query_creator_js_1.QueryCreator {
|
|
60
60
|
#props;
|
|
61
61
|
constructor(args) {
|
|
62
|
+
let superProps;
|
|
63
|
+
let props;
|
|
62
64
|
if (isKyselyProps(args)) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
superProps = { executor: args.executor, parseContext: args.parseContext };
|
|
66
|
+
props = { ...args };
|
|
65
67
|
}
|
|
66
68
|
else {
|
|
67
69
|
const dialect = args.dialect;
|
|
@@ -73,15 +75,17 @@ class Kysely extends query_creator_js_1.QueryCreator {
|
|
|
73
75
|
const runtimeDriver = new runtime_driver_js_1.RuntimeDriver(driver, log);
|
|
74
76
|
const connectionProvider = new default_connection_provider_js_1.DefaultConnectionProvider(runtimeDriver);
|
|
75
77
|
const executor = new default_query_executor_js_1.DefaultQueryExecutor(compiler, connectionProvider, args.plugins ?? []);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
superProps = { executor, parseContext };
|
|
79
|
+
props = {
|
|
78
80
|
config: args,
|
|
79
81
|
executor,
|
|
80
82
|
dialect,
|
|
81
83
|
driver: runtimeDriver,
|
|
82
84
|
parseContext,
|
|
83
|
-
}
|
|
85
|
+
};
|
|
84
86
|
}
|
|
87
|
+
super(superProps);
|
|
88
|
+
this.#props = (0, object_utils_js_1.freeze)(props);
|
|
85
89
|
}
|
|
86
90
|
/**
|
|
87
91
|
* Returns the {@link SchemaModule} module for building database schema.
|
|
@@ -1,41 +1,18 @@
|
|
|
1
1
|
import { Migration, MigrationProvider } from './migrator.js';
|
|
2
|
-
/**
|
|
3
|
-
* A function that takes a folder path and returns names of the
|
|
4
|
-
* files insider that folder.
|
|
5
|
-
*/
|
|
6
|
-
export declare type ReadDir = (migrationFolderPath: string) => Promise<string[]>;
|
|
7
|
-
/**
|
|
8
|
-
* A function that combines two file path parts into a single file path.
|
|
9
|
-
*
|
|
10
|
-
* ```ts
|
|
11
|
-
* joinPath('/some/path', 'file.ts')
|
|
12
|
-
* // ==> '/some/path/file.ts'
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
export declare type JoinPath = (part1: string, part2: string) => string;
|
|
16
2
|
/**
|
|
17
3
|
* Reads all migrations from a folder.
|
|
18
4
|
*
|
|
19
|
-
* You need to provide a function for reading files in a folder and a function for
|
|
20
|
-
* joining file paths together. The API is like this to make Kysely independent of
|
|
21
|
-
* node.js or any other environment. See the example usage on node.js below.
|
|
22
|
-
*
|
|
23
5
|
* ### Examples
|
|
24
6
|
*
|
|
25
7
|
* ```ts
|
|
26
|
-
* import * as path from 'path'
|
|
27
|
-
* import * as fs from 'fs/promises'
|
|
28
|
-
*
|
|
29
8
|
* new FileMigrationProvider(
|
|
30
|
-
*
|
|
31
|
-
* path.join,
|
|
32
|
-
* path.join(__dirname, 'migrations')
|
|
9
|
+
* 'path/to/migrations/folder'
|
|
33
10
|
* )
|
|
34
11
|
* ```
|
|
35
12
|
*/
|
|
36
13
|
export declare class FileMigrationProvider implements MigrationProvider {
|
|
37
14
|
#private;
|
|
38
|
-
constructor(
|
|
15
|
+
constructor(migrationFolderPath: string);
|
|
39
16
|
/**
|
|
40
17
|
* Returns all migrations, old and new.
|
|
41
18
|
*
|
|
@@ -5,39 +5,30 @@ const object_utils_js_1 = require("../util/object-utils.js");
|
|
|
5
5
|
/**
|
|
6
6
|
* Reads all migrations from a folder.
|
|
7
7
|
*
|
|
8
|
-
* You need to provide a function for reading files in a folder and a function for
|
|
9
|
-
* joining file paths together. The API is like this to make Kysely independent of
|
|
10
|
-
* node.js or any other environment. See the example usage on node.js below.
|
|
11
|
-
*
|
|
12
8
|
* ### Examples
|
|
13
9
|
*
|
|
14
10
|
* ```ts
|
|
15
|
-
* import * as path from 'path'
|
|
16
|
-
* import * as fs from 'fs/promises'
|
|
17
|
-
*
|
|
18
11
|
* new FileMigrationProvider(
|
|
19
|
-
*
|
|
20
|
-
* path.join,
|
|
21
|
-
* path.join(__dirname, 'migrations')
|
|
12
|
+
* 'path/to/migrations/folder'
|
|
22
13
|
* )
|
|
23
14
|
* ```
|
|
24
15
|
*/
|
|
25
16
|
class FileMigrationProvider {
|
|
26
|
-
#readDir;
|
|
27
|
-
#joinPath;
|
|
28
17
|
#migrationFolderPath;
|
|
29
|
-
constructor(
|
|
30
|
-
this.#readDir = readDir;
|
|
31
|
-
this.#joinPath = joinPath;
|
|
18
|
+
constructor(migrationFolderPath) {
|
|
32
19
|
this.#migrationFolderPath = migrationFolderPath;
|
|
33
20
|
}
|
|
34
21
|
async getMigrations() {
|
|
22
|
+
// Import these dynamically so that we don't have any top level
|
|
23
|
+
// node dependencies.
|
|
24
|
+
const fs = await Promise.resolve().then(() => require('fs/promises'));
|
|
25
|
+
const path = await Promise.resolve().then(() => require('path'));
|
|
35
26
|
const migrations = {};
|
|
36
|
-
const files = await
|
|
27
|
+
const files = await fs.readdir(this.#migrationFolderPath);
|
|
37
28
|
for (const fileName of files) {
|
|
38
29
|
if ((fileName.endsWith('.js') || fileName.endsWith('.ts')) &&
|
|
39
30
|
!fileName.endsWith('.d.ts')) {
|
|
40
|
-
const migration = await Promise.resolve().then(() => require(
|
|
31
|
+
const migration = await Promise.resolve().then(() => require(path.join(this.#migrationFolderPath, fileName)));
|
|
41
32
|
if (isMigration(migration)) {
|
|
42
33
|
migrations[fileName.substring(0, fileName.length - 3)] = migration;
|
|
43
34
|
}
|
|
@@ -26,14 +26,9 @@ export interface Migration {
|
|
|
26
26
|
* ```ts
|
|
27
27
|
* const migrator = new Migrator({
|
|
28
28
|
* db,
|
|
29
|
-
* // The constructor signature of FileMigrationProvider is a
|
|
30
|
-
* // bit weird to keep Kysely independent of node.js or any
|
|
31
|
-
* // other environment.
|
|
32
29
|
* provider: new FileMigrationProvider(
|
|
33
|
-
* fs.readdir,
|
|
34
|
-
* path.join,
|
|
35
30
|
* // Path to the folder that contains all your migrations.
|
|
36
|
-
* 'migrations'
|
|
31
|
+
* 'some/path/to/migrations'
|
|
37
32
|
* )
|
|
38
33
|
* })
|
|
39
34
|
* ```
|
|
@@ -57,9 +52,6 @@ export declare class Migrator {
|
|
|
57
52
|
* ### Examples
|
|
58
53
|
*
|
|
59
54
|
* ```ts
|
|
60
|
-
* import * as path from 'path'
|
|
61
|
-
* import * as fs from 'fs/promises'
|
|
62
|
-
*
|
|
63
55
|
* const db = new Kysely<Database>({
|
|
64
56
|
* dialect: new PostgresDialect({
|
|
65
57
|
* host: 'localhost',
|
|
@@ -69,14 +61,9 @@ export declare class Migrator {
|
|
|
69
61
|
*
|
|
70
62
|
* const migrator = new Migrator({
|
|
71
63
|
* db,
|
|
72
|
-
* // The constructor signature of FileMigrationProvider is a
|
|
73
|
-
* // bit weird to keep Kysely independent of node.js or any
|
|
74
|
-
* // other environment.
|
|
75
64
|
* provider: new FileMigrationProvider(
|
|
76
|
-
* fs.readdir,
|
|
77
|
-
* path.join,
|
|
78
65
|
* // Path to the folder that contains all your migrations.
|
|
79
|
-
* 'migrations'
|
|
66
|
+
* 'some/path/to/migrations'
|
|
80
67
|
* )
|
|
81
68
|
* })
|
|
82
69
|
*
|
|
@@ -20,14 +20,9 @@ exports.NO_MIGRATIONS = (0, object_utils_js_1.freeze)({ __noMigrations__: true }
|
|
|
20
20
|
* ```ts
|
|
21
21
|
* const migrator = new Migrator({
|
|
22
22
|
* db,
|
|
23
|
-
* // The constructor signature of FileMigrationProvider is a
|
|
24
|
-
* // bit weird to keep Kysely independent of node.js or any
|
|
25
|
-
* // other environment.
|
|
26
23
|
* provider: new FileMigrationProvider(
|
|
27
|
-
* fs.readdir,
|
|
28
|
-
* path.join,
|
|
29
24
|
* // Path to the folder that contains all your migrations.
|
|
30
|
-
* 'migrations'
|
|
25
|
+
* 'some/path/to/migrations'
|
|
31
26
|
* )
|
|
32
27
|
* })
|
|
33
28
|
* ```
|
|
@@ -53,9 +48,6 @@ class Migrator {
|
|
|
53
48
|
* ### Examples
|
|
54
49
|
*
|
|
55
50
|
* ```ts
|
|
56
|
-
* import * as path from 'path'
|
|
57
|
-
* import * as fs from 'fs/promises'
|
|
58
|
-
*
|
|
59
51
|
* const db = new Kysely<Database>({
|
|
60
52
|
* dialect: new PostgresDialect({
|
|
61
53
|
* host: 'localhost',
|
|
@@ -65,14 +57,9 @@ class Migrator {
|
|
|
65
57
|
*
|
|
66
58
|
* const migrator = new Migrator({
|
|
67
59
|
* db,
|
|
68
|
-
* // The constructor signature of FileMigrationProvider is a
|
|
69
|
-
* // bit weird to keep Kysely independent of node.js or any
|
|
70
|
-
* // other environment.
|
|
71
60
|
* provider: new FileMigrationProvider(
|
|
72
|
-
* fs.readdir,
|
|
73
|
-
* path.join,
|
|
74
61
|
* // Path to the folder that contains all your migrations.
|
|
75
|
-
* 'migrations'
|
|
62
|
+
* 'some/path/to/migrations'
|
|
76
63
|
* )
|
|
77
64
|
* })
|
|
78
65
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CheckConstraintNode } from
|
|
2
|
-
import { ForeignKeyConstraintNode } from
|
|
3
|
-
import { PrimaryKeyConstraintNode } from
|
|
4
|
-
import { UniqueConstraintNode } from
|
|
1
|
+
import { CheckConstraintNode } from './check-constraint-node.js';
|
|
2
|
+
import { ForeignKeyConstraintNode } from './foreign-key-constraint-node.js';
|
|
3
|
+
import { PrimaryKeyConstraintNode } from './primary-constraint-node.js';
|
|
4
|
+
import { UniqueConstraintNode } from './unique-constraint-node.js';
|
|
5
5
|
export declare type ConstraintNode = PrimaryKeyConstraintNode | UniqueConstraintNode | CheckConstraintNode | ForeignKeyConstraintNode;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { JoinNode, JoinType } from '../operation-node/join-node.js';
|
|
2
2
|
import { AnyColumn, AnyColumnWithTable } from '../util/type-utils.js';
|
|
3
|
-
import {
|
|
3
|
+
import { TableExpressionDatabase, TableExpressionTables } from './table-parser.js';
|
|
4
4
|
import { JoinBuilder } from '../query-builder/join-builder.js';
|
|
5
5
|
import { ParseContext } from './parse-context.js';
|
|
6
6
|
export declare type JoinReferenceExpression<DB, TB extends keyof DB, TE> = AnyJoinColumn<DB, TB, TE> | AnyJoinColumnWithTable<DB, TB, TE>;
|
|
7
|
-
export declare type JoinCallbackExpression<DB, TB extends keyof DB, TE> = (join: JoinBuilder<TableExpressionDatabase<DB, TE>,
|
|
8
|
-
declare type AnyJoinColumn<DB, TB extends keyof DB, TE> = AnyColumn<TableExpressionDatabase<DB, TE>,
|
|
9
|
-
declare type AnyJoinColumnWithTable<DB, TB extends keyof DB, TE> = AnyColumnWithTable<TableExpressionDatabase<DB, TE>,
|
|
7
|
+
export declare type JoinCallbackExpression<DB, TB extends keyof DB, TE> = (join: JoinBuilder<TableExpressionDatabase<DB, TE>, TableExpressionTables<DB, TB, TE>>) => JoinBuilder<any, any>;
|
|
8
|
+
declare type AnyJoinColumn<DB, TB extends keyof DB, TE> = AnyColumn<TableExpressionDatabase<DB, TE>, TableExpressionTables<DB, TB, TE>>;
|
|
9
|
+
declare type AnyJoinColumnWithTable<DB, TB extends keyof DB, TE> = AnyColumnWithTable<TableExpressionDatabase<DB, TE>, TableExpressionTables<DB, TB, TE>>;
|
|
10
10
|
export declare function parseJoin(ctx: ParseContext, joinType: JoinType, args: any[]): JoinNode;
|
|
11
11
|
export {};
|
|
@@ -473,13 +473,13 @@ export declare class DeleteQueryBuilder<DB, TB extends keyof DB, O> implements W
|
|
|
473
473
|
* and "pet"."name" = $1
|
|
474
474
|
* ```
|
|
475
475
|
*
|
|
476
|
-
* You can join a subquery by providing a
|
|
477
|
-
* argument:
|
|
476
|
+
* You can join a subquery by providing a select query (or a callback)
|
|
477
|
+
* as the first argument:
|
|
478
478
|
*
|
|
479
479
|
* ```ts
|
|
480
480
|
* await db.selectFrom('person')
|
|
481
481
|
* .innerJoin(
|
|
482
|
-
*
|
|
482
|
+
* qb.selectFrom('pet')
|
|
483
483
|
* .select(['owner_id', 'name'])
|
|
484
484
|
* .where('name', '=', 'Doggo')
|
|
485
485
|
* .as('doggos'),
|
|
@@ -80,13 +80,13 @@ export interface JoinInterface<DB, TB extends keyof DB> {
|
|
|
80
80
|
* and "pet"."name" = $1
|
|
81
81
|
* ```
|
|
82
82
|
*
|
|
83
|
-
* You can join a subquery by providing a
|
|
84
|
-
* argument:
|
|
83
|
+
* You can join a subquery by providing a select query (or a callback)
|
|
84
|
+
* as the first argument:
|
|
85
85
|
*
|
|
86
86
|
* ```ts
|
|
87
87
|
* await db.selectFrom('person')
|
|
88
88
|
* .innerJoin(
|
|
89
|
-
*
|
|
89
|
+
* qb.selectFrom('pet')
|
|
90
90
|
* .select(['owner_id', 'name'])
|
|
91
91
|
* .where('name', '=', 'Doggo')
|
|
92
92
|
* .as('doggos'),
|
|
@@ -811,13 +811,13 @@ export declare class SelectQueryBuilder<DB, TB extends keyof DB, O> implements W
|
|
|
811
811
|
* and "pet"."name" = $1
|
|
812
812
|
* ```
|
|
813
813
|
*
|
|
814
|
-
* You can join a subquery by providing a
|
|
815
|
-
* argument:
|
|
814
|
+
* You can join a subquery by providing a select query (or a callback)
|
|
815
|
+
* as the first argument:
|
|
816
816
|
*
|
|
817
817
|
* ```ts
|
|
818
818
|
* await db.selectFrom('person')
|
|
819
819
|
* .innerJoin(
|
|
820
|
-
*
|
|
820
|
+
* qb.selectFrom('pet')
|
|
821
821
|
* .select(['owner_id', 'name'])
|
|
822
822
|
* .where('name', '=', 'Doggo')
|
|
823
823
|
* .as('doggos'),
|
|
@@ -474,13 +474,13 @@ export declare class UpdateQueryBuilder<DB, TB extends keyof DB, O> implements W
|
|
|
474
474
|
* and "pet"."name" = $1
|
|
475
475
|
* ```
|
|
476
476
|
*
|
|
477
|
-
* You can join a subquery by providing a
|
|
478
|
-
* argument:
|
|
477
|
+
* You can join a subquery by providing a select query (or a callback)
|
|
478
|
+
* as the first argument:
|
|
479
479
|
*
|
|
480
480
|
* ```ts
|
|
481
481
|
* await db.selectFrom('person')
|
|
482
482
|
* .innerJoin(
|
|
483
|
-
*
|
|
483
|
+
* qb.selectFrom('pet')
|
|
484
484
|
* .select(['owner_id', 'name'])
|
|
485
485
|
* .where('name', '=', 'Doggo')
|
|
486
486
|
* .as('doggos'),
|
|
@@ -4,7 +4,7 @@ import { ColumnDataType } from '../operation-node/data-type-node.js';
|
|
|
4
4
|
*/
|
|
5
5
|
export interface DatabaseIntrospector {
|
|
6
6
|
/**
|
|
7
|
-
* Get the database metadata such as
|
|
7
|
+
* Get the database metadata such as table and column names.
|
|
8
8
|
*/
|
|
9
9
|
getMetadata(options?: DatabaseMetadataOptions): Promise<DatabaseMetadata>;
|
|
10
10
|
}
|