I’ve browsed the PostgresKit documentation and haven’t found any built-in API that lets you directly set the transaction isolation level. I’ve looked for a transaction method with an isolation parameter—something like transaction(isolation: .serializable) or transaction(isolation: .repeatableRead)—but nothing like that is documented.
I also tried executing a raw SQL command (e.g., SET TRANSACTION ISOLATION LEVEL SERIALIZABLE) at the beginning of the transaction block to enforce a higher isolation level. Unfortunately, that approach doesn’t seem to be supported or doesn’t have the intended effect with PostgresKit’s current API.
It appears that, at least for now, configuring the isolation level might not be directly exposed via PostgresKit, and you may need to rely on the default isolation level (READ COMMITTED) or explore alternative strategies outside of PostgresKit’s current capabilities ?