Comparing version 0.2.4 to 0.2.5
{ | ||
"name": "rdb", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "title": "rdb", |
@@ -2125,2 +2125,5 @@ __rdb__ | ||
Bugfix: getMany with many-strategy and shallowFilter yields incorrect query #6. | ||
__0.2.5__ | ||
Bugfix: caching on composite keys could give a crash #7. | ||
Improved sql compression on insert/update. | ||
@@ -2127,0 +2130,0 @@ [0]:https://npmjs.org/package/rdb-demo |
@@ -26,3 +26,3 @@ var newInsertCommandCore = require('./newInsertCommandCore'); | ||
c.matches = function(otherRow) { | ||
return false; | ||
return row == otherRow; | ||
}; | ||
@@ -29,0 +29,0 @@ |
@@ -8,3 +8,2 @@ var when = require('a').when; | ||
.it('should set sql').assertEqual(c.sql, c.sut.sql()) | ||
.it('matches returns false').assertEqual(false, c.sut.matches('whatEver')) | ||
; |
@@ -10,3 +10,2 @@ var newEmitEvent = require('../emitEvent'); | ||
c.contents = cache; | ||
c.tryGet = function(key) { | ||
@@ -86,3 +85,3 @@ var index = 0; | ||
else | ||
getAllCore(value, ++index); | ||
getAllCore(value, index+1); | ||
}; | ||
@@ -89,0 +88,0 @@ }; |
@@ -9,3 +9,2 @@ var newSingleQuery = require('./query/newSingleQuery'); | ||
queries.push(singleQuery); | ||
//filter = filter.prepend(innerJoin); | ||
addSubQueries(queries,table,filter,span,alias,innerJoin); | ||
@@ -12,0 +11,0 @@ return queries; |
@@ -16,5 +16,3 @@ var requireMock = require('a').requireMock; | ||
var innerJoin = {}; | ||
var filterWithInnerJoin = {}; | ||
function act(c) { | ||
@@ -27,7 +25,5 @@ c.queries = {}; | ||
filter.prepend = mock(); | ||
filter.prepend.expect(innerJoin).return(filterWithInnerJoin) | ||
extractFilter.expect(initialFilter).return(filter); | ||
newSingleQuery.expect(table,filter,span,alias,innerJoin).return(singleQuery); | ||
addSubQueries.expect(c.queries,table,filterWithInnerJoin,span,alias).return(expected); | ||
addSubQueries.expect(c.queries,table,filter,span,alias,innerJoin).return(expected); | ||
c.returned = require('../newQuery')(c.queries,table,initialFilter,span,alias,innerJoin); | ||
@@ -34,0 +30,0 @@ } |
@@ -9,3 +9,4 @@ var a = require('a'); | ||
c.newQuery = requireMock('../../newQuery'); | ||
c.newParameterized = requireMock('../newParameterized'); | ||
c.sut = require('../manyLegToQuery'); | ||
} |
@@ -15,3 +15,4 @@ var parentAlias = '_1', | ||
queries = {}, | ||
emptyFilter; | ||
parameterized = {}, | ||
filter = {}; | ||
@@ -24,7 +25,10 @@ function act(c) { | ||
leg.table = table | ||
innerJoin.prepend = c.mock(); | ||
innerJoin.prepend.expect(' INNER shallowJoin').return(nextInnerJoin); | ||
c.newParameterized.expect(' INNER shallowJoin').return(parameterized); | ||
parameterized.append = c.mock(); | ||
parameterized.append.expect(innerJoin).return(nextInnerJoin); | ||
c.newShallowJoinSql.expect(table,legColumns,primaryColumns,alias,parentAlias).return(shallowJoin); | ||
c.newQuery.expect(queries, childTable,emptyFilter,span,alias,nextInnerJoin); | ||
c.sut(queries, parentAlias,leg,legNo,innerJoin); | ||
c.newQuery.expect(queries, childTable,filter,span,alias,nextInnerJoin); | ||
c.sut(queries, parentAlias,leg,legNo,filter, innerJoin); | ||
} | ||
@@ -31,0 +35,0 @@ |
@@ -13,2 +13,3 @@ var a = require('a'), | ||
oneLeg = {}, | ||
innerJoin = {}, | ||
manyLegQuery = {}, | ||
@@ -24,4 +25,4 @@ joinLegNo = {}, | ||
c.manyLegToQuery = requireMock('./addSubQueries/manyLegToQuery'); | ||
c.manyLegToQuery.expect(queries, alias,manyLeg,manyLegNo,filter).return(manyLegQuery); | ||
c.sut(queries,table,filter,span,alias); | ||
c.manyLegToQuery.expect(queries, alias,manyLeg,manyLegNo,filter,innerJoin).return(manyLegQuery); | ||
c.sut(queries,table,filter,span,alias,innerJoin); | ||
} | ||
@@ -28,0 +29,0 @@ |
function act(c) { | ||
c.expected = 'select _0.oOrderId,_0.oCustomerId from order _0 where _0.discriminatorColumn=\'foo\' AND _0.discriminatorColumn2=\'baz\''; | ||
@@ -3,0 +4,0 @@ c.expected2 = 'select _0_0.lId,_0_0.lLineNo,_0_0.lOrderId from orderLine _0_0 ' + |
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
375866
988
9834
2212