(fn: (trx: DbTransaction) => Promise<T>)
| 16 | * plan exists, the seq scan still runs. |
| 17 | */ |
| 18 | export async function withSeqscanOff<T>(fn: (trx: DbTransaction) => Promise<T>): Promise<T> { |
| 19 | return db.transaction(async (trx) => { |
| 20 | await trx.execute(sql`SET LOCAL enable_seqscan = off`) |
| 21 | return fn(trx) |
| 22 | }) |
| 23 | } |
no test coverage detected