kysely 0.11.3 → 0.12.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 (250) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/dialect/dialect-adapter-base.d.ts +36 -0
  3. package/dist/cjs/dialect/mysql/mysql-adapter.d.ts +36 -0
  4. package/dist/cjs/dialect/mysql/mysql-dialect.d.ts +16 -0
  5. package/dist/cjs/dialect/mysql/mysql-driver.d.ts +29 -0
  6. package/dist/cjs/dialect/mysql/mysql-introspector.d.ts +3 -0
  7. package/dist/cjs/dialect/postgres/postgres-adapter.d.ts +36 -0
  8. package/dist/cjs/dialect/postgres/postgres-dialect.d.ts +16 -0
  9. package/dist/cjs/dialect/postgres/postgres-driver.d.ts +29 -0
  10. package/dist/cjs/dialect/postgres/postgres-introspector.d.ts +3 -0
  11. package/dist/cjs/dialect/sqlite/sqlite-adapter.d.ts +36 -0
  12. package/dist/cjs/dialect/sqlite/sqlite-adapter.js +6 -2
  13. package/dist/cjs/dialect/sqlite/sqlite-dialect.d.ts +16 -0
  14. package/dist/cjs/dialect/sqlite/sqlite-driver.d.ts +29 -0
  15. package/dist/cjs/dialect/sqlite/sqlite-introspector.d.ts +3 -0
  16. package/dist/cjs/driver/default-connection-provider.d.ts +4 -0
  17. package/dist/cjs/driver/runtime-driver.d.ts +29 -0
  18. package/dist/cjs/driver/single-connection-provider.d.ts +4 -0
  19. package/dist/cjs/dynamic/dynamic-reference-builder.d.ts +1 -0
  20. package/dist/cjs/dynamic/dynamic-reference-builder.js +9 -1
  21. package/dist/cjs/dynamic/dynamic.d.ts +6 -7
  22. package/dist/cjs/dynamic/dynamic.js +6 -7
  23. package/dist/cjs/index.d.ts +14 -3
  24. package/dist/cjs/index.js +12 -1
  25. package/dist/cjs/kysely.d.ts +170 -11
  26. package/dist/cjs/kysely.js +69 -9
  27. package/dist/cjs/migration/migration.d.ts +2 -2
  28. package/dist/cjs/operation-node/common-table-expression-name-node.d.ts +15 -0
  29. package/dist/cjs/operation-node/common-table-expression-name-node.js +23 -0
  30. package/dist/cjs/operation-node/common-table-expression-node.d.ts +3 -3
  31. package/dist/cjs/operation-node/create-table-node.d.ts +6 -2
  32. package/dist/cjs/operation-node/create-table-node.js +6 -6
  33. package/dist/cjs/operation-node/create-view-node.d.ts +1 -0
  34. package/dist/cjs/operation-node/insert-query-node.d.ts +4 -4
  35. package/dist/cjs/operation-node/operation-node-transformer.d.ts +4 -0
  36. package/dist/cjs/operation-node/operation-node-transformer.js +20 -1
  37. package/dist/cjs/operation-node/operation-node-visitor.d.ts +4 -0
  38. package/dist/cjs/operation-node/operation-node-visitor.js +2 -0
  39. package/dist/cjs/operation-node/operation-node.d.ts +1 -1
  40. package/dist/cjs/operation-node/query-node.d.ts +0 -2
  41. package/dist/cjs/operation-node/query-node.js +0 -10
  42. package/dist/cjs/operation-node/values-node.d.ts +15 -0
  43. package/dist/cjs/operation-node/values-node.js +18 -0
  44. package/dist/cjs/operation-node/with-node.d.ts +3 -1
  45. package/dist/cjs/operation-node/with-node.js +2 -1
  46. package/dist/cjs/package.json +1 -3
  47. package/dist/cjs/parser/complex-expression-parser.d.ts +9 -0
  48. package/dist/cjs/parser/complex-expression-parser.js +25 -0
  49. package/dist/cjs/parser/filter-parser.d.ts +13 -4
  50. package/dist/cjs/parser/filter-parser.js +21 -24
  51. package/dist/cjs/parser/insert-values-parser.d.ts +7 -10
  52. package/dist/cjs/parser/insert-values-parser.js +31 -39
  53. package/dist/cjs/parser/order-by-parser.d.ts +1 -1
  54. package/dist/cjs/parser/parse-context.d.ts +22 -8
  55. package/dist/cjs/parser/parse-context.js +10 -10
  56. package/dist/cjs/parser/reference-parser.d.ts +8 -7
  57. package/dist/cjs/parser/reference-parser.js +8 -17
  58. package/dist/cjs/parser/returning-parser.d.ts +1 -5
  59. package/dist/cjs/parser/select-parser.d.ts +12 -14
  60. package/dist/cjs/parser/select-parser.js +5 -9
  61. package/dist/cjs/parser/table-parser.d.ts +9 -11
  62. package/dist/cjs/parser/table-parser.js +2 -8
  63. package/dist/cjs/parser/union-parser.d.ts +2 -2
  64. package/dist/cjs/parser/union-parser.js +1 -6
  65. package/dist/cjs/parser/update-set-parser.d.ts +2 -8
  66. package/dist/cjs/parser/update-set-parser.js +6 -26
  67. package/dist/cjs/parser/value-parser.d.ts +9 -6
  68. package/dist/cjs/parser/value-parser.js +7 -30
  69. package/dist/cjs/parser/with-parser.d.ts +36 -6
  70. package/dist/cjs/parser/with-parser.js +13 -2
  71. package/dist/cjs/plugin/camel-case/camel-case-plugin.d.ts +34 -0
  72. package/dist/cjs/plugin/immediate-value.ts/immediate-value-plugin.d.ts +34 -0
  73. package/dist/cjs/plugin/immediate-value.ts/immediate-value-plugin.js +2 -2
  74. package/dist/cjs/plugin/with-schema/with-schema-plugin.d.ts +34 -0
  75. package/dist/cjs/plugin/with-schema/with-schema-transformer.js +8 -0
  76. package/dist/cjs/query-builder/delete-query-builder.d.ts +647 -0
  77. package/dist/cjs/query-builder/delete-query-builder.js +185 -0
  78. package/dist/cjs/query-builder/expression-builder.d.ts +8 -6
  79. package/dist/cjs/query-builder/expression-builder.js +3 -3
  80. package/dist/cjs/query-builder/function-builder.d.ts +2 -1
  81. package/dist/cjs/query-builder/function-builder.js +2 -1
  82. package/dist/cjs/query-builder/having-interface.d.ts +49 -0
  83. package/dist/cjs/query-builder/having-interface.js +2 -0
  84. package/dist/cjs/query-builder/insert-query-builder.d.ts +504 -0
  85. package/dist/cjs/query-builder/insert-query-builder.js +256 -0
  86. package/dist/cjs/query-builder/insert-result.d.ts +3 -2
  87. package/dist/cjs/query-builder/insert-result.js +3 -2
  88. package/dist/cjs/query-builder/join-builder.d.ts +19 -20
  89. package/dist/cjs/query-builder/join-builder.js +12 -12
  90. package/dist/cjs/query-builder/join-interface.d.ts +130 -0
  91. package/dist/cjs/query-builder/join-interface.js +2 -0
  92. package/dist/cjs/query-builder/no-result-error.d.ts +9 -0
  93. package/dist/cjs/query-builder/no-result-error.js +14 -0
  94. package/dist/cjs/query-builder/returning-interface.d.ts +73 -0
  95. package/dist/cjs/query-builder/returning-interface.js +2 -0
  96. package/dist/cjs/query-builder/{query-builder.d.ts → select-query-builder.d.ts} +145 -634
  97. package/dist/cjs/query-builder/select-query-builder.js +571 -0
  98. package/dist/cjs/query-builder/update-query-builder.d.ts +735 -0
  99. package/dist/cjs/query-builder/update-query-builder.js +279 -0
  100. package/dist/cjs/query-builder/where-interface.d.ts +378 -0
  101. package/dist/cjs/query-builder/where-interface.js +2 -0
  102. package/dist/cjs/query-compiler/default-query-compiler.d.ts +4 -0
  103. package/dist/cjs/query-compiler/default-query-compiler.js +33 -5
  104. package/dist/cjs/query-creator.d.ts +69 -43
  105. package/dist/cjs/query-creator.js +66 -29
  106. package/dist/cjs/query-executor/default-query-executor.d.ts +19 -0
  107. package/dist/cjs/query-executor/noop-query-executor.d.ts +19 -0
  108. package/dist/cjs/query-executor/query-executor.d.ts +1 -1
  109. package/dist/cjs/query-executor/query-executor.js +1 -1
  110. package/dist/cjs/raw-builder/raw-builder.d.ts +2 -0
  111. package/dist/cjs/raw-builder/raw-builder.js +7 -1
  112. package/dist/cjs/schema/alter-table-builder.d.ts +218 -2
  113. package/dist/cjs/schema/column-definition-builder.d.ts +135 -20
  114. package/dist/cjs/schema/create-index-builder.d.ts +2 -1
  115. package/dist/cjs/schema/create-index-builder.js +2 -1
  116. package/dist/cjs/schema/create-table-builder.d.ts +26 -9
  117. package/dist/cjs/schema/create-table-builder.js +42 -9
  118. package/dist/cjs/schema/create-view-builder.d.ts +17 -3
  119. package/dist/cjs/schema/create-view-builder.js +25 -16
  120. package/dist/cjs/schema/schema.d.ts +18 -11
  121. package/dist/cjs/schema/schema.js +18 -11
  122. package/dist/cjs/util/log.d.ts +3 -2
  123. package/dist/cjs/util/log.js +8 -15
  124. package/dist/cjs/util/type-utils.d.ts +7 -7
  125. package/dist/esm/dialect/dialect-adapter-base.d.ts +36 -0
  126. package/dist/esm/dialect/mysql/mysql-adapter.d.ts +36 -0
  127. package/dist/esm/dialect/mysql/mysql-dialect.d.ts +16 -0
  128. package/dist/esm/dialect/mysql/mysql-driver.d.ts +29 -0
  129. package/dist/esm/dialect/mysql/mysql-introspector.d.ts +3 -0
  130. package/dist/esm/dialect/postgres/postgres-adapter.d.ts +36 -0
  131. package/dist/esm/dialect/postgres/postgres-dialect.d.ts +16 -0
  132. package/dist/esm/dialect/postgres/postgres-driver.d.ts +29 -0
  133. package/dist/esm/dialect/postgres/postgres-introspector.d.ts +3 -0
  134. package/dist/esm/dialect/sqlite/sqlite-adapter.d.ts +36 -0
  135. package/dist/esm/dialect/sqlite/sqlite-adapter.js +6 -2
  136. package/dist/esm/dialect/sqlite/sqlite-dialect.d.ts +16 -0
  137. package/dist/esm/dialect/sqlite/sqlite-driver.d.ts +29 -0
  138. package/dist/esm/dialect/sqlite/sqlite-introspector.d.ts +3 -0
  139. package/dist/esm/driver/default-connection-provider.d.ts +4 -0
  140. package/dist/esm/driver/runtime-driver.d.ts +29 -0
  141. package/dist/esm/driver/single-connection-provider.d.ts +4 -0
  142. package/dist/esm/dynamic/dynamic-reference-builder.d.ts +1 -0
  143. package/dist/esm/dynamic/dynamic-reference-builder.js +7 -0
  144. package/dist/esm/dynamic/dynamic.d.ts +6 -7
  145. package/dist/esm/dynamic/dynamic.js +6 -7
  146. package/dist/esm/index.d.ts +14 -3
  147. package/dist/esm/index.js +12 -1
  148. package/dist/esm/kysely.d.ts +170 -11
  149. package/dist/esm/kysely.js +69 -9
  150. package/dist/esm/migration/migration.d.ts +2 -2
  151. package/dist/esm/operation-node/common-table-expression-name-node.d.ts +15 -0
  152. package/dist/esm/operation-node/common-table-expression-name-node.js +20 -0
  153. package/dist/esm/operation-node/common-table-expression-node.d.ts +3 -3
  154. package/dist/esm/operation-node/create-table-node.d.ts +6 -2
  155. package/dist/esm/operation-node/create-table-node.js +6 -6
  156. package/dist/esm/operation-node/create-view-node.d.ts +1 -0
  157. package/dist/esm/operation-node/insert-query-node.d.ts +4 -4
  158. package/dist/esm/operation-node/operation-node-transformer.d.ts +4 -0
  159. package/dist/esm/operation-node/operation-node-transformer.js +20 -1
  160. package/dist/esm/operation-node/operation-node-visitor.d.ts +4 -0
  161. package/dist/esm/operation-node/operation-node-visitor.js +2 -0
  162. package/dist/esm/operation-node/operation-node.d.ts +1 -1
  163. package/dist/esm/operation-node/query-node.d.ts +0 -2
  164. package/dist/esm/operation-node/query-node.js +0 -10
  165. package/dist/esm/operation-node/values-node.d.ts +15 -0
  166. package/dist/esm/operation-node/values-node.js +15 -0
  167. package/dist/esm/operation-node/with-node.d.ts +3 -1
  168. package/dist/esm/operation-node/with-node.js +2 -1
  169. package/dist/esm/package.json +1 -3
  170. package/dist/esm/parser/complex-expression-parser.d.ts +9 -0
  171. package/dist/esm/parser/complex-expression-parser.js +20 -0
  172. package/dist/esm/parser/filter-parser.d.ts +13 -4
  173. package/dist/esm/parser/filter-parser.js +21 -24
  174. package/dist/esm/parser/insert-values-parser.d.ts +7 -10
  175. package/dist/esm/parser/insert-values-parser.js +31 -38
  176. package/dist/esm/parser/order-by-parser.d.ts +1 -1
  177. package/dist/esm/parser/parse-context.d.ts +22 -8
  178. package/dist/esm/parser/parse-context.js +10 -10
  179. package/dist/esm/parser/reference-parser.d.ts +8 -7
  180. package/dist/esm/parser/reference-parser.js +9 -18
  181. package/dist/esm/parser/returning-parser.d.ts +1 -5
  182. package/dist/esm/parser/select-parser.d.ts +12 -14
  183. package/dist/esm/parser/select-parser.js +6 -10
  184. package/dist/esm/parser/table-parser.d.ts +9 -11
  185. package/dist/esm/parser/table-parser.js +3 -9
  186. package/dist/esm/parser/union-parser.d.ts +2 -2
  187. package/dist/esm/parser/union-parser.js +1 -6
  188. package/dist/esm/parser/update-set-parser.d.ts +2 -8
  189. package/dist/esm/parser/update-set-parser.js +5 -24
  190. package/dist/esm/parser/value-parser.d.ts +9 -6
  191. package/dist/esm/parser/value-parser.js +8 -31
  192. package/dist/esm/parser/with-parser.d.ts +36 -6
  193. package/dist/esm/parser/with-parser.js +13 -2
  194. package/dist/esm/plugin/camel-case/camel-case-plugin.d.ts +34 -0
  195. package/dist/esm/plugin/immediate-value.ts/immediate-value-plugin.d.ts +34 -0
  196. package/dist/esm/plugin/immediate-value.ts/immediate-value-plugin.js +2 -2
  197. package/dist/esm/plugin/with-schema/with-schema-plugin.d.ts +34 -0
  198. package/dist/esm/plugin/with-schema/with-schema-transformer.js +8 -0
  199. package/dist/esm/query-builder/delete-query-builder.d.ts +647 -0
  200. package/dist/esm/query-builder/delete-query-builder.js +181 -0
  201. package/dist/esm/query-builder/expression-builder.d.ts +8 -6
  202. package/dist/esm/query-builder/expression-builder.js +3 -3
  203. package/dist/esm/query-builder/function-builder.d.ts +2 -1
  204. package/dist/esm/query-builder/function-builder.js +2 -1
  205. package/dist/esm/query-builder/having-interface.d.ts +49 -0
  206. package/dist/esm/query-builder/having-interface.js +1 -0
  207. package/dist/esm/query-builder/insert-query-builder.d.ts +504 -0
  208. package/dist/esm/query-builder/insert-query-builder.js +252 -0
  209. package/dist/esm/query-builder/insert-result.d.ts +3 -2
  210. package/dist/esm/query-builder/insert-result.js +3 -2
  211. package/dist/esm/query-builder/join-builder.d.ts +19 -20
  212. package/dist/esm/query-builder/join-builder.js +12 -12
  213. package/dist/esm/query-builder/join-interface.d.ts +130 -0
  214. package/dist/esm/query-builder/join-interface.js +1 -0
  215. package/dist/esm/query-builder/no-result-error.d.ts +9 -0
  216. package/dist/esm/query-builder/no-result-error.js +10 -0
  217. package/dist/esm/query-builder/returning-interface.d.ts +73 -0
  218. package/dist/esm/query-builder/returning-interface.js +1 -0
  219. package/dist/esm/query-builder/{query-builder.d.ts → select-query-builder.d.ts} +145 -634
  220. package/dist/esm/query-builder/select-query-builder.js +566 -0
  221. package/dist/esm/query-builder/update-query-builder.d.ts +735 -0
  222. package/dist/esm/query-builder/update-query-builder.js +275 -0
  223. package/dist/esm/query-builder/where-interface.d.ts +378 -0
  224. package/dist/esm/query-builder/where-interface.js +1 -0
  225. package/dist/esm/query-compiler/default-query-compiler.d.ts +4 -0
  226. package/dist/esm/query-compiler/default-query-compiler.js +33 -5
  227. package/dist/esm/query-creator.d.ts +69 -43
  228. package/dist/esm/query-creator.js +66 -29
  229. package/dist/esm/query-executor/default-query-executor.d.ts +19 -0
  230. package/dist/esm/query-executor/noop-query-executor.d.ts +19 -0
  231. package/dist/esm/query-executor/query-executor.d.ts +1 -1
  232. package/dist/esm/query-executor/query-executor.js +1 -1
  233. package/dist/esm/raw-builder/raw-builder.d.ts +2 -0
  234. package/dist/esm/raw-builder/raw-builder.js +7 -1
  235. package/dist/esm/schema/alter-table-builder.d.ts +218 -2
  236. package/dist/esm/schema/column-definition-builder.d.ts +135 -20
  237. package/dist/esm/schema/create-index-builder.d.ts +2 -1
  238. package/dist/esm/schema/create-index-builder.js +2 -1
  239. package/dist/esm/schema/create-table-builder.d.ts +26 -9
  240. package/dist/esm/schema/create-table-builder.js +43 -10
  241. package/dist/esm/schema/create-view-builder.d.ts +17 -3
  242. package/dist/esm/schema/create-view-builder.js +25 -16
  243. package/dist/esm/schema/schema.d.ts +18 -11
  244. package/dist/esm/schema/schema.js +18 -11
  245. package/dist/esm/util/log.d.ts +3 -2
  246. package/dist/esm/util/log.js +7 -14
  247. package/dist/esm/util/type-utils.d.ts +7 -7
  248. package/package.json +10 -8
  249. package/dist/cjs/query-builder/query-builder.js +0 -1067
  250. package/dist/esm/query-builder/query-builder.js +0 -1061
@@ -1,3 +1,4 @@
1
+ import { InsertQueryNode } from '../operation-node/insert-query-node.js';
1
2
  import { OperationNodeVisitor } from '../operation-node/operation-node-visitor.js';
2
3
  import { QueryNode } from '../operation-node/query-node.js';
3
4
  import { RawNode } from '../operation-node/raw-node.js';
@@ -24,9 +25,10 @@ export class DefaultQueryCompiler extends OperationNodeVisitor {
24
25
  return this.#sql;
25
26
  }
26
27
  visitSelectQuery(node) {
27
- const wrapInParens = this.nodeStack.length !== 1 &&
28
+ const wrapInParens = this.parentNode !== undefined &&
28
29
  !CreateViewNode.is(this.parentNode) &&
29
- !UnionNode.is(this.parentNode);
30
+ !UnionNode.is(this.parentNode) &&
31
+ !InsertQueryNode.is(this.parentNode);
30
32
  if (wrapInParens) {
31
33
  this.append('(');
32
34
  }
@@ -143,8 +145,8 @@ export class DefaultQueryCompiler extends OperationNodeVisitor {
143
145
  this.append(')');
144
146
  }
145
147
  if (node.values) {
146
- this.append(' values ');
147
- this.compileList(node.values);
148
+ this.append(' ');
149
+ this.visitNode(node.values);
148
150
  }
149
151
  if (node.onConflict) {
150
152
  this.append(' ');
@@ -162,6 +164,10 @@ export class DefaultQueryCompiler extends OperationNodeVisitor {
162
164
  this.append(')');
163
165
  }
164
166
  }
167
+ visitValues(node) {
168
+ this.append('values ');
169
+ this.compileList(node.values);
170
+ }
165
171
  visitDeleteQuery(node) {
166
172
  const isSubQuery = this.nodeStack.find(QueryNode.is) !== node;
167
173
  if (isSubQuery) {
@@ -294,7 +300,11 @@ export class DefaultQueryCompiler extends OperationNodeVisitor {
294
300
  this.visitNode(node.table);
295
301
  }
296
302
  visitCreateTable(node) {
297
- this.append('create table ');
303
+ this.append('create ');
304
+ if (node.temporary) {
305
+ this.append('temporary ');
306
+ }
307
+ this.append('table ');
298
308
  if (node.ifNotExists) {
299
309
  this.append('if not exists ');
300
310
  }
@@ -302,6 +312,10 @@ export class DefaultQueryCompiler extends OperationNodeVisitor {
302
312
  this.append(' (');
303
313
  this.compileList([...node.columns, ...(node.constraints ?? [])]);
304
314
  this.append(')');
315
+ if (node.onCommit) {
316
+ this.append(' on commit ');
317
+ this.append(node.onCommit);
318
+ }
305
319
  }
306
320
  visitColumnDefinition(node) {
307
321
  this.visitNode(node.column);
@@ -556,6 +570,9 @@ export class DefaultQueryCompiler extends OperationNodeVisitor {
556
570
  }
557
571
  visitWith(node) {
558
572
  this.append('with ');
573
+ if (node.recursive) {
574
+ this.append('recursive ');
575
+ }
559
576
  this.compileList(node.expressions);
560
577
  }
561
578
  visitCommonTableExpression(node) {
@@ -563,6 +580,14 @@ export class DefaultQueryCompiler extends OperationNodeVisitor {
563
580
  this.append(' as ');
564
581
  this.visitNode(node.expression);
565
582
  }
583
+ visitCommonTableExpressionName(node) {
584
+ this.visitNode(node.table);
585
+ if (node.columns) {
586
+ this.append('(');
587
+ this.compileList(node.columns);
588
+ this.append(')');
589
+ }
590
+ }
566
591
  visitAlterTable(node) {
567
592
  this.append('alter table ');
568
593
  this.visitNode(node.table);
@@ -664,6 +689,9 @@ export class DefaultQueryCompiler extends OperationNodeVisitor {
664
689
  if (node.materialized) {
665
690
  this.append('materialized ');
666
691
  }
692
+ if (node.temporary) {
693
+ this.append('temporary ');
694
+ }
667
695
  this.append('view ');
668
696
  if (node.ifNotExists) {
669
697
  this.append('if not exists ');
@@ -1,8 +1,11 @@
1
- import { QueryBuilder } from './query-builder/query-builder.js';
2
- import { QueryBuilderWithTable, TableExpression, TableReference } from './parser/table-parser.js';
1
+ import { SelectQueryBuilder } from './query-builder/select-query-builder.js';
2
+ import { InsertQueryBuilder } from './query-builder/insert-query-builder.js';
3
+ import { DeleteQueryBuilder } from './query-builder/delete-query-builder.js';
4
+ import { UpdateQueryBuilder } from './query-builder/update-query-builder.js';
5
+ import { TableExpression, TableExpressionDatabase, TableExpressionTables, TableReference } from './parser/table-parser.js';
3
6
  import { QueryExecutor } from './query-executor/query-executor.js';
4
7
  import { RawBuilder } from './raw-builder/raw-builder.js';
5
- import { CommonTableExpression, QueryCreatorWithCommonTableExpression } from './parser/with-parser.js';
8
+ import { CommonTableExpression, QueryCreatorWithCommonTableExpression, RecursiveCommonTableExpression } from './parser/with-parser.js';
6
9
  import { WithNode } from './operation-node/with-node.js';
7
10
  import { ParseContext } from './parser/parse-context.js';
8
11
  import { InsertResult } from './query-builder/insert-result.js';
@@ -16,7 +19,8 @@ export declare class QueryCreator<DB> {
16
19
  *
17
20
  * The tables passed to this method are built as the query's `from` clause.
18
21
  *
19
- * @example
22
+ * ### Examples
23
+ *
20
24
  * Create a select query for one table:
21
25
  *
22
26
  * ```ts
@@ -29,12 +33,11 @@ export declare class QueryCreator<DB> {
29
33
  * select * from "person"
30
34
  * ```
31
35
  *
32
- * @example
33
36
  * Create a select query for one table with an alias:
34
37
  *
35
38
  * ```ts
36
39
  * const persons = await db.selectFrom('person as p')
37
- * .select(['p.id', 'p.first_name'])
40
+ * .select(['p.id', 'first_name'])
38
41
  * .execute()
39
42
  *
40
43
  * console.log(persons[0].id)
@@ -43,15 +46,14 @@ export declare class QueryCreator<DB> {
43
46
  * The generated SQL (PostgreSQL):
44
47
  *
45
48
  * ```sql
46
- * select "p"."id", "p"."first_name" from "person" as "p"
49
+ * select "p"."id", "first_name" from "person" as "p"
47
50
  * ```
48
51
  *
49
- * @example
50
52
  * Create a select query from a subquery:
51
53
  *
52
54
  * ```ts
53
55
  * const persons = await db.selectFrom(
54
- * db.selectFrom('person').select('person.id as identifier').as('p')
56
+ * (eb) => eb.selectFrom('person').select('person.id as identifier').as('p')
55
57
  * )
56
58
  * .select('p.identifier')
57
59
  * .execute()
@@ -68,12 +70,11 @@ export declare class QueryCreator<DB> {
68
70
  * ) as p
69
71
  * ```
70
72
  *
71
- * @example
72
73
  * Create a select query from raw sql:
73
74
  *
74
75
  * ```ts
75
76
  * const items = await db.selectFrom(
76
- * db.raw<{ one: number }>('(select 1 as one)').as('q')
77
+ * db.raw<{ one: number }>('(select 1 as one)').as('q')
77
78
  * )
78
79
  * .select('q.one')
79
80
  * .execute()
@@ -94,7 +95,6 @@ export declare class QueryCreator<DB> {
94
95
  * raw segment / query so that Kysely can figure out what columns are
95
96
  * available for the query.
96
97
  *
97
- * @example
98
98
  * The `selectFrom` method also accepts an array for multiple tables. All
99
99
  * the above examples can also be used in an array.
100
100
  *
@@ -102,7 +102,7 @@ export declare class QueryCreator<DB> {
102
102
  * const items = await db.selectFrom([
103
103
  * 'person as p',
104
104
  * db.selectFrom('pet').select('pet.species').as('a'),
105
- * db.raw<{ one: number }>('(select 1 as one)').as('q')
105
+ * db.raw<{ one: number }>('(select 1 as one)').as('q')
106
106
  * ])
107
107
  * .select(['p.id', 'a.species', 'q.one'])
108
108
  * .execute()
@@ -118,20 +118,21 @@ export declare class QueryCreator<DB> {
118
118
  * (select 1 as one) as "q"
119
119
  * ```
120
120
  */
121
- selectFrom<F extends TableExpression<DB, keyof DB>>(from: F[]): QueryBuilderWithTable<DB, never, {}, F>;
122
- selectFrom<F extends TableExpression<DB, keyof DB>>(from: F): QueryBuilderWithTable<DB, never, {}, F>;
121
+ selectFrom<TE extends TableExpression<DB, keyof DB>>(from: TE[]): SelectQueryBuilder<TableExpressionDatabase<DB, TE>, TableExpressionTables<DB, never, TE>, {}>;
122
+ selectFrom<TE extends TableExpression<DB, keyof DB>>(from: TE): SelectQueryBuilder<TableExpressionDatabase<DB, TE>, TableExpressionTables<DB, never, TE>, {}>;
123
123
  /**
124
124
  * Creates an insert query.
125
125
  *
126
126
  * The return value of this query is an instance of {@link InsertResult}. {@link InsertResult}
127
- * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of
127
+ * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of
128
128
  * the inserted row if the db returned one.
129
129
  *
130
- * See the {@link QueryBuilder.values | values} method for more info and examples. Also see
131
- * the {@link QueryBuilder.returning | returning} method for a way to return columns
130
+ * See the {@link InsertQueryBuilder.values | values} method for more info and examples. Also see
131
+ * the {@link ReturningInterface.returning | returning} method for a way to return columns
132
132
  * on supported databases like PostgreSQL.
133
133
  *
134
- * @example
134
+ * ### Examples
135
+ *
135
136
  * ```ts
136
137
  * const result = await db
137
138
  * .insertInto('person')
@@ -145,11 +146,10 @@ export declare class QueryCreator<DB> {
145
146
  * console.log(result.insertId)
146
147
  * ```
147
148
  *
148
- * @example
149
149
  * Some databases like PostgreSQL support the `returning` method:
150
150
  *
151
151
  * ```ts
152
- * const { id } = await db
152
+ * const { id } = await db
153
153
  * .insertInto('person')
154
154
  * .values({
155
155
  * id: db.generated,
@@ -160,16 +160,17 @@ export declare class QueryCreator<DB> {
160
160
  * .executeTakeFirst()
161
161
  * ```
162
162
  */
163
- insertInto<T extends keyof DB & string>(table: T): QueryBuilder<DB, T, InsertResult>;
163
+ insertInto<T extends keyof DB & string>(table: T): InsertQueryBuilder<DB, T, InsertResult>;
164
164
  /**
165
165
  * Creates a delete query.
166
166
  *
167
- * See the {@link QueryBuilder.where} method for examples on how to specify
167
+ * See the {@link WhereInterface.where} method for examples on how to specify
168
168
  * a where clause for the delete operation.
169
169
  *
170
170
  * The return value of the query is an instance of {@link DeleteResult}.
171
171
  *
172
- * @example
172
+ * ### Examples
173
+ *
173
174
  * ```ts
174
175
  * const result = await db
175
176
  * .deleteFrom('person')
@@ -179,19 +180,20 @@ export declare class QueryCreator<DB> {
179
180
  * console.log(result.numDeletedRows)
180
181
  * ```
181
182
  */
182
- deleteFrom<TR extends TableReference<DB>>(table: TR): QueryBuilderWithTable<DB, never, DeleteResult, TR>;
183
+ deleteFrom<TR extends TableReference<DB>>(table: TR): DeleteQueryBuilder<TableExpressionDatabase<DB, TR>, TableExpressionTables<DB, never, TR>, DeleteResult>;
183
184
  /**
184
185
  * Creates an update query.
185
186
  *
186
- * See the {@link QueryBuilder.where} method for examples on how to specify
187
+ * See the {@link WhereInterface.where} method for examples on how to specify
187
188
  * a where clause for the update operation.
188
189
  *
189
- * See the {@link QueryBuilder.set} method for examples on how to
190
+ * See the {@link UpdateQueryBuilder.set} method for examples on how to
190
191
  * specify the updates.
191
192
  *
192
193
  * The return value of the query is an {@link UpdateResult}.
193
194
  *
194
- * @example
195
+ * ### Examples
196
+ *
195
197
  * ```ts
196
198
  * const result = await db
197
199
  * .updateTable('person')
@@ -202,11 +204,12 @@ export declare class QueryCreator<DB> {
202
204
  * console.log(result.numUpdatedRows)
203
205
  * ```
204
206
  */
205
- updateTable<TR extends TableReference<DB>>(table: TR): QueryBuilderWithTable<DB, never, UpdateResult, TR>;
207
+ updateTable<TR extends TableReference<DB>>(table: TR): UpdateQueryBuilder<TableExpressionDatabase<DB, TR>, TableExpressionTables<DB, never, TR>, UpdateResult>;
206
208
  /**
207
- * Creates a `with` query (common table expressions).
209
+ * Creates a `with` query (Common Table Expression).
210
+ *
211
+ * ### Examples
208
212
  *
209
- * @example
210
213
  * ```ts
211
214
  * await db
212
215
  * .with('jennifers', (db) => db
@@ -224,8 +227,32 @@ export declare class QueryCreator<DB> {
224
227
  * .selectAll()
225
228
  * .execute()
226
229
  * ```
230
+ *
231
+ * The CTE name can optionally specify column names in addition to
232
+ * a name. In that case Kysely requires the expression to retun
233
+ * rows with the same columns.
234
+ *
235
+ * ```ts
236
+ * await db
237
+ * .with('jennifers(id, age)', (db) => db
238
+ * .selectFrom('person')
239
+ * .where('first_name', '=', 'Jennifer')
240
+ * // This is ok since we return columns with the same
241
+ * // names as specified by `jennifers(id, age)`.
242
+ * .select(['id', 'age'])
243
+ * )
244
+ * .selectFrom('jennifers')
245
+ * .selectAll()
246
+ * .execute()
247
+ * ```
227
248
  */
228
- with<N extends string, E extends CommonTableExpression<DB>>(name: N, expression: E): QueryCreatorWithCommonTableExpression<DB, N, E>;
249
+ with<N extends string, E extends CommonTableExpression<DB, N>>(name: N, expression: E): QueryCreatorWithCommonTableExpression<DB, N, E>;
250
+ /**
251
+ * Creates a recursive `with` query (Common Table Expression).
252
+ *
253
+ * See the {@link with} method for examples and more documentation.
254
+ */
255
+ withRecursive<N extends string, E extends RecursiveCommonTableExpression<DB, N>>(name: N, expression: E): QueryCreatorWithCommonTableExpression<DB, N, E>;
229
256
  /**
230
257
  * Sets the schema to be used for all table references that don't explicitly
231
258
  * specify a schema.
@@ -233,7 +260,8 @@ export declare class QueryCreator<DB> {
233
260
  * This only affects the query created through the builder returned from
234
261
  * this method and doesn't modify the `db` instance.
235
262
  *
236
- * @example
263
+ * ### Examples
264
+ *
237
265
  * ```
238
266
  * await db.withSchema('mammals')
239
267
  * .selectFrom('pet')
@@ -250,7 +278,6 @@ export declare class QueryCreator<DB> {
250
278
  * on "public"."person"."id" = "mammals"."pet"."owner_id"
251
279
  * ```
252
280
  *
253
- * @example
254
281
  * `withSchema` is smart enough to not add schema for aliases,
255
282
  * common table expressions or other places where the schema
256
283
  * doesn't belong to:
@@ -288,14 +315,8 @@ export declare class QueryCreator<DB> {
288
315
  * Raw builder instances can be passed to pretty much anywhere: `select`, `where`,
289
316
  * `*Join`, `groupBy`, `orderBy` etc. Just try it. If the method accepts it, it works.
290
317
  *
291
- * @param sql - The raw SQL. Special strings `?` and `??` can be used as parameter
292
- * placeholders. `?` for values and `??` for identifiers such as column names
293
- * or `column.table` references.
294
- *
295
- * @param params - The parameters that will be bound to the `?` and `??` placeholders in
296
- * the sql string.
318
+ * ### Examples
297
319
  *
298
- * @example
299
320
  * Example of using `raw` in a select statement:
300
321
  *
301
322
  * ```ts
@@ -349,7 +370,6 @@ export declare class QueryCreator<DB> {
349
370
  * array, never to the SQL string directly. But if the column names or values are trusted
350
371
  * and known at compile time, there is no reason to use parameters.
351
372
  *
352
- * @example
353
373
  * Example of using `raw` in `where`:
354
374
  *
355
375
  * ```ts
@@ -375,7 +395,6 @@ export declare class QueryCreator<DB> {
375
395
  * years. The number of years in this example is an untrusted user input, and therefore we use
376
396
  * a `?` placeholder for it.
377
397
  *
378
- * @example
379
398
  * Example of creating a completely raw query from scratch:
380
399
  *
381
400
  * ```ts
@@ -387,6 +406,13 @@ export declare class QueryCreator<DB> {
387
406
  * this case we know the resulting items will be of type `Person` se specify that.
388
407
  * The result of `execute()` method is always an array. In this case the type of
389
408
  * the `persons` variable is `Person[]`.
409
+ *
410
+ * @param sql - The raw SQL. Special strings `?` and `??` can be used as parameter
411
+ * placeholders. `?` for values and `??` for identifiers such as column names
412
+ * or `column.table` references.
413
+ *
414
+ * @param params - The parameters that will be bound to the `?` and `??` placeholders in
415
+ * the sql string.
390
416
  */
391
417
  raw<T = unknown>(sql: string, parameters?: any[]): RawBuilder<T>;
392
418
  }
@@ -1,4 +1,7 @@
1
- import { QueryBuilder } from './query-builder/query-builder.js';
1
+ import { SelectQueryBuilder } from './query-builder/select-query-builder.js';
2
+ import { InsertQueryBuilder } from './query-builder/insert-query-builder.js';
3
+ import { DeleteQueryBuilder } from './query-builder/delete-query-builder.js';
4
+ import { UpdateQueryBuilder } from './query-builder/update-query-builder.js';
2
5
  import { DeleteQueryNode } from './operation-node/delete-query-node.js';
3
6
  import { InsertQueryNode } from './operation-node/insert-query-node.js';
4
7
  import { SelectQueryNode } from './operation-node/select-query-node.js';
@@ -16,7 +19,7 @@ export class QueryCreator {
16
19
  this.#props = freeze(props);
17
20
  }
18
21
  selectFrom(from) {
19
- return new QueryBuilder({
22
+ return new SelectQueryBuilder({
20
23
  queryId: createQueryId(),
21
24
  executor: this.#props.executor,
22
25
  parseContext: this.#props.parseContext,
@@ -27,14 +30,15 @@ export class QueryCreator {
27
30
  * Creates an insert query.
28
31
  *
29
32
  * The return value of this query is an instance of {@link InsertResult}. {@link InsertResult}
30
- * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of
33
+ * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of
31
34
  * the inserted row if the db returned one.
32
35
  *
33
- * See the {@link QueryBuilder.values | values} method for more info and examples. Also see
34
- * the {@link QueryBuilder.returning | returning} method for a way to return columns
36
+ * See the {@link InsertQueryBuilder.values | values} method for more info and examples. Also see
37
+ * the {@link ReturningInterface.returning | returning} method for a way to return columns
35
38
  * on supported databases like PostgreSQL.
36
39
  *
37
- * @example
40
+ * ### Examples
41
+ *
38
42
  * ```ts
39
43
  * const result = await db
40
44
  * .insertInto('person')
@@ -48,11 +52,10 @@ export class QueryCreator {
48
52
  * console.log(result.insertId)
49
53
  * ```
50
54
  *
51
- * @example
52
55
  * Some databases like PostgreSQL support the `returning` method:
53
56
  *
54
57
  * ```ts
55
- * const { id } = await db
58
+ * const { id } = await db
56
59
  * .insertInto('person')
57
60
  * .values({
58
61
  * id: db.generated,
@@ -64,7 +67,7 @@ export class QueryCreator {
64
67
  * ```
65
68
  */
66
69
  insertInto(table) {
67
- return new QueryBuilder({
70
+ return new InsertQueryBuilder({
68
71
  queryId: createQueryId(),
69
72
  executor: this.#props.executor,
70
73
  parseContext: this.#props.parseContext,
@@ -74,12 +77,13 @@ export class QueryCreator {
74
77
  /**
75
78
  * Creates a delete query.
76
79
  *
77
- * See the {@link QueryBuilder.where} method for examples on how to specify
80
+ * See the {@link WhereInterface.where} method for examples on how to specify
78
81
  * a where clause for the delete operation.
79
82
  *
80
83
  * The return value of the query is an instance of {@link DeleteResult}.
81
84
  *
82
- * @example
85
+ * ### Examples
86
+ *
83
87
  * ```ts
84
88
  * const result = await db
85
89
  * .deleteFrom('person')
@@ -90,7 +94,7 @@ export class QueryCreator {
90
94
  * ```
91
95
  */
92
96
  deleteFrom(table) {
93
- return new QueryBuilder({
97
+ return new DeleteQueryBuilder({
94
98
  queryId: createQueryId(),
95
99
  executor: this.#props.executor,
96
100
  parseContext: this.#props.parseContext,
@@ -100,15 +104,16 @@ export class QueryCreator {
100
104
  /**
101
105
  * Creates an update query.
102
106
  *
103
- * See the {@link QueryBuilder.where} method for examples on how to specify
107
+ * See the {@link WhereInterface.where} method for examples on how to specify
104
108
  * a where clause for the update operation.
105
109
  *
106
- * See the {@link QueryBuilder.set} method for examples on how to
110
+ * See the {@link UpdateQueryBuilder.set} method for examples on how to
107
111
  * specify the updates.
108
112
  *
109
113
  * The return value of the query is an {@link UpdateResult}.
110
114
  *
111
- * @example
115
+ * ### Examples
116
+ *
112
117
  * ```ts
113
118
  * const result = await db
114
119
  * .updateTable('person')
@@ -120,7 +125,7 @@ export class QueryCreator {
120
125
  * ```
121
126
  */
122
127
  updateTable(table) {
123
- return new QueryBuilder({
128
+ return new UpdateQueryBuilder({
124
129
  queryId: createQueryId(),
125
130
  executor: this.#props.executor,
126
131
  parseContext: this.#props.parseContext,
@@ -128,9 +133,10 @@ export class QueryCreator {
128
133
  });
129
134
  }
130
135
  /**
131
- * Creates a `with` query (common table expressions).
136
+ * Creates a `with` query (Common Table Expression).
137
+ *
138
+ * ### Examples
132
139
  *
133
- * @example
134
140
  * ```ts
135
141
  * await db
136
142
  * .with('jennifers', (db) => db
@@ -148,6 +154,24 @@ export class QueryCreator {
148
154
  * .selectAll()
149
155
  * .execute()
150
156
  * ```
157
+ *
158
+ * The CTE name can optionally specify column names in addition to
159
+ * a name. In that case Kysely requires the expression to retun
160
+ * rows with the same columns.
161
+ *
162
+ * ```ts
163
+ * await db
164
+ * .with('jennifers(id, age)', (db) => db
165
+ * .selectFrom('person')
166
+ * .where('first_name', '=', 'Jennifer')
167
+ * // This is ok since we return columns with the same
168
+ * // names as specified by `jennifers(id, age)`.
169
+ * .select(['id', 'age'])
170
+ * )
171
+ * .selectFrom('jennifers')
172
+ * .selectAll()
173
+ * .execute()
174
+ * ```
151
175
  */
152
176
  with(name, expression) {
153
177
  const cte = parseCommonTableExpression(this.#props.parseContext, name, expression);
@@ -158,6 +182,20 @@ export class QueryCreator {
158
182
  : WithNode.create(cte),
159
183
  });
160
184
  }
185
+ /**
186
+ * Creates a recursive `with` query (Common Table Expression).
187
+ *
188
+ * See the {@link with} method for examples and more documentation.
189
+ */
190
+ withRecursive(name, expression) {
191
+ const cte = parseCommonTableExpression(this.#props.parseContext, name, expression);
192
+ return new QueryCreator({
193
+ ...this.#props,
194
+ withNode: this.#props.withNode
195
+ ? WithNode.cloneWithExpression(this.#props.withNode, cte)
196
+ : WithNode.create(cte, { recursive: true }),
197
+ });
198
+ }
161
199
  /**
162
200
  * Sets the schema to be used for all table references that don't explicitly
163
201
  * specify a schema.
@@ -165,7 +203,8 @@ export class QueryCreator {
165
203
  * This only affects the query created through the builder returned from
166
204
  * this method and doesn't modify the `db` instance.
167
205
  *
168
- * @example
206
+ * ### Examples
207
+ *
169
208
  * ```
170
209
  * await db.withSchema('mammals')
171
210
  * .selectFrom('pet')
@@ -182,7 +221,6 @@ export class QueryCreator {
182
221
  * on "public"."person"."id" = "mammals"."pet"."owner_id"
183
222
  * ```
184
223
  *
185
- * @example
186
224
  * `withSchema` is smart enough to not add schema for aliases,
187
225
  * common table expressions or other places where the schema
188
226
  * doesn't belong to:
@@ -225,14 +263,8 @@ export class QueryCreator {
225
263
  * Raw builder instances can be passed to pretty much anywhere: `select`, `where`,
226
264
  * `*Join`, `groupBy`, `orderBy` etc. Just try it. If the method accepts it, it works.
227
265
  *
228
- * @param sql - The raw SQL. Special strings `?` and `??` can be used as parameter
229
- * placeholders. `?` for values and `??` for identifiers such as column names
230
- * or `column.table` references.
266
+ * ### Examples
231
267
  *
232
- * @param params - The parameters that will be bound to the `?` and `??` placeholders in
233
- * the sql string.
234
- *
235
- * @example
236
268
  * Example of using `raw` in a select statement:
237
269
  *
238
270
  * ```ts
@@ -286,7 +318,6 @@ export class QueryCreator {
286
318
  * array, never to the SQL string directly. But if the column names or values are trusted
287
319
  * and known at compile time, there is no reason to use parameters.
288
320
  *
289
- * @example
290
321
  * Example of using `raw` in `where`:
291
322
  *
292
323
  * ```ts
@@ -312,7 +343,6 @@ export class QueryCreator {
312
343
  * years. The number of years in this example is an untrusted user input, and therefore we use
313
344
  * a `?` placeholder for it.
314
345
  *
315
- * @example
316
346
  * Example of creating a completely raw query from scratch:
317
347
  *
318
348
  * ```ts
@@ -324,6 +354,13 @@ export class QueryCreator {
324
354
  * this case we know the resulting items will be of type `Person` se specify that.
325
355
  * The result of `execute()` method is always an array. In this case the type of
326
356
  * the `persons` variable is `Person[]`.
357
+ *
358
+ * @param sql - The raw SQL. Special strings `?` and `??` can be used as parameter
359
+ * placeholders. `?` for values and `??` for identifiers such as column names
360
+ * or `column.table` references.
361
+ *
362
+ * @param params - The parameters that will be bound to the `?` and `??` placeholders in
363
+ * the sql string.
327
364
  */
328
365
  raw(sql, parameters) {
329
366
  return new RawBuilder({
@@ -7,10 +7,29 @@ import { QueryExecutor } from './query-executor.js';
7
7
  export declare class DefaultQueryExecutor extends QueryExecutor {
8
8
  #private;
9
9
  constructor(compiler: QueryCompiler, connectionProvider: ConnectionProvider, plugins?: KyselyPlugin[]);
10
+ /**
11
+ * Compiles the transformed query into SQL. You usually want to pass
12
+ * the output of {@link transformQuery} into this method but you can
13
+ * compile any query using this method.
14
+ */
10
15
  compileQuery(node: RootOperationNode): CompiledQuery;
11
16
  protected executeQueryImpl<R>(compiledQuery: CompiledQuery): Promise<QueryResult<R>>;
17
+ /**
18
+ * Returns a copy of this executor with a plugin added as the
19
+ * last plugin.
20
+ */
12
21
  withPlugin(plugin: KyselyPlugin): DefaultQueryExecutor;
22
+ /**
23
+ * Returns a copy of this executor with a plugin added as the
24
+ * first plugin.
25
+ */
13
26
  withPluginAtFront(plugin: KyselyPlugin): DefaultQueryExecutor;
27
+ /**
28
+ * Returns a copy of this executor with a new connection provider.
29
+ */
14
30
  withConnectionProvider(connectionProvider: ConnectionProvider): QueryExecutor;
31
+ /**
32
+ * Returns a copy of this executor without any plugins.
33
+ */
15
34
  withoutPlugins(): QueryExecutor;
16
35
  }
@@ -8,10 +8,29 @@ import { KyselyPlugin } from '../plugin/kysely-plugin.js';
8
8
  * other needed things to actually execute queries.
9
9
  */
10
10
  export declare class NoopQueryExecutor extends QueryExecutor {
11
+ /**
12
+ * Compiles the transformed query into SQL. You usually want to pass
13
+ * the output of {@link transformQuery} into this method but you can
14
+ * compile any query using this method.
15
+ */
11
16
  compileQuery(): CompiledQuery;
12
17
  protected executeQueryImpl<R>(): Promise<QueryResult<R>>;
18
+ /**
19
+ * Returns a copy of this executor with a new connection provider.
20
+ */
13
21
  withConnectionProvider(): QueryExecutor;
22
+ /**
23
+ * Returns a copy of this executor with a plugin added as the
24
+ * last plugin.
25
+ */
14
26
  withPlugin(plugin: KyselyPlugin): NoopQueryExecutor;
27
+ /**
28
+ * Returns a copy of this executor with a plugin added as the
29
+ * first plugin.
30
+ */
15
31
  withPluginAtFront(plugin: KyselyPlugin): NoopQueryExecutor;
32
+ /**
33
+ * Returns a copy of this executor without any plugins.
34
+ */
16
35
  withoutPlugins(): QueryExecutor;
17
36
  }
@@ -6,7 +6,7 @@ import { KyselyPlugin } from '../plugin/kysely-plugin.js';
6
6
  import { QueryId } from '../util/query-id.js';
7
7
  /**
8
8
  * This class abstracts away the details of how to compile a query into SQL
9
- * and execute it. Instead of passing around all those details, {@link QueryBuilder}
9
+ * and execute it. Instead of passing around all those details, {@link SelectQueryBuilder}
10
10
  * and other classes that execute queries can just pass around and instance of
11
11
  * `QueryExecutor`.
12
12
  */