js-core-data
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -24,3 +24,3 @@ // Generated by CoffeeScript 1.10.0 | ||
columnFunctionRegExp = /([\w]+\()/g; | ||
columnFunctionRegExp = /([\w]+(\())|(\sAS\s\w+(\)))/g; | ||
@@ -96,3 +96,3 @@ operators = { | ||
if (key !== '$or' && key !== '$and') { | ||
cleanKey = key.replace(columnFunctionRegExp, '...(').replace(new RegExp(tableAlias + '(\\.[\\w_0-9]+)+', 'gi'), '...'); | ||
cleanKey = key.replace(columnFunctionRegExp, '!$2$4').replace(new RegExp(tableAlias + '(\\.[\\w_0-9]+)+', 'gi'), '!'); | ||
matches = cleanKey.match(columnNameRegExp); | ||
@@ -160,3 +160,3 @@ if (matches) { | ||
if (typeof this.format === 'object') { | ||
return this.parseObjectCondition(this.format) || 'TRUE'; | ||
return this.parseObjectCondition(this.format, void 0, tableAlias) || 'TRUE'; | ||
} | ||
@@ -163,0 +163,0 @@ format = this.format.replace(/[\s]*(!?=)[\s]*%@/g, '_id $1 %d').replace(/%s/g, '\'%s\'').replace(/%a/g, '%s').replace(/%d/g, '!%d!'); |
{ | ||
"name": "js-core-data", | ||
"description": "ORM inspired by Apple's Objective-C CoreData", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -9,3 +9,3 @@ var assert = require('assert'); | ||
var db = new CoreData(store_url,{logging:true}); | ||
var db = new CoreData(store_url,{logging:false}); | ||
@@ -50,3 +50,3 @@ before(function(done){ | ||
}, | ||
'SELF.company.name':'John\'s company' | ||
'CAST(SELF.company.name AS text)':'John\'s company' | ||
}, | ||
@@ -53,0 +53,0 @@ having:{ |
Sorry, the diff of this file is not supported yet
490406