New features
PreferRepeatableRead
The main headline feature here is our new PreferRepeatableRead
transaction option which will downgrade the transaction isolation from Serializable
to RepeatableRead
iff the server thinks the query is safe to downgrade. You can opt into this behavior by using withTransactionOptions
:
export const client = createClient()
.withTransactionOptions({
isolation: IsolationLevel.PreferRepeatableRead,
});
withTransactionOptions
applies to implicit transactions as well
- Both
isolation
andreadonly
will now affect the implicit transaction that every query run with this client uses. You can use this to set a read-only client withRepeatableRead
isolation like:
export readonlyClient = createClient()
.withTransactionOptions({
isolation: IsolationLevel.RepeatableRead,
readonly: true,
});
What's Changed
- Match CLI package logic to Python wrapper by @scotttrinh in #1260
- Export more types and classes from
gel
package by @scotttrinh in #1262 - Add benchmark for query throughput by @scotttrinh in #1269
- Set default transaction options from
withTransactionOptions
by @scotttrinh in #1270 - Support
PreferRepeatableRead
isolation level by @scotttrinh in #1271