bajo-db-restproxy
Version:
Bajo DB REST Proxy Client driver for Bajo Framework
14 lines (11 loc) • 576 B
JavaScript
import unsupported from '../../generic/unsupported.js'
async function histogram ({ schema, filter = {}, options = {} } = {}) {
const { importModule } = this.bajo.helper
const { getInfo } = this.bajoDb.helper
const { driver } = getInfo(schema)
const prefix = driver.provider ? `${driver.provider}:/bajoDbRestproxy` : 'bajoDbRestproxy:/bajoDb'
const mod = await importModule(`${prefix}/lib/${driver.type}/stat-histogram.js`)
if (!mod) return unsupported.call(this)
return await mod.call(this, { schema, filter, options })
}
export default histogram