LineIfThenElse class
Line of query text with condition.
If bool cond
is true, then String when_true
will pasted into query.
Else String when_false
willpasted into query.
Sample:
Query([
Line('FOR doc in documents'),
LineIfThen(tag != null, 'FILTER doc.tags && POSITION( doc.tags, tag )'),
Line('SORT doc.datetime'),
LineIfThenElse(
without_content, 'return UNSET( doc, "content" )', 'return doc'),
...
])
- Inheritance
-
- Object
- QueryTextFragment
- LineIfThenElse
Constructors
- LineIfThenElse(bool cond, String whenTrue, String whenFalse)
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited