persvr / rql

Resource Query Language
http://www.persvr.org/
267 stars 49 forks source link

persvr memory store and js-array query #27

Closed dmachi closed 11 years ago

dmachi commented 11 years ago

I was unable to get any rql ge()/gt() queries to work against the memory store. In debugging, I found that the queryToJS() in js-array messes up the comparison. I inserted

                    if (value instanceof Date){
                    return value.valueOf();
                }

above the return at:

https://github.com/persvr/rql/blob/master/js-array.js#L382

The queries I was sending looked like &ge(endDate,epoch:23413423)

If you don't see that I'm doing something incorrectly, could you please add this fix in and push a new version to npm?

kriszyp commented 11 years ago

Does that look right?

dmachi commented 11 years ago

Yep, thanks.