parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

Postgres doesn't support this query type yet {"$nin":[]}

Open repertory opened this issue 8 years ago • 9 comments

Issue Description

request:

users: RELATION <_USER> and this relation has no rows

where: {users: {$exists: false, $ne: {__type: "Pointer", className: "_User", objectId: "hXqhAUjRz2"}}}

response:

{"code":119,"error":"Postgres doesn't support this query type yet {\"$nin\":[]}"}

repertory avatar Apr 16 '18 09:04 repertory

Can you get the logs when running with VERBOSE=1?

Or provide a query?

dplewis avatar May 03 '18 00:05 dplewis

I have switched to mongo

repertory avatar May 12 '18 01:05 repertory

@repertory Sorry we took so long. Thank you for using parse. If you want to help with the issue you opened that would be great, in case anybody else would run into the issue.

dplewis avatar May 16 '18 01:05 dplewis

Hoping we can get this re-opened. If someone can direct me in the right direction on this, I can try and take a look

CoderickLamar avatar Nov 09 '18 19:11 CoderickLamar

@CoderickLamar There isn't enough info in the original post and no logs posted. Can't reproduce and this issue may have already been fixes.

dplewis avatar Nov 09 '18 19:11 dplewis

We're experiencing the same issue on our end. Let me see if I can grab more details and update this post with our info

CoderickLamar avatar Nov 09 '18 19:11 CoderickLamar

@CoderickLamar Are you still having this issue?

dplewis avatar Nov 14 '18 15:11 dplewis

I also have this issue. It works fine when the array is not empty, but when the array is empty it causes the issue.

the query that I used:

const testQuery = new Parse.Query('testTable');
  testQuery.notContainedIn('value', []);
  testQuery.find().then((testObj) => {
    console.log(testObj);
  });

and the error message :

debug: PG: find testTable { value: { '$nin': [] }, _rperm: { '$in': [ null, '*' ] } } skip=undefined, limit=100, , keys=undefined
error: Error generating response. ParseError {
  code: 119,
  message: 'Postgres doesn\'t support this query type yet {"$nin":[]}' } code=119, message=Postgres doesn't support this query type yet {"$nin":[]}
error: Postgres doesn't support this query type yet {"$nin":[]} code=119, message=Postgres doesn't support this query type yet {"$nin":[]}

jwenBai avatar Dec 19 '18 22:12 jwenBai

Make sure that { '$nin': [] } array should not empty

vijay259 avatar Sep 03 '20 09:09 vijay259