UNPKG

adba

Version:
11 lines (10 loc) 637 B
import { Knex } from 'knex'; import { Model } from 'objection'; import { IGenerateModelsOptions } from './types'; /** * Generates models based on the structure of the database specified in the Knex instance. * @param {Knex} knexInstance - The Knex instance connected to the database. * @param {IGenerateModelsOptions} [opts={}] - Options including parse and format functions. * @returns {Promise<Record<string, typeof Model>>} - A promise that resolves to an object containing all generated models. */ export declare function generateModels(knexInstance: Knex, opts?: IGenerateModelsOptions): Promise<Record<string, typeof Model>>;