waterline-dirty
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -421,4 +421,12 @@ /*--------------------------------------------------------------- | ||
var matchString = criteria[key]; | ||
// Handle escaped percent (%) signs | ||
matchString = matchString.replace(/%%%/g, '%'); | ||
// Replace SQL % match notation with something the ECMA regex parser can handle | ||
matchString = matchString.replace(/[^%]%[^%]/g, '.*'); | ||
// Check that criterion attribute and is at least similar to the model's value for that attr | ||
if(!model[key] || !_.str.include(model[key],criteria[key])) { | ||
if(!model[key] || !model[key].match(matchString)) { | ||
return false; | ||
@@ -425,0 +433,0 @@ } |
{ | ||
"name": "waterline-dirty", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "Waterline adapter for felixge's node-dirty", | ||
@@ -5,0 +5,0 @@ "main": "DirtyAdapter.js", |
@@ -0,1 +1,3 @@ | ||
![image_squidhome@2x.png](http://i.imgur.com/RIvu9.png) | ||
# DirtyAdapter | ||
@@ -2,0 +4,0 @@ |
16181
376
22