K
Kysely13mo ago
tzezar

Can you mix kysely with pg transactions?

For example:
try {
await client.query('BEGIN')

<KYSELY CODE HERE>

await client.query('COMMIT')
} catch (e) {
await client.query('ROLLBACK')
throw e
} finally {
client.release()
}
try {
await client.query('BEGIN')

<KYSELY CODE HERE>

await client.query('COMMIT')
} catch (e) {
await client.query('ROLLBACK')
throw e
} finally {
client.release()
}
3 Replies
koskimas
koskimas13mo ago
You can use Kysely only to build the SQL and then exceute that any way you like.
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server