import { configSql } from './sql' ; import { PostgresMetaResult , PostgresConfig } from './types' ; export default class PostgresMetaConfig { query : ( sql : string ) => Promise < PostgresMetaResult < any > > ; constructor ( query ) { this . query = query ; } async list ( { limit , offset , } = { } ) { let sql = configSql ; if ( limit ) { sql = `${ sql } LIMIT ${ limit }` ; } if ( offset ) { sql = `${ sql } OFFSET ${ offset }` ; } return await this . query ( sql ) ; } }