public class Conversions extends Object
ScalarValuedFunction
,
DeriveFields
Modifier and Type | Method and Description |
---|---|
static ScalarValuedFunction |
asBoolean(ScalarValuedFunction expr,
int truth,
int falsity)
Convert an int typed field into a boolean type.
|
static ScalarValuedFunction |
asBoolean(String field)
Convert an int typed field into a boolean type.
|
static ScalarValuedFunction |
asBoolean(String field,
int truth,
int falsity)
Convert an int typed field into a boolean type.
|
static ScalarValuedFunction |
asDate(ScalarValuedFunction expr)
Convert a timestamp expression result into a date field.
|
static ScalarValuedFunction |
asDate(String field)
Convert a timestamp typed field into a date field.
|
static ScalarValuedFunction |
asDouble(ScalarValuedFunction expr)
Convert a numeric typed expression into a double type.
|
static ScalarValuedFunction |
asDouble(String field)
Convert a numeric typed field into a double type.
|
static ScalarValuedFunction |
asFloat(ScalarValuedFunction expr)
Convert a numeric typed expression into a float type.
|
static ScalarValuedFunction |
asFloat(String field)
Convert a numeric typed field into a float type.
|
static ScalarValuedFunction |
asInt(ScalarValuedFunction expr)
Convert a numeric typed expression into an integer type.
|
static ScalarValuedFunction |
asInt(String field)
Convert a numeric typed field into an integer type.
|
static ScalarValuedFunction |
asLong(ScalarValuedFunction expr)
Convert a numeric typed expression into a long type.
|
static ScalarValuedFunction |
asLong(String field)
Convert a numeric typed field into a long type.
|
static ScalarValuedFunction |
asMoney(ScalarValuedFunction expr)
Convert a numeric typed expression into a money type.
|
static ScalarValuedFunction |
asMoney(String field)
Convert a numeric typed field into a money type.
|
static ScalarValuedFunction |
asNumeric(ScalarValuedFunction expr)
Convert a numeric typed expression into a numeric type.
|
static ScalarValuedFunction |
asNumeric(String field)
Convert a numeric typed field into a numeric type.
|
static ScalarValuedFunction |
asTime(ScalarValuedFunction expr)
Convert a timestamp expression result into a time field.
|
static ScalarValuedFunction |
asTime(String field)
Convert a timestamp typed field into a time field.
|
static ScalarValuedFunction |
toBinary(ScalarValuedFunction expr)
Convert a string typed expression into a binary type.
|
static ScalarValuedFunction |
toBinary(String fieldName)
Convert a string typed field into a binary type.
|
static ScalarValuedFunction |
toBoolean(ScalarValuedFunction expr,
String truth,
String falsity)
Convert a string typed expression into a boolean type.
|
static ScalarValuedFunction |
toBoolean(ScalarValuedFunction expr,
TruthValues mapping)
Convert a string typed expression into a boolean type.
|
static ScalarValuedFunction |
toBoolean(String field,
String truth,
String falsity)
Convert a string typed field into a boolean type.
|
static ScalarValuedFunction |
toBoolean(String field,
TruthValues mapping)
Convert a string typed field into a boolean type.
|
static ScalarValuedFunction |
toChar(ScalarValuedFunction expr)
Convert a string typed expression into a char type.
|
static ScalarValuedFunction |
toChar(String fieldName)
Convert a string typed field into a char type.
|
static ScalarValuedFunction |
toDate(ScalarValuedFunction expr)
Convert a string typed expression into a date type.
|
static ScalarValuedFunction |
toDate(ScalarValuedFunction expr,
DateTimeFormatting format)
Convert a string typed expression into a date type using the given format.
|
static ScalarValuedFunction |
toDate(String field)
Convert a string typed field into a date type.
|
static ScalarValuedFunction |
toDate(String field,
DateTimeFormatting format)
Convert a string typed field into a date type using the given format.
|
static ScalarValuedFunction |
toDate(String field,
String format)
Convert a string typed field into a date type using the given format.
|
static ScalarValuedFunction |
toDouble(ScalarValuedFunction expr)
Convert a string typed expression into a double type.
|
static ScalarValuedFunction |
toDouble(ScalarValuedFunction expr,
NumberFormat format)
Convert a string typed expression into a double type using the given format.
|
static ScalarValuedFunction |
toDouble(String field)
Convert a string typed field into a double type.
|
static ScalarValuedFunction |
toDouble(String field,
NumberFormat format)
Convert a string typed field into a double type using the given format.
|
static ScalarValuedFunction |
toDouble(String field,
String format)
Convert a string typed field into a double type using the given format.
|
static ScalarValuedFunction |
toFloat(ScalarValuedFunction expr)
Convert a string typed expression into a float type.
|
static ScalarValuedFunction |
toFloat(ScalarValuedFunction expr,
NumberFormat format)
Convert a string typed expression into a float type using the given format.
|
static ScalarValuedFunction |
toFloat(String field)
Convert a string typed field into a float type.
|
static ScalarValuedFunction |
toFloat(String field,
NumberFormat format)
Convert a string typed field into a float type using the given format.
|
static ScalarValuedFunction |
toFloat(String field,
String format)
Convert a string typed field into a float type using the given format.
|
static ScalarValuedFunction |
toInt(ScalarValuedFunction expr)
Convert a string typed expression into a integer type.
|
static ScalarValuedFunction |
toInt(ScalarValuedFunction expr,
NumberFormat format)
Convert a string typed expression into a integer type using the given format.
|
static ScalarValuedFunction |
toInt(String field)
Convert a string typed field into a integer type.
|
static ScalarValuedFunction |
toInt(String field,
NumberFormat format)
Convert a string typed field into a integer type using the given format.
|
static ScalarValuedFunction |
toInt(String field,
String format)
Convert a string typed field into a integer type using the given format.
|
static ScalarValuedFunction |
toLong(ScalarValuedFunction expr)
Convert a string typed expression into a long type.
|
static ScalarValuedFunction |
toLong(ScalarValuedFunction expr,
NumberFormat format)
Convert a string typed expression into a long type using the given format.
|
static ScalarValuedFunction |
toLong(String field)
Convert a string typed field into a long type.
|
static ScalarValuedFunction |
toLong(String field,
NumberFormat format)
Convert a string typed field into a long type using the given format.
|
static ScalarValuedFunction |
toLong(String field,
String format)
Convert a string typed field into a long type using the given format.
|
static ScalarValuedFunction |
toMoney(ScalarValuedFunction expr)
Convert a string typed expression into a money type.
|
static ScalarValuedFunction |
toMoney(ScalarValuedFunction expr,
NumberFormat format)
Convert a string typed expression into a money type using the given format.
|
static ScalarValuedFunction |
toMoney(String field)
Convert a string typed field into a money type.
|
static ScalarValuedFunction |
toMoney(String field,
NumberFormat format)
Convert a string typed field into a money type using the given format.
|
static ScalarValuedFunction |
toMoney(String field,
String format)
Convert a string typed field into a money type using the given format.
|
static ScalarValuedFunction |
toNumeric(ScalarValuedFunction expr)
Convert a string typed expression into a numeric type.
|
static ScalarValuedFunction |
toNumeric(ScalarValuedFunction expr,
NumberFormat format)
Convert a string typed expression into a numeric type using the given format.
|
static ScalarValuedFunction |
toNumeric(String field)
Convert a string typed field into a numeric type.
|
static ScalarValuedFunction |
toNumeric(String field,
NumberFormat format)
Convert a string typed field into a numeric type using the given format.
|
static ScalarValuedFunction |
toNumeric(String field,
String format)
Convert a string typed field into a numeric type using the given format.
|
static ScalarValuedFunction |
toString(ScalarValuedFunction expr)
Convert the value of an expression into a string value.
|
static ScalarValuedFunction |
toString(String field)
Convert a scalar type field into a string value.
|
static ScalarValuedFunction |
toText(ScalarValuedFunction expr,
Format formatter)
Convert the value of an expression into text using the given format.
|
static ScalarValuedFunction |
toText(ScalarValuedFunction expr,
String format)
Convert the value of an expression into text using the given format.
|
static ScalarValuedFunction |
toText(String field,
Format formatter)
Convert a scalar type field into text using the given format.
|
static ScalarValuedFunction |
toText(String field,
String format)
Convert a scalar type field into text using the given format.
|
static ScalarValuedFunction |
toTime(ScalarValuedFunction expr)
Convert a string typed expression into a time type.
|
static ScalarValuedFunction |
toTime(ScalarValuedFunction expr,
DateTimeFormatting format)
Convert a string typed expression into a time type using the given format.
|
static ScalarValuedFunction |
toTime(String field)
Convert a string typed field into a time type.
|
static ScalarValuedFunction |
toTime(String field,
DateTimeFormatting format)
Convert a string typed field into a time type using the given format.
|
static ScalarValuedFunction |
toTime(String field,
String format)
Convert a string typed field into a time type using the given format.
|
static ScalarValuedFunction |
toTimestamp(ScalarValuedFunction expr)
Convert a string typed expression into a timestamp type.
|
static ScalarValuedFunction |
toTimestamp(ScalarValuedFunction expr,
DateTimeFormatting format)
Convert a string typed expression into a timestamp type using the given format.
|
static ScalarValuedFunction |
toTimestamp(String field)
Convert a string typed field into a timestamp type.
|
static ScalarValuedFunction |
toTimestamp(String field,
DateTimeFormatting format)
Convert a string typed field into a timestamp type using the given format.
|
static ScalarValuedFunction |
toTimestamp(String field,
String format)
Convert a string typed field into a timestamp type using the given format.
|
public static ScalarValuedFunction asBoolean(String field)
field
- a field whose type is an intpublic static ScalarValuedFunction asBoolean(String field, int truth, int falsity)
field
- a field whose type is an inttruth
- int representing the value of truefalsity
- int representing the value of falsepublic static ScalarValuedFunction asBoolean(ScalarValuedFunction expr, int truth, int falsity)
expr
- a function expression whose return type is an inttruth
- int representing the value of truefalsity
- int representing the value of falsepublic static ScalarValuedFunction asFloat(String field)
field
- a field whose type is a numberpublic static ScalarValuedFunction asFloat(ScalarValuedFunction expr)
expr
- a function expression whose return type is a numberpublic static ScalarValuedFunction asDouble(String field)
field
- a field whose type is a numberpublic static ScalarValuedFunction asDouble(ScalarValuedFunction expr)
expr
- a function expression whose return type is a numberpublic static ScalarValuedFunction asInt(String field)
field
- a field whose type is a numberpublic static ScalarValuedFunction asInt(ScalarValuedFunction expr)
expr
- a function expression whose return type is a numberpublic static ScalarValuedFunction asLong(String field)
field
- a field whose type is a numberpublic static ScalarValuedFunction asLong(ScalarValuedFunction expr)
expr
- a function expression whose return type is a numberpublic static ScalarValuedFunction asMoney(String field)
field
- a field whose type is a numberpublic static ScalarValuedFunction asMoney(ScalarValuedFunction expr)
expr
- a function expression whose return type is a numberpublic static ScalarValuedFunction asNumeric(String field)
BigDecimal
object.field
- a field whose type is a numberpublic static ScalarValuedFunction asTime(String field)
field
- a field whose type is timestamppublic static ScalarValuedFunction asTime(ScalarValuedFunction expr)
expr
- a function expression whose return type is timestamppublic static ScalarValuedFunction asNumeric(ScalarValuedFunction expr)
BigDecimal
object.expr
- a function expression whose return type is a numberpublic static ScalarValuedFunction asDate(String field)
field
- a field whose type is timestamppublic static ScalarValuedFunction asDate(ScalarValuedFunction expr)
expr
- a function expression whose return type is timestamppublic static ScalarValuedFunction toBinary(String fieldName)
field
- a field whose type is stringpublic static ScalarValuedFunction toBinary(ScalarValuedFunction expr)
expr
- an expression whose type is stringpublic static ScalarValuedFunction toChar(String fieldName)
field
- a field whose type is stringpublic static ScalarValuedFunction toChar(ScalarValuedFunction expr)
expr
- an expression whose type is stringpublic static ScalarValuedFunction toDouble(String field)
field
- a field whose type is stringpublic static ScalarValuedFunction toDouble(ScalarValuedFunction expr)
expr
- a function expression whose return type is stringpublic static ScalarValuedFunction toDouble(String field, String format)
field
- a field whose type is stringformat
- format specification to use to convert strings to doublespublic static ScalarValuedFunction toDouble(String field, NumberFormat format)
field
- a field whose type is stringformat
- formatter instance to use to convert strings to doublespublic static ScalarValuedFunction toDouble(ScalarValuedFunction expr, NumberFormat format)
expr
- a function expression whose return type is stringformat
- formatter instance to use to convert strings to doublespublic static ScalarValuedFunction toFloat(String field)
field
- a field whose type is stringpublic static ScalarValuedFunction toFloat(ScalarValuedFunction expr)
expr
- a function expression whose return type is stringpublic static ScalarValuedFunction toFloat(String field, String format)
field
- a field whose type is stringformat
- format specification to use to convert string to floatspublic static ScalarValuedFunction toFloat(String field, NumberFormat format)
field
- a field whose type is stringformat
- formatter instance to use to convert strings to floatspublic static ScalarValuedFunction toFloat(ScalarValuedFunction expr, NumberFormat format)
expr
- a function expression whose return type is stringformat
- formatter instance to use to convert strings to floatspublic static ScalarValuedFunction toInt(String field)
field
- a field whose type is stringpublic static ScalarValuedFunction toInt(ScalarValuedFunction expr)
expr
- a function expression whose return type is stringpublic static ScalarValuedFunction toInt(String field, String format)
field
- a field whose type is stringformat
- format specification to use to convert strings to integerspublic static ScalarValuedFunction toInt(String field, NumberFormat format)
field
- a field whose type is stringformat
- formatter instance to use to convert strings to integerspublic static ScalarValuedFunction toInt(ScalarValuedFunction expr, NumberFormat format)
expr
- a function expression whose return type is stringformat
- formatter instance to use to convert strings to integerspublic static ScalarValuedFunction toLong(String field)
field
- a field whose type is stringpublic static ScalarValuedFunction toLong(ScalarValuedFunction expr)
expr
- a function expression whose return type is stringpublic static ScalarValuedFunction toLong(String field, String format)
field
- a field whose type is stringformat
- format specification to use to convert strings to longspublic static ScalarValuedFunction toLong(String field, NumberFormat format)
field
- a field whose type is stringformat
- formatter instance to use to convert strings to longspublic static ScalarValuedFunction toLong(ScalarValuedFunction expr, NumberFormat format)
expr
- a function expression whose return type is stringformat
- formatter instance to use to convert strings to longspublic static ScalarValuedFunction toMoney(String field)
field
- a field whose type is stringpublic static ScalarValuedFunction toMoney(ScalarValuedFunction expr)
expr
- a function expression whose return type is stringpublic static ScalarValuedFunction toMoney(String field, String format)
field
- a field whose type is stringformat
- format specification to use to convert strings to moneypublic static ScalarValuedFunction toMoney(String field, NumberFormat format)
field
- a field whose type is stringformat
- formatter instance to use to convert strings to moneypublic static ScalarValuedFunction toMoney(ScalarValuedFunction expr, NumberFormat format)
expr
- a function expression whose return type is stringformat
- formatter instance to use to convert strings to moneypublic static ScalarValuedFunction toNumeric(String field)
field
- a field whose type is stringpublic static ScalarValuedFunction toNumeric(ScalarValuedFunction expr)
expr
- a function expression whose return type is stringpublic static ScalarValuedFunction toNumeric(String field, String format)
field
- a field whose type is stringformat
- format specification to use to convert strings to numericspublic static ScalarValuedFunction toNumeric(String field, NumberFormat format)
field
- a field whose type is stringformat
- formatter instance to use to convert strings to numericpublic static ScalarValuedFunction toNumeric(ScalarValuedFunction expr, NumberFormat format)
expr
- a function expression whose return type is stringformat
- formatter instance to use to convert strings to numericpublic static ScalarValuedFunction toBoolean(String field, String truth, String falsity)
field
- a field whose type is stringtruth
- text representing the value of truefalsity
- text representing the value of falsepublic static ScalarValuedFunction toBoolean(ScalarValuedFunction expr, String truth, String falsity)
expr
- a function expression whose return type is stringtruth
- text representing the value of truefalsity
- text representing the value of falsepublic static ScalarValuedFunction toBoolean(String field, TruthValues mapping)
field
- a field whose type is stringmapping
- a truthvalue mapping between boolean values and stringspublic static ScalarValuedFunction toBoolean(ScalarValuedFunction expr, TruthValues mapping)
expr
- a function expression whose return type is stringmapping
- a truthvalue mapping between boolean values and stringspublic static ScalarValuedFunction toDate(String field)
field
- a field whose type is stringpublic static ScalarValuedFunction toDate(ScalarValuedFunction expr)
expr
- a function expression whose return type is stringpublic static ScalarValuedFunction toDate(String field, String format)
field
- a field whose type is stringformat
- format specification to use to convert string to datepublic static ScalarValuedFunction toDate(String field, DateTimeFormatting format)
field
- a field whose type is stringformat
- format instance to use to convert string to datepublic static ScalarValuedFunction toDate(ScalarValuedFunction expr, DateTimeFormatting format)
expr
- a function expression whose return type is stringformat
- format instance to use to convert string to datepublic static ScalarValuedFunction toTime(String field)
field
- a field whose type is stringpublic static ScalarValuedFunction toTime(ScalarValuedFunction expr)
expr
- a function expression whose return type is stringpublic static ScalarValuedFunction toTime(String field, String format)
field
- a field whose type is stringformat
- format specification to use to convert string to timepublic static ScalarValuedFunction toTime(String field, DateTimeFormatting format)
field
- a field whose type is stringformat
- format instance to use to convert string to timepublic static ScalarValuedFunction toTime(ScalarValuedFunction expr, DateTimeFormatting format)
expr
- a function expression whose return type is stringformat
- format instance to use to convert string to timepublic static ScalarValuedFunction toTimestamp(String field)
field
- a field whose type is stringpublic static ScalarValuedFunction toTimestamp(ScalarValuedFunction expr)
expr
- a function expression whose return type is stringpublic static ScalarValuedFunction toTimestamp(String field, String format)
field
- a field whose type is stringformat
- format specification to use to convert string to timestamppublic static ScalarValuedFunction toTimestamp(String field, DateTimeFormatting format)
field
- a field whose type is stringformat
- format instance to use to convert string to timestamppublic static ScalarValuedFunction toTimestamp(ScalarValuedFunction expr, DateTimeFormatting format)
expr
- a function expression whose return type is stringformat
- format instance to use to convert string to timestamppublic static ScalarValuedFunction toString(String field)
toText(String, Format)
.field
- a field whose type is stringpublic static ScalarValuedFunction toString(ScalarValuedFunction expr)
toText(String, Format)
.expr
- the expression to convertpublic static ScalarValuedFunction toText(String field, Format formatter)
field
- a field whose type is stringformatter
- format instance to use to convert values to stringspublic static ScalarValuedFunction toText(ScalarValuedFunction expr, Format formatter)
expr
- the expression to convertformatter
- format instance to use to convert values to stringspublic static ScalarValuedFunction toText(String field, String format)
field
- a field whose type is stringformat
- format specification to use to convert values to stringspublic static ScalarValuedFunction toText(ScalarValuedFunction expr, String format)
expr
- the expression to convertformat
- format specification to use to convert values to stringsCopyright © 2019 Actian Corporation. All rights reserved.