This commit is contained in:
Adria Navarro 2024-01-04 15:42:16 +01:00
parent 906943d023
commit 6df4bf84df
2 changed files with 4 additions and 7 deletions

View File

@ -57,17 +57,14 @@ async function getAndMergeDatasource(datasource: Datasource) {
async function buildSchemaHelper(datasource: Datasource): Promise<Schema> { async function buildSchemaHelper(datasource: Datasource): Promise<Schema> {
const connector = (await getConnector(datasource)) as DatasourcePlus const connector = (await getConnector(datasource)) as DatasourcePlus
return await connector.buildSchema( return await connector.buildSchema(datasource._id!, datasource.entities!)
datasource._id!,
datasource.entities! as Record<string, Table>
)
} }
async function buildFilteredSchema( async function buildFilteredSchema(
datasource: Datasource, datasource: Datasource,
filter?: string[] filter?: string[]
): Promise<Schema> { ): Promise<Schema> {
let schema = await buildSchemaHelper(datasource) const schema = await buildSchemaHelper(datasource)
if (!filter) { if (!filter) {
return schema return schema
} }

View File

@ -362,8 +362,8 @@ class PostgresIntegration extends Sql implements DatasourcePlus {
}) })
} }
let finalizedTables = finaliseExternalTables(tables, entities) const finalizedTables = finaliseExternalTables(tables, entities)
let errors = checkExternalTables(finalizedTables) const errors = checkExternalTables(finalizedTables)
return { tables: finalizedTables, errors } return { tables: finalizedTables, errors }
} catch (err) { } catch (err) {
// @ts-ignore // @ts-ignore