Rollback transaction

Hi, I'm trying to figure out if it's possible to intentionally rollback a transaction, the idea is that if one insert into the database ends with certain return value, the whole transaction should end and the insert rolled back. Knex has trx.rollback on the callback parameter, but I couldn't find anything like that on Kysely, am I missing something or is this not yet implemented?
await sql<void>`rollback`.execute(trx)

Okay I was doing raw sql badly, this does work at least
If you throw an error from the transaction callback, the transaction will be rolled back
Ugh, there's no way to change the solution. The marked solution is wrong and you shouldn't do that. You'll end up with a rollback and another rollback/commit once the transaction callback finishes.
Tried to change the solution to yours, personally I still feel like the interface is missing, as ending the transactions by throwing an exception (which has to be caught as it's rethrown) is not the best solution for query builder.
Hey ๐Ÿ‘‹

We've had this in mind, and are considering an alternative API:
Awesome, thanks for the reply ๐Ÿ™‚ We really like Kysely here and really like the direction you're taking it so looking forward to it