coresmart / persistencejs

persistence.js is an asynchronous Javascript database mapper library. You can use it in the browser, as well on the server (and you can share data models between them).
http://persistencejs.org
1.73k stars 240 forks source link

Implemented LIKE operator with escape char for PropertyFilter #145

Open yeliu84 opened 10 years ago

yeliu84 commented 10 years ago

LIKE operator works fine with persistence.store.sql, but it hadn't been implemented in memory store. I added the implementation with an added parameter escapeChar to PropertyFilter constructor. I was using SQLite as my reference, so the implementation supports % and _ in the pattern, which is the same as in SQLite.