joinQuery+=" LEFT OUTER JOIN "+this.quoteIdentifier(tableJunction)+" ON "+this.quoteIdentifier(tableSource)+"."+this.quoteIdentifier(attrSource)+" = "+this.quoteIdentifier(tableJunction)+"."+this.quoteIdentifier(identSource)
joinQuery+=" LEFT OUTER JOIN "+this.quoteIdentifier(tableJunction)+" ON "+this.quoteIdentifier(tableSource)+"."+this.quoteIdentifier(attrSource)+" = "+this.quoteIdentifier(tableJunction)+"."+this.quoteIdentifier(identSource)
joinQuery+=" LEFT OUTER JOIN "+this.quoteIdentifier(table)+" AS "+this.quoteIdentifier(as)+" ON "+this.quoteIdentifier(tableTarget)+"."+this.quoteIdentifier(attrTarget)+" = "+this.quoteIdentifier(tableJunction)+"."+this.quoteIdentifier(identTarget)
joinQuery+=" LEFT OUTER JOIN "+this.quoteIdentifier(table)+" AS "+this.quoteIdentifier(as)+" ON "+this.quoteIdentifier(tableTarget)+"."+this.quoteIdentifier(attrTarget)+" = "+this.quoteIdentifier(tableJunction)+"."+this.quoteIdentifier(identTarget)
}
}
}.bind(this))
}.bind(this))
options.attributes=optAttributes.join(', ')
options.attributes=optAttributes.join(', ')
}
}
varquery="SELECT "+options.attributes+" FROM "+options.table