import type { CurrentStoreApi , MarshalledRowLike , JsonMap } from './types' ; const find = async ( pool , readModelName , tableName , searchExpression , fieldList , sort , skip , limit ) => { await pool . ensureAffectedOperation ( 'resolver' , readModelName ) ; const sqlQuery = pool . makeSqlQuery ( pool , readModelName , 'find' , tableName , searchExpression , fieldList , sort , skip , limit ) ; const inputRows = ( await pool . inlineLedgerRunQuery ( sqlQuery ) ) as Array < MarshalledRowLike > ; const rows = [ ] ; for ( let idx = 0 ; idx < inputRows . length ; idx ++ ) { rows [ idx ] = pool . convertResultRow ( inputRows [ idx ] , fieldList ) ; } return rows ; } ; export default find ;