# Variable discover_tables

discover_tables: (
tableNames: string[],
schema0?: string,
dbModule?: DbExportsType,
) => Promise<{ tables: TablePack[] }>

#### Type Declaration

- - (
    tableNames: string[],
    schema0?: string,
    dbModule?: DbExportsType,
    ): Promise<{ tables: TablePack[] }>

  - Discover tables definitions

    #### Parameters

    - tableNames: string[]

      list of table names

    - `Optional` schema0: string

      db schema

    - dbModule: DbExportsType = db

    #### Returns Promise<{ tables: TablePack[] }>

- Defined in packages/saltcorn-data/models/index.ts:68