Skip to content

Multiple ORs failing #387

Discussion options

You must be logged in to vote

The query is wrong as per your expectation. If in first query the condition fails and or condition satisfies then data is counted as valid.

You are writing -

if(roomid && redaction && is_transaction) or (member_type=join) or (member_type=leave) or member_type = invite

I hope this makes sense.

If you want to return data only when those three column satisfy then you need to use and query with member_type value also.

[
  {
    "room_id": "...",
    "redaction": false,
    "is_transaction": false,
    "member_type" :{"in":["join","leave","invite"]}
  },
]

Replies: 4 comments 14 replies

Comment options

You must be logged in to vote
3 replies
@JasminDreasond
Comment options

@JasminDreasond
Comment options

@JasminDreasond
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

@ujjwalguptaofficial
Comment options

@JasminDreasond
Comment options

@JasminDreasond
Comment options

@ujjwalguptaofficial
Comment options

@ujjwalguptaofficial
Comment options

Comment options

You must be logged in to vote
6 replies
@JasminDreasond
Comment options

@JasminDreasond
Comment options

@ujjwalguptaofficial
Comment options

Answer selected by JasminDreasond
@JasminDreasond
Comment options

@ujjwalguptaofficial
Comment options

@JasminDreasond
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants