Skip to content

Commit

Permalink
fix: sqlite custom join separator
Browse files Browse the repository at this point in the history
  • Loading branch information
jlarmstrongiv committed Jul 15, 2023
1 parent 9d2ef50 commit 13cc8b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helpers/sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ export function jsonBuildObject<O extends Record<string, Expression<unknown>>>(
}>
> {
return sql`json_object(${sql.join(
Object.keys(obj).flatMap((k) => [sql.lit(k), obj[k]])
Object.keys(obj).flatMap((k) => [sql.lit(k), obj[k]]),
sql` || `
)})`
}

Expand Down

0 comments on commit 13cc8b0

Please sign in to comment.