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

Building Queries and Data Views

 Previous Next Contents Index View as PDF  

Type Casting Reference

This section provides details on how Data View Builder implements data type transformation for automatic type casting. The following topics are included:

When you request Automatic Type Casting, Liquid Data can reassign a data type if the data type of the source node does not match the data type of the mapped target node but the data types are compatible. Use the information in the following sections to predict the automatic type casting behavior when this occurs.

Note: For information on how to set the option for automatic type casting in the Data View Builder, see Using Automatic Type Casting.

Type Casting to a Numeric Target

The following table shows whether Liquid Data transforms a source node data type to the numeric data type of the target node.

Target:
xs:byte

Target:
xs:short

Target:
xs:int

Target:
xs:long

Target:
xs:integer

Target:
xs:decimal

Target:
xs:float

Target:
xs:double

xs:byte

N

Y

Y

Y

Y

Y

Y

Y

xs:short

Y

N

Y

Y

Y

Y

Y

Y

xs:int

Y

Y

N

Y

Y

Y

Y

Y

xs:long

Y

Y

Y

N

Y

Y

Y

Y

xs:integer

Y

Y

Y

Y

N

Y

Y

Y

xs:decimal

Y

Y

Y

Y

Y

N

Y

Y

xs:float

Y

Y

Y

Y

Y

Y

N

Y

xs:double

Y

Y

Y

Y

Y

Y

Y

N

xs:string

Y

Y

Y

Y

Y

Y

Y

Y

xs:boolean

Y

Y

Y

Y

Y

Y

Y

Y

xs:date

N

N

N

N

N

N

N

N

xs:time

N

N

N

N

N

N

N

N

xs:dateTime

N

N

N

N

N

N

N

N

xsext:anyValue
xsext:anyType
xsext:item

Y

Y

Y

Y

Y

Y

Y

Y


 

Type Casting to a Non-Numeric Target

The following table shows whether Liquid Data transforms a source node data type to the non-numeric data type of the target node.

Target:
xs:byte

Target:
xs:boolean

Target:
xs:date

Target:
xs:time

Target:
xs:dateTime

Target:
xsext:anyValue
xsext:anyType
xsext:item

xs:byte

Y

Y

N

N

N

N

xs:short

Y

Y

N

N

N

N

xs:int

Y

Y

N

N

N

N

xs:long

Y

Y

N

N

N

N

xs:integer

Y

Y

N

N

N

N

xs:decimal

Y

Y

N

N

N

N

xs:float

Y

Y

N

N

N

N

xs:double

Y

Y

N

N

N

N

xs:string

N

Y

Y

Y

Y

N

xs:boolean

Y

N

N

N

N

N

xs:date

Y

N

N

N

N

N

xs:time

Y

N

N

N

N

N

xs:dateTime

Y

N

Y (see note)

Y (see note)

N

N

xsext:anyValue
xsext:anyType
xsext:item

Y

Y

Y

Y

Y

N


 

Note: The type cast from xs:dateTime to xs:date and xs:time uses xfext:date-from-dateTime() and xfext:time-from-dateTime.

Type Casting Function Parameters

In some cases, Liquid Data can transform the data type for a function parameter when a mismatch occurs.

Target:
xs:byte

Target:
xs:short

Target:
xs:int

Target:
xs:long

Target:
xs:integer

Target:
xs:decimal

Target:
xs:float

Target:
xs:double

xs:byte

N

N

N

N

N

N

N

N

xs:short

Y

N

N

N

N

N

N

N

xs:int

Y

Y

N

N

N

N

N

N

xs:long

Y

Y

Y

N

N

N

N

N

xs:integer

Y

Y

Y

Y

N

N

N

N

xs:decimal

Y

Y

Y

Y

Y

N

N

N

xs:float

Y

Y

Y

Y

Y

Y

N

N

xs:double

Y

Y

Y

Y

Y

Y

Y

N


 

 

Back to Top Previous Next