bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Building Queries and Data Views

 Previous Next Contents Index View as PDF  

Comparison Operators

XQuery has operators that are specific to comparisons operations. The following operators are available:

eq

Returns true if Parameter1 is exactly equal to Parameter2.

Data Types

Notes

This is a comparison operator that you can use as a function to compare operands.

If either operand is a node, Liquid Data extracts its typed value first, then performs a type check to ensure that the type of one operand is promotable to the other type; otherwise Liquid Data generates an error.

If either operand is an empty list, the function returns an empty list.

XQuery Specification Compliance

Examples

 


ge

Returns true if Parameter1 is greater than or equal to Parameter2.

Data Types

Notes

This is a comparison operator that you can use as a function to compare operands.

If either operand is a node, Liquid Data extracts its typed value first, then performs a type check to ensure that the type of one operand is promotable to the other type; otherwise Liquid Data generates an error.

If either operand is an empty list, the function returns an empty list.

XQuery Specification Compliance

Examples

See the examples for "eq" operator (previous entry in this table).

 


gt

Returns true if Parameter1 is greater than Parameter2.

Data Types

Notes

This is a comparison operator that you can use as a function to compare operands.

If either operand is a node, Liquid Data extracts its typed value first, then performs a type check to ensure that the type of one operand is promotable to the other type; otherwise Liquid Data generates an error.

If either operand is an empty list, the function returns an empty list.

XQuery Specification Compliance

Liquid Data does not cast xs:anySimpleType to any other supported type.

Liquid Data does not support these data types: xs:yearMonthDuration, xs:dayTimeDuration, gregorian, xs:hexBinary, xs:base64Binary, xs:anyURI, xs:QName, or xs:NOTATION values.

Examples

See the examples for the "eq" operator (previous entry in this table).

 


le

Returns true if Parameter1 is less than or equal to Parameter2.

Data Types

Notes

This is a comparison operator that you can use as a function to compare operands.

If either operand is a node, Liquid Data extracts its typed value first, then performs a type check to ensure that the type of one operand is promotable to the other type; otherwise Liquid Data generates an error.

If either operand is an empty list, the function returns an empty list.

XQuery Specification Compliance

Liquid Data does not cast xs:anySimpleType to any other supported type.

Liquid Data does not support these data types: xs:yearMonthDuration, xs:dayTimeDuration, gregorian, xs:hexBinary, xs:base64Binary, xs:anyURI, xs:QName, or xs:NOTATION values.

Examples

See the examples for the "eq" operator (previous entry in this table).

 


lt

Returns true if Parameter1 is less than or equal to Parameter2.

Data Types

Notes

This is a comparison operator that you can use as a function to compare operands.

If either operand is a node, Liquid Data extracts its typed value first, then performs a type check to ensure that the type of one operand is promotable to the other type; otherwise Liquid Data generates an error.

If either operand is an empty list, the function returns an empty list.

XQuery Specification Compliance

Liquid Data does not cast xs:anySimpleType to any other supported type.

Liquid Data does not support these data types: xs:yearMonthDuration, xs:dayTimeDuration, gregorian, xs:hexBinary, xs:base64Binary, xs:anyURI, xs:QName, or xs:NOTATION values.

Examples

See the examples for the "eq" operator (previous entry in this table).

 


ne

The result is false if both values are false and true if at least one of the values is true. Parameter2 is not evaluated if Parameter1 evaluates to true.

Data Types

Notes

This is a boolean operator that you can use as a function to return a true or false result. It is not a standard XQuery operator, but necessary to complete certain comparative expressions in Liquid Data.

The arguments and return type are all boolean.

If either operand is a node, Liquid Data extracts its typed value first, then performs a type check to ensure that the type of one operand is promotable to the other type; otherwise Liquid Data generates an error.

If either operand is an empty list, the function returns an empty list.

XQuery Specification Compliance

Liquid Data does not support these data types: xs:yearMonthDuration, xs:dayTimeDuration, gregorian, xs:hexBinary, xs:base64Binary, xs:anyURI, xs:QName, or xs:NOTATION values.

Examples

See the examples for the "eq" operator (previous entry in this table).

 

Back to Top Previous Next