Scalar Functions
The CData Virtuality Server provides several types of built-in scalar functions for different operations. They are listed here in alphabetical order:
Aggregate functions which take sets of values from a group and return a single scalar value computed from the group
Array functions are used for different operations with arrays
Choice functions provide a way to select from two values
Date and time functions return or operate on dates, times, or timestamps
JSON functions provide functionality for working with JSON data
Numeric functions take numeric values or sometimes strings as input and return numeric values
Security functions provide the ability to interact with the security system
String functions generally take strings as inputs and return strings as outputs
System functions provide access to information in the CData Virtuality Server system via a query
Type conversion functions allow converting between data types within a query
Window functions which are similar to aggregate functions, but requires the use of an
OVER
clause or window specification.XML functions provide functionality for working with XML data
The supported build-in functions and function parameters can be found in SYS.Functions and SYS.FunctionParams tables.
Function Determinism
A special feature of scalar functions in the CData Virtuality Server is that they can have different degrees of determinism; this is important because the function's determinism level dictates when the function is evaluated and to what extent the result can be cached. In the CData Virtuality Server, there are five levels of function determinism:
Level | Description | Functions |
---|---|---|
Deterministic |
| All except listed below |
User Deterministic |
|
|
Session Deterministic |
|
|
Command Deterministic |
|
|
Nondeterministic |
|
|