Skip to content

Commit

Permalink
improve subquery insert example
Browse files Browse the repository at this point in the history
  • Loading branch information
koskimas committed Mar 22, 2024
1 parent ead3489 commit 0e194b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion site/docs/examples/INSERT/0050-insert-subquery.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ title: 'Insert subquery'

# Insert subquery

You can create an `INSERT INTO SELECT FROM` query using the `expression` method:
You can create an `INSERT INTO SELECT FROM` query using the `expression` method.
This API doesn't follow our WYSIWYG principles and might be a bit difficult to
remember. The reasons for this design stem from implementation difficulties.

import {
Playground,
Expand Down
4 changes: 3 additions & 1 deletion src/query-builder/insert-query-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ export class InsertQueryBuilder<DB, TB extends keyof DB, O>
*
* <!-- siteExample("insert", "Insert subquery", 50) -->
*
* You can create an `INSERT INTO SELECT FROM` query using the `expression` method:
* You can create an `INSERT INTO SELECT FROM` query using the `expression` method.
* This API doesn't follow our WYSIWYG principles and might be a bit difficult to
* remember. The reasons for this design stem from implementation difficulties.
*
* ```ts
* const result = await db.insertInto('person')
Expand Down

0 comments on commit 0e194b0

Please sign in to comment.