(sequelize: Sequelize, options: QueryOptions, cb: () => Promise<T>)
| 2 | import type { QueryOptions } from '../abstract/query-interface.js'; |
| 3 | |
| 4 | export async function withSqliteForeignKeysOff<T>(sequelize: Sequelize, options: QueryOptions, cb: () => Promise<T>): Promise<T> { |
| 5 | try { |
| 6 | await sequelize.query('PRAGMA foreign_keys = OFF', options); |
| 7 | |
| 8 | return await cb(); |
| 9 | } finally { |
| 10 | await sequelize.query('PRAGMA foreign_keys = ON', options); |
| 11 | } |
| 12 | } |
no test coverage detected