|
|
@ -274,8 +274,8 @@ export async function populateMeta( |
|
|
|
// await this.syncRelations();
|
|
|
|
// await this.syncRelations();
|
|
|
|
|
|
|
|
|
|
|
|
const tableMetasInsert = tables.map((table) => { |
|
|
|
const tableMetasInsert = tables.map((table) => { |
|
|
|
logger?.(`Populating meta for table '${table.title}'`); |
|
|
|
|
|
|
|
return async () => { |
|
|
|
return async () => { |
|
|
|
|
|
|
|
logger?.(`Populating meta for table '${table.title}'`); |
|
|
|
/* filter relation where this table is present */ |
|
|
|
/* filter relation where this table is present */ |
|
|
|
const tableRelations = relations.filter( |
|
|
|
const tableRelations = relations.filter( |
|
|
|
(r) => r.tn === table.tn || r.rtn === table.tn, |
|
|
|
(r) => r.tn === table.tn || r.rtn === table.tn, |
|
|
@ -386,6 +386,8 @@ export async function populateMeta( |
|
|
|
column.title = `${column.title}${c || ''}`; |
|
|
|
column.title = `${column.title}${c || ''}`; |
|
|
|
columnNames[column.title] = true; |
|
|
|
columnNames[column.title] = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger?.(`Populating meta for column '${column.title}'`); |
|
|
|
|
|
|
|
|
|
|
|
const rel = column.hm || column.bt; |
|
|
|
const rel = column.hm || column.bt; |
|
|
|
|
|
|
|
|
|
|
|
const rel_column_id = ( |
|
|
|
const rel_column_id = ( |
|
|
@ -429,8 +431,12 @@ export async function populateMeta( |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
console.log(e); |
|
|
|
console.log(e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger?.(`Populated meta for column '${column.title}'`); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger?.(`Populated meta for table '${table.title}'`); |
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -462,7 +468,6 @@ export async function populateMeta( |
|
|
|
info.viewsCount = views.length; |
|
|
|
info.viewsCount = views.length; |
|
|
|
|
|
|
|
|
|
|
|
const viewMetasInsert = views.map((table) => { |
|
|
|
const viewMetasInsert = views.map((table) => { |
|
|
|
logger?.(`Populating meta for view '${table.title}'`); |
|
|
|
|
|
|
|
return async () => { |
|
|
|
return async () => { |
|
|
|
const columns = ( |
|
|
|
const columns = ( |
|
|
|
await sqlClient.columnList({ |
|
|
|
await sqlClient.columnList({ |
|
|
@ -501,6 +506,8 @@ export async function populateMeta( |
|
|
|
uidt: getColumnUiType(source, column), |
|
|
|
uidt: getColumnUiType(source, column), |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger?.(`Populated meta for view '${table.title}'`); |
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|