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

Building Queries and Data Views

 Previous Next Contents Index View as PDF  

Constructor Functions

Constructor functions process a source value as the argument. Every data element or variable has a data type. The data type determines the value that any function parameter can contain and the operations that can be performed on it. The Liquid Data supports the following type casting functions. The following constructor functions are available:

xf:boolean-from-string

Returns a boolean value of true or false from the string source value.

Data Types

Notes

If the input parameter is empty, the function returns an empty list. Otherwise, Liquid Data generates an error.

XQuery Specification Compliance

Examples

 


xf:byte

Constructs a byte integer value from the string source value.

Data Types

Notes

An error occurs if the source value is greater than 127 or less than -128.

Liquid Data truncates the input if it is a non-integer number.

If the number falls outside of the range of byte values, the number wraps.

If the number is an integer that falls within the range, the value is unchanged.

If the input is a string, Liquid Data tries to parse it into a byte value.

If the input is the boolean value true, the function returns 1. If it is false, it returns 0.

XQuery Specification Compliance

Examples

 


xf:decimal

Constructs a decimal value from the source value.

Data Types

XQuery Specification Compliance

Examples

 


xf:double

Constructs a double precision value from the source value.

Data Types

XQuery Specification Compliance

Examples

 


xf:float

Constructs a floating point value from the source value.

Data Types

XQuery Specification Compliance

Examples

 


xf:int

Constructs an integer value from the source value. The largest integer value is limited to a 32-bit expression.

Data Types

Notes

An error occurs if the source value is greater than 2,147,483,647 or less than -2,147,483,648. To the Liquid Data Server, the xf:int function is exactly the same as the xf:integer function.

XQuery Specification Compliance

Examples

 


xf:integer

Constructs an integer value from the source value. The largest integer value is limited to a 32-bit expression.

Data Types

Notes

An error occurs if the source value is greater than 2,147,483,647 or less than -2,147,483,648. To the Liquid Data Server, the xf:integer function is exactly the same as the xf:int function.

XQuery Specification Compliance

Examples

 


xf:long

Constructs a four-byte integer value from the source value. Use a long integer data type when the value exceeds the limitations imposed by other integer data types.

Data Types

Notes

An error occurs if the source value is greater than 9,223,372,036,854,775,807 or less than -9,223,372,036,854,775,808.

XQuery Specification Compliance

Examples

 


xf:short

Constructs a two-byte integer value from the source value. The largest short integer value is limited to a 16-bit expression.

Data Types

Notes

An error occurs if the source value is greater than 32,767 or less than -32,768.

XQuery Specification Compliance

Examples

 


xf:string

Constructs a string value from the source value. The source value can be a sequence, a node of any kind, or a simple value.

Data Types

Notes

Liquid Data accepts any simple value, but supports no other accessor types, such as a sequence or other type of node.

XQuery Specification Compliance

Examples

 

Back to Top Previous Next