Comparing version 0.1.10 to 0.1.11
@@ -293,6 +293,6 @@ import { | ||
me.left_key = me.left_key || 'id'; | ||
me.where_key = '_#_xtable_#_.' + (me.left_xkey || singular(left.table) + '_id'); | ||
me.where_key = 'xx_table.' + (me.left_xkey || singular(left.table) + '_id'); | ||
var xtable = me.xtable || (left.table + '_' + me.table); | ||
me.xjoin = SQL `INNER JOIN ${TB(xtable)} AS ${TB('_#_xtable_#_')} on ${EQ({ | ||
['_#_xtable_#_.' + (me.xkey || singular(me.table) + '_id')]: COLUMN(me.as + '.' + (me.key || 'id')) | ||
me.xjoin = SQL `INNER JOIN ${TB(xtable)} AS ${TB('xx_table')} on ${EQ({ | ||
['xx_table.' + (me.xkey || singular(me.table) + '_id')]: COLUMN(me.as + '.' + (me.key || 'id')) | ||
})}`; | ||
@@ -322,3 +322,4 @@ } | ||
const colums = uniq(add_column(me).originals.concat(me.as +'.'+me.where_key + (me.rel_type == 'x' ? ` AS ${fold_key}` : ''))); | ||
const colums = uniq(add_column(me).originals.concat( | ||
me.rel_type != 'x' ? me.as + '.' + me.where_key : me.where_key + ' AS ' + fold_key)); | ||
@@ -325,0 +326,0 @@ const in_vals = filter(a => a != null, pluck(me.left_key, lefts)); |
{ | ||
"name": "mql2", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "query builder", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34224
617