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

Constraints/Restrictions not working for LiveQuery #92

Open
noaker opened this issue Dec 6, 2018 · 5 comments
Open

Constraints/Restrictions not working for LiveQuery #92

noaker opened this issue Dec 6, 2018 · 5 comments

Comments

@noaker
Copy link

noaker commented Dec 6, 2018

Although it is mentioned in link below that the follow constraints work for LiveQuery, it doesn't.

  1. whereLessThan, whereGreaterThan, whereLessThanOrEqualTo, whereGreaterThanOrEqualTo
    parseQuery.whereLessThan("key", value);

  2. 2 equalTo constraints on 2 different keys
    query.whereEqualTo("keyA", parseObject1);
    query.whereEqualTo("keyB", parseObject2);

Link: https://github.com/parse-community/parse-server/wiki/Parse-LiveQuery-Protocol-Specification#subscribe-message

@noaker noaker changed the title Constraints/Restrictions not working Constraints/Restrictions not working for LiveQuery Dec 6, 2018
@mmimeault
Copy link
Contributor

@flovilmart are they supposed to work? Were they added to live query server? Do we need to do something in the live query client to support those constraints? Thanks

@mmimeault
Copy link
Contributor

Same for #85
is whereNotEqualTo is suppose to work?

@noaker
Copy link
Author

noaker commented Dec 6, 2018

Quoted from the link

Right now we support $lt, $lte, $gt, $gte, $ne, $in, $nin, $exists, $all, $regex, $nearSphere, $within and normal equal condition. Any unsupported conditions will be ignored.

I am assuming lt = lessThan, lte = lessThanOrEqualTo, gt = greaterThan, etc.?

It would really be helpful if these were added. Also regarding whereNotEqualTo, it was answered that it's not part of the constraints supported so it will be ignored

@dplewis
Copy link
Member

dplewis commented Dec 6, 2018

Can you post logs VERBOSE=1?

Does live query works for you at all?

@noaker
Copy link
Author

noaker commented Dec 6, 2018

@dplewis there you go: (hope I am doing this right)

V/ParseLiveQueryClient: Socket onMessage {"op":"connected","clientId":"1cc04e96-4325-...omitted"}
V/ParseLiveQueryClient: Connected, sending pending subscription
V/ParseLiveQueryClient: Socket onMessage {"op":"subscribed","clientId":"1cc04e96-4325-...","requestId":1}

Some of the constraints work for me, such as a single "whereEqualTo(...);".

Also, it's pretty strange that while the LiveQuery does not consider some of the constraints specified, these constraints are applied to the "query" variable returned in the callback public void onEvent(ParseQuery<ParseObject> query, ParseObject object).

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

3 participants