js-core-data
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -20,2 +20,7 @@ ## Context | ||
var author = context.create('Author',{firstname: 'John', lastname: 'Doe'}); | ||
// alternatively you can upsert object | ||
// var data = {firstname: 'John', lastname: 'Doe'}; | ||
// context.getOrCreateObject('Author',{where:data},data).then(function(author) { | ||
// }); | ||
``` | ||
@@ -39,3 +44,3 @@ | ||
It's important to do cleanup memory. This is done by destroying context. When context is destroyed, no more changes could be done with it. | ||
It's important to cleanup memory. This is done by destroying context. When context is destroyed, no more changes could be done with it. | ||
@@ -42,0 +47,0 @@ ``` |
@@ -131,7 +131,3 @@ // Generated by CoffeeScript 1.10.0 | ||
} else { | ||
if (isFinite(value)) { | ||
predicates.push(new Predicate(key + ' ' + operator + ' %d', value)); | ||
} else { | ||
predicates.push(new Predicate(key + ' ' + operator + ' %s', value)); | ||
} | ||
predicates.push(new Predicate(key + ' ' + operator + ' %s', value)); | ||
} | ||
@@ -138,0 +134,0 @@ } else { |
{ | ||
"name": "js-core-data", | ||
"description": "ORM inspired by Apple's Objective-C CoreData", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -58,3 +58,3 @@ var assert = require("assert"), | ||
var predicate = new Predicate({'SELF.tags.key':['aa','bb'],'test':24,'minustest':-25,'minustest2':'-25',negativeBool:false,bool:true,'nullAttr':null,'nonnullAttr!':null,'lt<':10,'lte<=':15,'gt>':5,'gte>=':15,'notequal!':'aa','like?':'test*aa?','notLike!?':'test*aa?'}); | ||
assert.equal(predicate.toString(),"(SELF.tags.key IN ('aa','bb') AND SELF.test = 24 AND SELF.minustest = -25 AND SELF.minustest2 = -25 AND SELF.negativeBool = FALSE AND SELF.bool = TRUE AND SELF.nullAttr IS NULL AND SELF.nonnullAttr IS NOT NULL AND SELF.lt < 10 AND SELF.lte <= 15 AND SELF.gt > 5 AND SELF.gte >= 15 AND SELF.notequal <> 'aa' AND SELF.like LIKE 'test%aa_' AND SELF.notLike NOT LIKE 'test%aa_')"); | ||
assert.equal(predicate.toString(),"(SELF.tags.key IN ('aa','bb') AND SELF.test = 24 AND SELF.minustest = -25 AND SELF.minustest2 = '-25' AND SELF.negativeBool = FALSE AND SELF.bool = TRUE AND SELF.nullAttr IS NULL AND SELF.nonnullAttr IS NOT NULL AND SELF.lt < 10 AND SELF.lte <= 15 AND SELF.gt > 5 AND SELF.gte >= 15 AND SELF.notequal <> 'aa' AND SELF.like LIKE 'test%aa_' AND SELF.notLike NOT LIKE 'test%aa_')"); | ||
}); | ||
@@ -61,0 +61,0 @@ it('should correctly parse object condition with OR',function(){ |
Sorry, the diff of this file is not supported yet
525525
7674