Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression error with options in 0.8-3 #3

Open
wglasshusain opened this issue Nov 23, 2014 · 2 comments
Open

regression error with options in 0.8-3 #3

wglasshusain opened this issue Nov 23, 2014 · 2 comments

Comments

@wglasshusain
Copy link
Contributor

Hi,

The most recent commit (2fd4f65) with version 0.8-3 introduced a regression error.

Specifically, my code (run api, run.lua) does

local q = require 'lusty-store.query'()
...
local count = store.options(q)

After upgrading fro 0.8-2 to 0.8-3, the count is now always the entire set of records. (it ignores the options). I tested this with a queries that included either q[field].eq or q.field[is]

I tracked this down to the specific line in colmt.lua

-      query = next(query) and query or nil
+      query = query and next(query) or nil

Reverting just this line made the options work properly

@wglasshusain
Copy link
Contributor Author

Note -- reverting causes other problems. I added a pull request which fixes this plus keeps other tests passing.

@DorianGray
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants