Updating reverse function.
This commit is contained in:
parent
478e297e9e
commit
c16ad86142
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ class AliasTables {
|
||||||
return field
|
return field
|
||||||
}
|
}
|
||||||
|
|
||||||
reverse<T extends Row | Row[]>(tableNames: string[], rows: T): T {
|
reverse<T extends Row | Row[]>(rows: T): T {
|
||||||
const process = (row: Row) => {
|
const process = (row: Row) => {
|
||||||
const final: Row = {}
|
const final: Row = {}
|
||||||
for (let [key, value] of Object.entries(row)) {
|
for (let [key, value] of Object.entries(row)) {
|
||||||
|
@ -96,6 +96,6 @@ class AliasTables {
|
||||||
json.meta.tables = aliasedTables
|
json.meta.tables = aliasedTables
|
||||||
}
|
}
|
||||||
const response = await getDatasourceAndQuery(json)
|
const response = await getDatasourceAndQuery(json)
|
||||||
return this.reverse(tableNames, response)
|
return this.reverse(response)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue