Browse Source

Fix : handle ignore tables in xjoin api

pull/13/head
oof1lab 7 years ago
parent
commit
85346e0b2e
  1. 6
      lib/xapi.js

6
lib/xapi.js

@ -410,7 +410,7 @@ class Xapi {
// eg: tbl.tableName
let tableNameAndAs = joinTables[index + 1].split('.')
if (tableNameAndAs.length === 2) {
if (tableNameAndAs.length === 2 && !(tableNameAndAs[1] in this.config.ignoreTables)) {
queryParamsObj.params.push(tableNameAndAs[1])
queryParamsObj.params.push(tableNameAndAs[0])
} else {
@ -434,7 +434,7 @@ class Xapi {
queryParamsObj.query += ' ?? as ?? '
let tableNameAndAs = joinTables[index].split('.')
if (tableNameAndAs.length === 2) {
if (tableNameAndAs.length === 2 && !(tableNameAndAs[1] in this.config.ignoreTables)) {
queryParamsObj.params.push(tableNameAndAs[1])
queryParamsObj.params.push(tableNameAndAs[0])
} else {
@ -444,7 +444,7 @@ class Xapi {
tableNameAndAs = []
tableNameAndAs = joinTables[index + 2].split('.')
if (tableNameAndAs.length === 2) {
if (tableNameAndAs.length === 2 && !(tableNameAndAs[1] in this.config.ignoreTables)) {
queryParamsObj.params.push(tableNameAndAs[1])
queryParamsObj.params.push(tableNameAndAs[0])
} else {

Loading…
Cancel
Save