kysely 0.18.1 → 0.19.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.
- package/README.md +22 -17
- package/dist/cjs/dialect/mysql/mysql-dialect-config.d.ts +24 -207
- package/dist/cjs/dialect/mysql/mysql-dialect.d.ts +22 -7
- package/dist/cjs/dialect/mysql/mysql-dialect.js +25 -9
- package/dist/cjs/dialect/mysql/mysql-driver.d.ts +2 -15
- package/dist/cjs/dialect/mysql/mysql-driver.js +4 -35
- package/dist/cjs/dialect/mysql/mysql-introspector.js +2 -6
- package/dist/cjs/dialect/postgres/postgres-dialect-config.d.ts +25 -89
- package/dist/cjs/dialect/postgres/postgres-dialect.d.ts +21 -9
- package/dist/cjs/dialect/postgres/postgres-dialect.js +24 -11
- package/dist/cjs/dialect/postgres/postgres-driver.d.ts +2 -15
- package/dist/cjs/dialect/postgres/postgres-driver.js +5 -36
- package/dist/cjs/dialect/sqlite/sqlite-dialect-config.d.ts +25 -28
- package/dist/cjs/dialect/sqlite/sqlite-dialect.d.ts +19 -3
- package/dist/cjs/dialect/sqlite/sqlite-dialect.js +19 -3
- package/dist/cjs/dialect/sqlite/sqlite-driver.js +3 -37
- package/dist/cjs/index.d.ts +153 -2
- package/dist/cjs/index.js +142 -2
- package/dist/cjs/migration/file-migration-provider.d.ts +21 -5
- package/dist/cjs/migration/file-migration-provider.js +14 -13
- package/dist/cjs/migration/migrator.d.ts +2 -0
- package/dist/cjs/plugin/noop-plugin.d.ts +1 -1
- package/dist/cjs/schema/alter-table-builder.d.ts +2 -5
- package/dist/cjs/schema/alter-table-builder.js +3 -7
- package/dist/esm/dialect/mysql/mysql-dialect-config.d.ts +24 -207
- package/dist/esm/dialect/mysql/mysql-dialect.d.ts +22 -7
- package/dist/esm/dialect/mysql/mysql-dialect.js +25 -9
- package/dist/esm/dialect/mysql/mysql-driver.d.ts +2 -15
- package/dist/esm/dialect/mysql/mysql-driver.js +4 -35
- package/dist/esm/dialect/mysql/mysql-introspector.js +2 -6
- package/dist/esm/dialect/postgres/postgres-dialect-config.d.ts +25 -89
- package/dist/esm/dialect/postgres/postgres-dialect.d.ts +21 -9
- package/dist/esm/dialect/postgres/postgres-dialect.js +24 -11
- package/dist/esm/dialect/postgres/postgres-driver.d.ts +2 -15
- package/dist/esm/dialect/postgres/postgres-driver.js +6 -37
- package/dist/esm/dialect/sqlite/sqlite-dialect-config.d.ts +25 -28
- package/dist/esm/dialect/sqlite/sqlite-dialect.d.ts +19 -3
- package/dist/esm/dialect/sqlite/sqlite-dialect.js +19 -3
- package/dist/esm/dialect/sqlite/sqlite-driver.js +4 -38
- package/dist/esm/index.d.ts +153 -2
- package/dist/esm/index.js +142 -2
- package/dist/esm/migration/file-migration-provider.d.ts +21 -5
- package/dist/esm/migration/file-migration-provider.js +14 -13
- package/dist/esm/migration/migrator.d.ts +2 -0
- package/dist/esm/plugin/noop-plugin.d.ts +1 -1
- package/dist/esm/schema/alter-table-builder.d.ts +2 -5
- package/dist/esm/schema/alter-table-builder.js +4 -8
- package/package.json +2 -7
- package/dist/cjs/index-nodeless.d.ts +0 -152
- package/dist/cjs/index-nodeless.js +0 -157
- package/dist/esm/index-nodeless.d.ts +0 -152
- package/dist/esm/index-nodeless.js +0 -142
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,11 +1,162 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
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';
|
|
3
50
|
export * from './dialect/sqlite/sqlite-dialect.js';
|
|
4
51
|
export * from './dialect/sqlite/sqlite-dialect-config.js';
|
|
5
52
|
export * from './dialect/sqlite/sqlite-driver.js';
|
|
53
|
+
export * from './dialect/postgres/postgres-query-compiler.js';
|
|
54
|
+
export * from './dialect/postgres/postgres-introspector.js';
|
|
55
|
+
export * from './dialect/postgres/postgres-adapter.js';
|
|
6
56
|
export * from './dialect/mysql/mysql-dialect.js';
|
|
7
57
|
export * from './dialect/mysql/mysql-dialect-config.js';
|
|
8
58
|
export * from './dialect/mysql/mysql-driver.js';
|
|
59
|
+
export * from './dialect/mysql/mysql-query-compiler.js';
|
|
60
|
+
export * from './dialect/mysql/mysql-introspector.js';
|
|
61
|
+
export * from './dialect/mysql/mysql-adapter.js';
|
|
9
62
|
export * from './dialect/postgres/postgres-driver.js';
|
|
10
63
|
export * from './dialect/postgres/postgres-dialect-config.js';
|
|
11
64
|
export * from './dialect/postgres/postgres-dialect.js';
|
|
65
|
+
export * from './dialect/sqlite/sqlite-query-compiler.js';
|
|
66
|
+
export * from './dialect/sqlite/sqlite-introspector.js';
|
|
67
|
+
export * from './dialect/sqlite/sqlite-adapter.js';
|
|
68
|
+
export * from './query-compiler/default-query-compiler.js';
|
|
69
|
+
export * from './query-compiler/query-compiler.js';
|
|
70
|
+
export * from './migration/migrator.js';
|
|
71
|
+
export * from './migration/file-migration-provider.js';
|
|
72
|
+
export * from './plugin/kysely-plugin.js';
|
|
73
|
+
export * from './plugin/camel-case/camel-case-plugin.js';
|
|
74
|
+
export * from './plugin/deduplicate-joins/deduplicate-joins-plugin.js';
|
|
75
|
+
export * from './operation-node/add-column-node.js';
|
|
76
|
+
export * from './operation-node/add-constraint-node.js';
|
|
77
|
+
export * from './operation-node/alias-node.js';
|
|
78
|
+
export * from './operation-node/alter-column-node.js';
|
|
79
|
+
export * from './operation-node/alter-table-node.js';
|
|
80
|
+
export * from './operation-node/and-node.js';
|
|
81
|
+
export * from './operation-node/check-constraint-node.js';
|
|
82
|
+
export * from './operation-node/column-definition-node.js';
|
|
83
|
+
export * from './operation-node/column-node.js';
|
|
84
|
+
export * from './operation-node/column-update-node.js';
|
|
85
|
+
export * from './operation-node/common-table-expression-node.js';
|
|
86
|
+
export * from './operation-node/common-table-expression-name-node.js';
|
|
87
|
+
export * from './operation-node/constraint-node.js';
|
|
88
|
+
export * from './operation-node/create-index-node.js';
|
|
89
|
+
export * from './operation-node/create-schema-node.js';
|
|
90
|
+
export * from './operation-node/create-table-node.js';
|
|
91
|
+
export * from './operation-node/create-view-node.js';
|
|
92
|
+
export * from './operation-node/data-type-node.js';
|
|
93
|
+
export * from './operation-node/default-value-node.js';
|
|
94
|
+
export * from './operation-node/delete-query-node.js';
|
|
95
|
+
export * from './operation-node/drop-column-node.js';
|
|
96
|
+
export * from './operation-node/drop-constraint-node.js';
|
|
97
|
+
export * from './operation-node/drop-index-node.js';
|
|
98
|
+
export * from './operation-node/drop-schema-node.js';
|
|
99
|
+
export * from './operation-node/drop-table-node.js';
|
|
100
|
+
export * from './operation-node/drop-view-node.js';
|
|
101
|
+
export * from './operation-node/filter-node.js';
|
|
102
|
+
export * from './operation-node/foreign-key-constraint-node.js';
|
|
103
|
+
export * from './operation-node/from-node.js';
|
|
104
|
+
export * from './operation-node/generated-node.js';
|
|
105
|
+
export * from './operation-node/group-by-item-node.js';
|
|
106
|
+
export * from './operation-node/group-by-node.js';
|
|
107
|
+
export * from './operation-node/having-node.js';
|
|
108
|
+
export * from './operation-node/identifier-node.js';
|
|
109
|
+
export * from './operation-node/insert-query-node.js';
|
|
110
|
+
export * from './operation-node/join-node.js';
|
|
111
|
+
export * from './operation-node/limit-node.js';
|
|
112
|
+
export * from './operation-node/list-node.js';
|
|
113
|
+
export * from './operation-node/modify-column-node.js';
|
|
114
|
+
export * from './operation-node/offset-node.js';
|
|
115
|
+
export * from './operation-node/on-conflict-node.js';
|
|
116
|
+
export * from './operation-node/on-duplicate-key-node.js';
|
|
117
|
+
export * from './operation-node/on-node.js';
|
|
118
|
+
export * from './operation-node/operation-node-source.js';
|
|
119
|
+
export * from './operation-node/operation-node-transformer.js';
|
|
120
|
+
export * from './operation-node/operation-node-utils.js';
|
|
121
|
+
export * from './operation-node/operation-node-visitor.js';
|
|
122
|
+
export * from './operation-node/operation-node.js';
|
|
123
|
+
export * from './operation-node/operator-node.js';
|
|
124
|
+
export * from './operation-node/or-node.js';
|
|
125
|
+
export * from './operation-node/order-by-item-node.js';
|
|
126
|
+
export * from './operation-node/order-by-node.js';
|
|
127
|
+
export * from './operation-node/parens-node.js';
|
|
128
|
+
export * from './operation-node/primary-constraint-node.js';
|
|
129
|
+
export * from './operation-node/primitive-value-list-node.js';
|
|
130
|
+
export * from './operation-node/query-node.js';
|
|
131
|
+
export * from './operation-node/raw-node.js';
|
|
132
|
+
export * from './operation-node/reference-node.js';
|
|
133
|
+
export * from './operation-node/references-node.js';
|
|
134
|
+
export * from './operation-node/rename-column-node.js';
|
|
135
|
+
export * from './operation-node/returning-node.js';
|
|
136
|
+
export * from './operation-node/select-all-node.js';
|
|
137
|
+
export * from './operation-node/select-query-node.js';
|
|
138
|
+
export * from './operation-node/select-query-node.js';
|
|
139
|
+
export * from './operation-node/selection-node.js';
|
|
140
|
+
export * from './operation-node/table-node.js';
|
|
141
|
+
export * from './operation-node/union-node.js';
|
|
142
|
+
export * from './operation-node/unique-constraint-node.js';
|
|
143
|
+
export * from './operation-node/update-query-node.js';
|
|
144
|
+
export * from './operation-node/value-list-node.js';
|
|
145
|
+
export * from './operation-node/value-node.js';
|
|
146
|
+
export * from './operation-node/values-node.js';
|
|
147
|
+
export * from './operation-node/where-node.js';
|
|
148
|
+
export * from './operation-node/with-node.js';
|
|
149
|
+
export * from './util/column-type.js';
|
|
150
|
+
export * from './util/compilable.js';
|
|
151
|
+
export * from './util/log.js';
|
|
152
|
+
export { AnyColumn, UnknownRow, AnySelectQueryBuilder, } from './util/type-utils.js';
|
|
153
|
+
export { SelectExpression, SelectExpressionOrList, Selection, } from './parser/select-parser.js';
|
|
154
|
+
export { ReferenceExpression, ReferenceExpressionOrList, } from './parser/reference-parser.js';
|
|
155
|
+
export { ValueExpression, ValueExpressionOrList, } from './parser/value-parser.js';
|
|
156
|
+
export { FilterValueExpression, FilterValueExpressionOrList, ExistsExpression, FilterOperator, } from './parser/filter-parser.js';
|
|
157
|
+
export { TableExpression, TableExpressionOrList, } from './parser/table-parser.js';
|
|
158
|
+
export { JoinReferenceExpression, JoinCallbackExpression, } from './parser/join-parser.js';
|
|
159
|
+
export { InsertObject } from './parser/insert-values-parser.js';
|
|
160
|
+
export { MutationObject } from './parser/update-set-parser.js';
|
|
161
|
+
export { OrderByExpression, OrderByDirectionExpression, } from './parser/order-by-parser.js';
|
|
162
|
+
export { UnionExpression } from './parser/union-parser.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,14 +14,154 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./kysely.js"), exports);
|
|
18
|
+
__exportStar(require("./query-creator.js"), exports);
|
|
19
|
+
__exportStar(require("./query-builder/where-interface.js"), exports);
|
|
20
|
+
__exportStar(require("./query-builder/join-interface.js"), exports);
|
|
21
|
+
__exportStar(require("./query-builder/returning-interface.js"), exports);
|
|
22
|
+
__exportStar(require("./query-builder/having-interface.js"), exports);
|
|
23
|
+
__exportStar(require("./query-builder/select-query-builder.js"), exports);
|
|
24
|
+
__exportStar(require("./query-builder/insert-query-builder.js"), exports);
|
|
25
|
+
__exportStar(require("./query-builder/update-query-builder.js"), exports);
|
|
26
|
+
__exportStar(require("./query-builder/delete-query-builder.js"), exports);
|
|
27
|
+
__exportStar(require("./query-builder/no-result-error.js"), exports);
|
|
28
|
+
__exportStar(require("./query-builder/join-builder.js"), exports);
|
|
29
|
+
__exportStar(require("./query-builder/expression-builder.js"), exports);
|
|
30
|
+
__exportStar(require("./query-builder/function-builder.js"), exports);
|
|
31
|
+
__exportStar(require("./query-builder/insert-result.js"), exports);
|
|
32
|
+
__exportStar(require("./query-builder/delete-result.js"), exports);
|
|
33
|
+
__exportStar(require("./query-builder/update-result.js"), exports);
|
|
34
|
+
__exportStar(require("./query-builder/on-conflict-builder.js"), exports);
|
|
35
|
+
__exportStar(require("./raw-builder/raw-builder.js"), exports);
|
|
36
|
+
__exportStar(require("./raw-builder/sql.js"), exports);
|
|
37
|
+
__exportStar(require("./query-executor/query-executor.js"), exports);
|
|
38
|
+
__exportStar(require("./query-executor/default-query-executor.js"), exports);
|
|
39
|
+
__exportStar(require("./query-executor/noop-query-executor.js"), exports);
|
|
40
|
+
__exportStar(require("./query-executor/query-executor-provider.js"), exports);
|
|
41
|
+
__exportStar(require("./query-compiler/default-query-compiler.js"), exports);
|
|
42
|
+
__exportStar(require("./query-compiler/compiled-query.js"), exports);
|
|
43
|
+
__exportStar(require("./schema/schema.js"), exports);
|
|
44
|
+
__exportStar(require("./schema/create-table-builder.js"), exports);
|
|
45
|
+
__exportStar(require("./schema/drop-table-builder.js"), exports);
|
|
46
|
+
__exportStar(require("./schema/create-index-builder.js"), exports);
|
|
47
|
+
__exportStar(require("./schema/drop-index-builder.js"), exports);
|
|
48
|
+
__exportStar(require("./schema/create-schema-builder.js"), exports);
|
|
49
|
+
__exportStar(require("./schema/drop-schema-builder.js"), exports);
|
|
50
|
+
__exportStar(require("./schema/column-definition-builder.js"), exports);
|
|
51
|
+
__exportStar(require("./schema/foreign-key-constraint-builder.js"), exports);
|
|
52
|
+
__exportStar(require("./schema/alter-table-builder.js"), exports);
|
|
53
|
+
__exportStar(require("./schema/create-view-builder.js"), exports);
|
|
54
|
+
__exportStar(require("./schema/drop-view-builder.js"), exports);
|
|
55
|
+
__exportStar(require("./dynamic/dynamic.js"), exports);
|
|
56
|
+
__exportStar(require("./driver/driver.js"), exports);
|
|
57
|
+
__exportStar(require("./driver/database-connection.js"), exports);
|
|
58
|
+
__exportStar(require("./driver/connection-provider.js"), exports);
|
|
59
|
+
__exportStar(require("./driver/default-connection-provider.js"), exports);
|
|
60
|
+
__exportStar(require("./driver/single-connection-provider.js"), exports);
|
|
61
|
+
__exportStar(require("./driver/dummy-driver.js"), exports);
|
|
62
|
+
__exportStar(require("./dialect/dialect.js"), exports);
|
|
63
|
+
__exportStar(require("./dialect/dialect-adapter.js"), exports);
|
|
64
|
+
__exportStar(require("./dialect/dialect-adapter-base.js"), exports);
|
|
65
|
+
__exportStar(require("./dialect/database-introspector.js"), exports);
|
|
19
66
|
__exportStar(require("./dialect/sqlite/sqlite-dialect.js"), exports);
|
|
20
67
|
__exportStar(require("./dialect/sqlite/sqlite-dialect-config.js"), exports);
|
|
21
68
|
__exportStar(require("./dialect/sqlite/sqlite-driver.js"), exports);
|
|
69
|
+
__exportStar(require("./dialect/postgres/postgres-query-compiler.js"), exports);
|
|
70
|
+
__exportStar(require("./dialect/postgres/postgres-introspector.js"), exports);
|
|
71
|
+
__exportStar(require("./dialect/postgres/postgres-adapter.js"), exports);
|
|
22
72
|
__exportStar(require("./dialect/mysql/mysql-dialect.js"), exports);
|
|
23
73
|
__exportStar(require("./dialect/mysql/mysql-dialect-config.js"), exports);
|
|
24
74
|
__exportStar(require("./dialect/mysql/mysql-driver.js"), exports);
|
|
75
|
+
__exportStar(require("./dialect/mysql/mysql-query-compiler.js"), exports);
|
|
76
|
+
__exportStar(require("./dialect/mysql/mysql-introspector.js"), exports);
|
|
77
|
+
__exportStar(require("./dialect/mysql/mysql-adapter.js"), exports);
|
|
25
78
|
__exportStar(require("./dialect/postgres/postgres-driver.js"), exports);
|
|
26
79
|
__exportStar(require("./dialect/postgres/postgres-dialect-config.js"), exports);
|
|
27
80
|
__exportStar(require("./dialect/postgres/postgres-dialect.js"), exports);
|
|
81
|
+
__exportStar(require("./dialect/sqlite/sqlite-query-compiler.js"), exports);
|
|
82
|
+
__exportStar(require("./dialect/sqlite/sqlite-introspector.js"), exports);
|
|
83
|
+
__exportStar(require("./dialect/sqlite/sqlite-adapter.js"), exports);
|
|
84
|
+
__exportStar(require("./query-compiler/default-query-compiler.js"), exports);
|
|
85
|
+
__exportStar(require("./query-compiler/query-compiler.js"), exports);
|
|
86
|
+
__exportStar(require("./migration/migrator.js"), exports);
|
|
87
|
+
__exportStar(require("./migration/file-migration-provider.js"), exports);
|
|
88
|
+
__exportStar(require("./plugin/kysely-plugin.js"), exports);
|
|
89
|
+
__exportStar(require("./plugin/camel-case/camel-case-plugin.js"), exports);
|
|
90
|
+
__exportStar(require("./plugin/deduplicate-joins/deduplicate-joins-plugin.js"), exports);
|
|
91
|
+
__exportStar(require("./operation-node/add-column-node.js"), exports);
|
|
92
|
+
__exportStar(require("./operation-node/add-constraint-node.js"), exports);
|
|
93
|
+
__exportStar(require("./operation-node/alias-node.js"), exports);
|
|
94
|
+
__exportStar(require("./operation-node/alter-column-node.js"), exports);
|
|
95
|
+
__exportStar(require("./operation-node/alter-table-node.js"), exports);
|
|
96
|
+
__exportStar(require("./operation-node/and-node.js"), exports);
|
|
97
|
+
__exportStar(require("./operation-node/check-constraint-node.js"), exports);
|
|
98
|
+
__exportStar(require("./operation-node/column-definition-node.js"), exports);
|
|
99
|
+
__exportStar(require("./operation-node/column-node.js"), exports);
|
|
100
|
+
__exportStar(require("./operation-node/column-update-node.js"), exports);
|
|
101
|
+
__exportStar(require("./operation-node/common-table-expression-node.js"), exports);
|
|
102
|
+
__exportStar(require("./operation-node/common-table-expression-name-node.js"), exports);
|
|
103
|
+
__exportStar(require("./operation-node/constraint-node.js"), exports);
|
|
104
|
+
__exportStar(require("./operation-node/create-index-node.js"), exports);
|
|
105
|
+
__exportStar(require("./operation-node/create-schema-node.js"), exports);
|
|
106
|
+
__exportStar(require("./operation-node/create-table-node.js"), exports);
|
|
107
|
+
__exportStar(require("./operation-node/create-view-node.js"), exports);
|
|
108
|
+
__exportStar(require("./operation-node/data-type-node.js"), exports);
|
|
109
|
+
__exportStar(require("./operation-node/default-value-node.js"), exports);
|
|
110
|
+
__exportStar(require("./operation-node/delete-query-node.js"), exports);
|
|
111
|
+
__exportStar(require("./operation-node/drop-column-node.js"), exports);
|
|
112
|
+
__exportStar(require("./operation-node/drop-constraint-node.js"), exports);
|
|
113
|
+
__exportStar(require("./operation-node/drop-index-node.js"), exports);
|
|
114
|
+
__exportStar(require("./operation-node/drop-schema-node.js"), exports);
|
|
115
|
+
__exportStar(require("./operation-node/drop-table-node.js"), exports);
|
|
116
|
+
__exportStar(require("./operation-node/drop-view-node.js"), exports);
|
|
117
|
+
__exportStar(require("./operation-node/filter-node.js"), exports);
|
|
118
|
+
__exportStar(require("./operation-node/foreign-key-constraint-node.js"), exports);
|
|
119
|
+
__exportStar(require("./operation-node/from-node.js"), exports);
|
|
120
|
+
__exportStar(require("./operation-node/generated-node.js"), exports);
|
|
121
|
+
__exportStar(require("./operation-node/group-by-item-node.js"), exports);
|
|
122
|
+
__exportStar(require("./operation-node/group-by-node.js"), exports);
|
|
123
|
+
__exportStar(require("./operation-node/having-node.js"), exports);
|
|
124
|
+
__exportStar(require("./operation-node/identifier-node.js"), exports);
|
|
125
|
+
__exportStar(require("./operation-node/insert-query-node.js"), exports);
|
|
126
|
+
__exportStar(require("./operation-node/join-node.js"), exports);
|
|
127
|
+
__exportStar(require("./operation-node/limit-node.js"), exports);
|
|
128
|
+
__exportStar(require("./operation-node/list-node.js"), exports);
|
|
129
|
+
__exportStar(require("./operation-node/modify-column-node.js"), exports);
|
|
130
|
+
__exportStar(require("./operation-node/offset-node.js"), exports);
|
|
131
|
+
__exportStar(require("./operation-node/on-conflict-node.js"), exports);
|
|
132
|
+
__exportStar(require("./operation-node/on-duplicate-key-node.js"), exports);
|
|
133
|
+
__exportStar(require("./operation-node/on-node.js"), exports);
|
|
134
|
+
__exportStar(require("./operation-node/operation-node-source.js"), exports);
|
|
135
|
+
__exportStar(require("./operation-node/operation-node-transformer.js"), exports);
|
|
136
|
+
__exportStar(require("./operation-node/operation-node-utils.js"), exports);
|
|
137
|
+
__exportStar(require("./operation-node/operation-node-visitor.js"), exports);
|
|
138
|
+
__exportStar(require("./operation-node/operation-node.js"), exports);
|
|
139
|
+
__exportStar(require("./operation-node/operator-node.js"), exports);
|
|
140
|
+
__exportStar(require("./operation-node/or-node.js"), exports);
|
|
141
|
+
__exportStar(require("./operation-node/order-by-item-node.js"), exports);
|
|
142
|
+
__exportStar(require("./operation-node/order-by-node.js"), exports);
|
|
143
|
+
__exportStar(require("./operation-node/parens-node.js"), exports);
|
|
144
|
+
__exportStar(require("./operation-node/primary-constraint-node.js"), exports);
|
|
145
|
+
__exportStar(require("./operation-node/primitive-value-list-node.js"), exports);
|
|
146
|
+
__exportStar(require("./operation-node/query-node.js"), exports);
|
|
147
|
+
__exportStar(require("./operation-node/raw-node.js"), exports);
|
|
148
|
+
__exportStar(require("./operation-node/reference-node.js"), exports);
|
|
149
|
+
__exportStar(require("./operation-node/references-node.js"), exports);
|
|
150
|
+
__exportStar(require("./operation-node/rename-column-node.js"), exports);
|
|
151
|
+
__exportStar(require("./operation-node/returning-node.js"), exports);
|
|
152
|
+
__exportStar(require("./operation-node/select-all-node.js"), exports);
|
|
153
|
+
__exportStar(require("./operation-node/select-query-node.js"), exports);
|
|
154
|
+
__exportStar(require("./operation-node/select-query-node.js"), exports);
|
|
155
|
+
__exportStar(require("./operation-node/selection-node.js"), exports);
|
|
156
|
+
__exportStar(require("./operation-node/table-node.js"), exports);
|
|
157
|
+
__exportStar(require("./operation-node/union-node.js"), exports);
|
|
158
|
+
__exportStar(require("./operation-node/unique-constraint-node.js"), exports);
|
|
159
|
+
__exportStar(require("./operation-node/update-query-node.js"), exports);
|
|
160
|
+
__exportStar(require("./operation-node/value-list-node.js"), exports);
|
|
161
|
+
__exportStar(require("./operation-node/value-node.js"), exports);
|
|
162
|
+
__exportStar(require("./operation-node/values-node.js"), exports);
|
|
163
|
+
__exportStar(require("./operation-node/where-node.js"), exports);
|
|
164
|
+
__exportStar(require("./operation-node/with-node.js"), exports);
|
|
165
|
+
__exportStar(require("./util/column-type.js"), exports);
|
|
166
|
+
__exportStar(require("./util/compilable.js"), exports);
|
|
167
|
+
__exportStar(require("./util/log.js"), exports);
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { Migration, MigrationProvider } from './migrator.js';
|
|
2
2
|
/**
|
|
3
|
-
* Reads all migrations from a folder.
|
|
3
|
+
* Reads all migrations from a folder in node.js.
|
|
4
4
|
*
|
|
5
5
|
* ### Examples
|
|
6
6
|
*
|
|
7
7
|
* ```ts
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* import { promises as fs } from 'fs'
|
|
9
|
+
* import path from 'path'
|
|
10
|
+
*
|
|
11
|
+
* new FileMigrationProvider({
|
|
12
|
+
* fs,
|
|
13
|
+
* path,
|
|
14
|
+
* migrationFolder: 'path/to/migrations/folder'
|
|
15
|
+
* })
|
|
11
16
|
* ```
|
|
12
17
|
*/
|
|
13
18
|
export declare class FileMigrationProvider implements MigrationProvider {
|
|
14
19
|
#private;
|
|
15
|
-
constructor(
|
|
20
|
+
constructor(props: FileMigrationProviderProps);
|
|
16
21
|
/**
|
|
17
22
|
* Returns all migrations, old and new.
|
|
18
23
|
*
|
|
@@ -27,3 +32,14 @@ export declare class FileMigrationProvider implements MigrationProvider {
|
|
|
27
32
|
*/
|
|
28
33
|
getMigrations(): Promise<Record<string, Migration>>;
|
|
29
34
|
}
|
|
35
|
+
export interface FileMigrationProviderFS {
|
|
36
|
+
readdir(path: string): Promise<string[]>;
|
|
37
|
+
}
|
|
38
|
+
export interface FileMigrationProviderPath {
|
|
39
|
+
join(...path: string[]): string;
|
|
40
|
+
}
|
|
41
|
+
export interface FileMigrationProviderProps {
|
|
42
|
+
fs: FileMigrationProviderFS;
|
|
43
|
+
path: FileMigrationProviderPath;
|
|
44
|
+
migrationFolder: string;
|
|
45
|
+
}
|
|
@@ -3,32 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FileMigrationProvider = void 0;
|
|
4
4
|
const object_utils_js_1 = require("../util/object-utils.js");
|
|
5
5
|
/**
|
|
6
|
-
* Reads all migrations from a folder.
|
|
6
|
+
* Reads all migrations from a folder in node.js.
|
|
7
7
|
*
|
|
8
8
|
* ### Examples
|
|
9
9
|
*
|
|
10
10
|
* ```ts
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* import { promises as fs } from 'fs'
|
|
12
|
+
* import path from 'path'
|
|
13
|
+
*
|
|
14
|
+
* new FileMigrationProvider({
|
|
15
|
+
* fs,
|
|
16
|
+
* path,
|
|
17
|
+
* migrationFolder: 'path/to/migrations/folder'
|
|
18
|
+
* })
|
|
14
19
|
* ```
|
|
15
20
|
*/
|
|
16
21
|
class FileMigrationProvider {
|
|
17
|
-
#
|
|
18
|
-
constructor(
|
|
19
|
-
this.#
|
|
22
|
+
#props;
|
|
23
|
+
constructor(props) {
|
|
24
|
+
this.#props = props;
|
|
20
25
|
}
|
|
21
26
|
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'));
|
|
26
27
|
const migrations = {};
|
|
27
|
-
const files = await fs.readdir(this.#
|
|
28
|
+
const files = await this.#props.fs.readdir(this.#props.migrationFolder);
|
|
28
29
|
for (const fileName of files) {
|
|
29
30
|
if ((fileName.endsWith('.js') || fileName.endsWith('.ts')) &&
|
|
30
31
|
!fileName.endsWith('.d.ts')) {
|
|
31
|
-
const migration = await Promise.resolve().then(() => require(path.join(this.#
|
|
32
|
+
const migration = await Promise.resolve().then(() => require(this.#props.path.join(this.#props.migrationFolder, fileName)));
|
|
32
33
|
if (isMigration(migration)) {
|
|
33
34
|
migrations[fileName.substring(0, fileName.length - 3)] = migration;
|
|
34
35
|
}
|
|
@@ -188,6 +188,8 @@ export interface MigratorProps {
|
|
|
188
188
|
* If you do specify this, ALWAYS ALWAYS use the same value from the beginning of
|
|
189
189
|
* the project, to the end of time or prepare to manually migrate the migration
|
|
190
190
|
* tables.
|
|
191
|
+
*
|
|
192
|
+
* This only works on postgres.
|
|
191
193
|
*/
|
|
192
194
|
readonly migrationTableSchema?: string;
|
|
193
195
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueryResult } from '../driver/database-connection.js';
|
|
2
|
-
import { UnknownRow } from '../index-nodeless.js';
|
|
3
2
|
import { RootOperationNode } from '../query-compiler/query-compiler.js';
|
|
3
|
+
import { UnknownRow } from '../util/type-utils.js';
|
|
4
4
|
import { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from './kysely-plugin.js';
|
|
5
5
|
export declare class NoopPlugin implements KyselyPlugin {
|
|
6
6
|
/**
|
|
@@ -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);
|
|
@@ -70,16 +70,12 @@ class AlterTableBuilder {
|
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* See {@link CreateTableBuilder.addColumn}
|
|
73
|
-
*
|
|
74
|
-
* Unlike {@link CreateTableBuilder.addColumn} this method returns the column builder
|
|
75
|
-
* and doesn't take a callback as the last argument. This is because you can only
|
|
76
|
-
* add one column per `ALTER TABLE` query.
|
|
77
73
|
*/
|
|
78
|
-
addColumn(columnName, dataType) {
|
|
79
|
-
return new AlterTableAddColumnBuilder({
|
|
74
|
+
addColumn(columnName, dataType, build = object_utils_js_1.noop) {
|
|
75
|
+
return build(new AlterTableAddColumnBuilder({
|
|
80
76
|
...this.#props,
|
|
81
77
|
columnBuilder: new column_definition_builder_js_1.ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.create(columnName, (0, data_type_parser_js_1.parseDataTypeExpression)(dataType))),
|
|
82
|
-
});
|
|
78
|
+
}));
|
|
83
79
|
}
|
|
84
80
|
/**
|
|
85
81
|
* Creates an `alter table modify column` query. The `modify column` statement
|