-
Notifications
You must be signed in to change notification settings - Fork 1.9k
-
I wanna do this:
from Call c, Expr guard
where
exists(Expr e|
guard = callCheck(e, 0) and
DataFlow::localFlow(DataFlow::exprNode(c), DataFlow::exprNode(e))
) and true
select guard.getLocation(), guard.toString()
I've searched the document but can't find a term means logic true.
Current code has such error, and I totally understand why I have this error:
ERROR: Expected a term but found an expression instead
I want to know how to do a search like XXX and true
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 2 replies
-
I need the true because I'm trying to automatically generate queries.
Beta Was this translation helpful? Give feedback.
All reactions
-
Try any().
Beta Was this translation helpful? Give feedback.
All reactions
-
Try
any().
Well currently I'm using an ugly 1=1.
Beta Was this translation helpful? Give feedback.
All reactions
-
1=1 works indeed, but best use any() as @intrigus-lgtm suggested. The opposite of any() is none() in case you need to generate a sequence of or terms.
Beta Was this translation helpful? Give feedback.