Package org.basex.query.expr
Interface CmpPos
-
- All Known Implementing Classes:
IntPos
public interface CmpPos
Position checks.- Author:
- BaseX Team 2005-22, BSD License, Christian Gruen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
exact()
Checks if the minimum and maximum positions are identical.Expr
invert(CompileContext cc)
If possible, returns an optimized expression with inverted operands.int
test(long pos, QueryContext qc)
Checks the current position.
-
-
-
Method Detail
-
test
int test(long pos, QueryContext qc) throws QueryException
Checks the current position.- Returns
2
if the test is successful and remaining tests can be skipped - Returns
1
if the test is successful - Returns
0
otherwise
- Parameters:
pos
- current positionqc
- query context- Returns:
- result of check
- Throws:
QueryException
- query exception
- Returns
-
exact
boolean exact()
Checks if the minimum and maximum positions are identical.- Returns:
- result of check
-
invert
Expr invert(CompileContext cc) throws QueryException
If possible, returns an optimized expression with inverted operands.- Parameters:
cc
- compilation context- Returns:
- inverted expression or
null
- Throws:
QueryException
- query exception
-
-