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

What is wrong with predicate? #17

Open
j4nos opened this issue Feb 7, 2017 · 2 comments
Open

What is wrong with predicate? #17

j4nos opened this issue Feb 7, 2017 · 2 comments

Comments

@j4nos
Copy link

j4nos commented Feb 7, 2017

demand != null && demand.satisfied == false && gender == "male"

I have the following predicate, and app crashes. Why?

I guess constants are OK, based on this:
lexerGrammar.add("(\"[^\"\\\\\\r\\n]*(?:\\\\.[^\"\\\\\\r\\n]*)*\")|\\d+|true|false|null", TokenType.CONSTANT);

comparators too:

 lexerGrammar.add("\\(",     TokenType.OPEN_PAREN);
        lexerGrammar.add("\\)",     TokenType.CLOSE_PAREN);
        lexerGrammar.add("&&",      TokenType.AND);
        lexerGrammar.add("\\|\\|",  TokenType.OR);
        lexerGrammar.add("==",      TokenType.EQUAL);
        lexerGrammar.add("!=",      TokenType.NOT_EQUAL);
        lexerGrammar.add(">=",      TokenType.GREATER_THAN_OR_EQUAL);
        lexerGrammar.add("<=",      TokenType.LESS_THAN_OR_EQUAL);
        lexerGrammar.add(">",       TokenType.GREATER_THAN);
        lexerGrammar.add("<",       TokenType.LESS_THAN);
        lexerGrammar.add("(\"[^\"\\\\\\r\\n]*(?:\\\\.[^\"\\\\\\r\\n]*)*\")|\\d+|true|false|null",       TokenType.CONSTANT);
        lexerGrammar.add("[a-zA-Z][a-zA-Z0-9_]*",   TokenType.FIELD_NAME);
@dkharrat
Copy link
Owner

dkharrat commented Feb 9, 2017 via email

@j4nos
Copy link
Author

j4nos commented Feb 9, 2017

In Tokenize class I could debug the predicate. The problem is, that JOIN not allowed, and here in my case in demand.satisfied demand is a relationship name, satisfied is an attribute.

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