import { EntityQueryContextProvider } from '@expo/entity' ; import { Knex } from 'knex' ; /**
 * Query context provider for knex (postgres).
 */ export default class PostgresEntityQueryContextProvider extends EntityQueryContextProvider { constructor ( private readonly knexInstance ) { super ( ) ; } protected getQueryInterface ( ) { return this . knexInstance ; } protected createTransactionRunner < T > ( ) { return ( transactionScope ) => this . knexInstance . transaction ( transactionScope ) ; } }