Skip to content

Commit

Permalink
fix complex insert example
Browse files Browse the repository at this point in the history
  • Loading branch information
koskimas committed Mar 22, 2024
1 parent 8f9038f commit ead3489
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions site/docs/examples/INSERT/0040-complex-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const result = await db
last_name: sql\`concat(\${ani}, \${ston})\`,
middle_name: ref('first_name'),
age: selectFrom('person')
.select(fn.avg<number>('age')
.as('avg_age')),
.select(fn.avg<number>('age').as('avg_age')),
}))
.executeTakeFirst()`
3 changes: 1 addition & 2 deletions src/query-builder/insert-query-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ export class InsertQueryBuilder<DB, TB extends keyof DB, O>
* last_name: sql`concat(${ani}, ${ston})`,
* middle_name: ref('first_name'),
* age: selectFrom('person')
* .select(fn.avg<number>('age')
* .as('avg_age')),
* .select(fn.avg<number>('age').as('avg_age')),
* }))
* .executeTakeFirst()
* ```
Expand Down

0 comments on commit ead3489

Please sign in to comment.