1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

fix: missing schema when queryng INFORMATION_SCHEMA

This commit is contained in:
2020-09-19 18:10:57 +02:00
parent 530907d097
commit 530d1bd43f
3 changed files with 9 additions and 2 deletions

View File

@ -92,7 +92,10 @@ export default {
if (resultsWithRows[index] && resultsWithRows[index].fields && resultsWithRows[index].fields.length) {
return resultsWithRows[index].fields.map(field => {
return { table: field.orgTable, schema: field.db };
return {
table: field.orgTable,
schema: field.db || 'INFORMATION_SCHEMA'
};
}).filter((val, i, arr) => arr.findIndex(el => el.schema === val.schema && el.table === val.table) === i);
}
return [];