Comparing version 0.2.3 to 0.2.4
{ | ||
"name": "rdb", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "title": "rdb", |
@@ -23,3 +23,3 @@ __rdb__ | ||
[tryGetFirst eagerly](#trygetfirst-eagerly) | ||
[toJSON](#tjson) | ||
[toJSON](#tojson) | ||
[toJSON with strategy](#tojson-with-strategy) | ||
@@ -29,3 +29,3 @@ [getMany](#getmany) | ||
[getMany eagerly](#getmany-eagerly) | ||
[(manyTo)JSON](#manytojson) | ||
[(many)ToJSON](#manytojson) | ||
[(many)ToJSON with strategy](#manytojson-with-strategy) | ||
@@ -2125,2 +2125,4 @@ | ||
Reformatted documentation. No code changes. | ||
__0.2.4__ | ||
Bugfix: getMany with many-strategy and shallowFilter yields incorrect query #6. | ||
@@ -2127,0 +2129,0 @@ [0]:https://npmjs.org/package/rdb-demo |
@@ -9,4 +9,4 @@ var newSingleQuery = require('./query/newSingleQuery'); | ||
queries.push(singleQuery); | ||
filter = filter.prepend(innerJoin); | ||
addSubQueries(queries,table,filter,span,alias); | ||
//filter = filter.prepend(innerJoin); | ||
addSubQueries(queries,table,filter,span,alias,innerJoin); | ||
return queries; | ||
@@ -13,0 +13,0 @@ } |
var manyLegToQuery = _manyLegToQuery; | ||
function addSubQueries(queries,table,filter,span,alias) { | ||
function addSubQueries(queries,table,filter,span,alias,innerJoin) { | ||
var c = {}; | ||
@@ -9,3 +9,3 @@ var _legNo; | ||
c.visitMany = function(leg) { | ||
manyLegToQuery(queries, alias,leg,_legNo,filter); | ||
manyLegToQuery(queries, alias,leg,_legNo,filter,innerJoin); | ||
}; | ||
@@ -12,0 +12,0 @@ |
var newShallowJoinSql = require('../singleQuery/joinSql/newShallowJoinSql'); | ||
var newQuery = require('../../newQuery'); | ||
var newParameterized = require('../newParameterized'); | ||
var emptyFilter; | ||
function manyLegToQuery(queries, rightAlias,leg,legNo,innerJoin) { | ||
function manyLegToQuery(queries, rightAlias,leg,legNo,filter, innerJoin) { | ||
var leftAlias = rightAlias + '_' + legNo; | ||
@@ -13,6 +14,6 @@ var span = leg.span; | ||
var shallowJoin = newShallowJoinSql(rightTable,leftColumns,rightColumns,leftAlias,rightAlias); | ||
innerJoin = innerJoin.prepend(' INNER' + shallowJoin); | ||
newQuery(queries, span.table,emptyFilter,span,leftAlias,innerJoin); | ||
var innerJoin = newParameterized(' INNER' + shallowJoin).append(innerJoin); | ||
newQuery(queries, span.table,filter,span,leftAlias,innerJoin); | ||
} | ||
module.exports = manyLegToQuery; |
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
375440
984
9822
2209