@softvisio/core
Version:
Softisio core
34 lines (27 loc) • 653 B
JavaScript
export default class {
constructor ( api ) {
this.
}
// propertirs
get app () {
return this.
}
get api () {
return this.
}
get dbh () {
return this.
}
// protected
async _read ( ctx, query, { options, summaryQuery, dbh } = {} ) {
dbh ||= this.dbh;
return dbh.read( query, {
summaryQuery,
"orderBy": options.order_by ?? ctx?.method.readDefaultOrderBy,
"offset": options.offset,
"limit": options.limit,
...ctx.method.readLimit,
} );
}
}