- format_array ARRAYREF | LIST
- Given a reference to an array or a list of values, return a specially
formatted string. Undef is returned if ARRAYREF points to an empty array
or if LIST is not passed. The array or list must not contain undefined
values.
If the resulting string is longer than
"max_array_characters()", a fatal
error will occur.
- format_date DATETIME
- Converts the DateTime object DATETIME into the appropriate format for the
"DATE" data type.
- format_datetime DATETIME
- Converts the DateTime object DATETIME into the appropriate format for the
"DATETIME YEAR TO SECOND" data type.
- format_datetime_year_to_fraction DATETIME
- Converts the DateTime object DATETIME into the appropriate format for the
"DATETIME YEAR TO FRACTION" data type.
- format_datetime_year_to_fraction_[1-5] DATETIME
- Converts the DateTime object DATETIME into the appropriate format for the
"DATETIME YEAR TO FRACTION(N)" data type, where N is an integer
from 1 to 5.
- format_datetime_year_to_minute DATETIME
- Converts the DateTime object DATETIME into the appropriate format for the
"DATETIME YEAR TO MINUTE" data type.
- format_datetime_year_to_month DATETIME
- Converts the DateTime object DATETIME into the appropriate format for the
"DATETIME YEAR TO MONTH" data type.
- format_datetime_year_to_second DATETIME
- Converts the DateTime object DATETIME into the appropriate format for the
"DATETIME YEAR TO SECOND" data type.
- format_set ARRAYREF | LIST
- Given a reference to an array or a list of values, return a string
formatted according to the rules of Informix's "SET" data type.
Undef is returned if ARRAYREF points to an empty array or if LIST is not
passed. If the array or list contains undefined values, a fatal error will
occur.
- format_timestamp DATETIME
- Converts the DateTime object DATETIME into the appropriate format for the
"DATETIME YEAR TO FRACTION(5)" data type.
- parse_array STRING | LIST | ARRAYREF
- Parse STRING and return a reference to an array. STRING should be
formatted according to the Informix array data type emulation format
returned by "format_array()". Undef is
returned if STRING is undefined.
If a LIST of more than one item is passed, a reference to an
array containing the values in LIST is returned.
If a an ARRAYREF is passed, it is returned as-is.
- parse_boolean STRING
- Parse STRING and return a boolean value of 1 or 0. STRING should be
formatted according to Informix's native "boolean" data type.
Acceptable values are 't', 'T', or '1' for true, and 'f', 'F', or '0' for
false.
If STRING is a valid boolean keyword (according to
validate_boolean_keyword) or if it looks like a function call (matches
/^\w+\(.*\)$/) and keyword_function_calls is true, then it is returned
unmodified. Returns undef if STRING could not be parsed as a valid
"boolean" value.
- parse_date STRING
- Parse STRING and return a DateTime object. STRING should be formatted
according to the Informix "DATE" data type.
If STRING is a valid date keyword (according to
validate_date_keyword) it is returned unmodified. Returns undef if
STRING could not be parsed as a valid "DATE" value.
- parse_datetime STRING
- Parse STRING and return a DateTime object. STRING should be formatted
according to the Informix "DATETIME YEAR TO SECOND" data type.
If STRING is a valid "datetime year to second"
keyword (according to validate_datetime_year_to_second_keyword) it is
returned unmodified. Returns undef if STRING could not be parsed as a
valid "DATETIME YEAR TO SECOND" value.
- parse_datetime_year_to_fraction STRING
- Parse STRING and return a DateTime object. STRING should be formatted
according to the Informix "DATETIME YEAR TO FRACTION" data type.
If STRING is a valid "datetime year to fraction"
keyword (according to validate_datetime_year_to_fraction_keyword) it is
returned unmodified. Returns undef if STRING could not be parsed as a
valid "DATETIME YEAR TO FRACTION" value.
- parse_datetime_year_to_fraction_[1-5] STRING
- These five methods parse STRING and return a DateTime object. STRING
should be formatted according to the Informix "DATETIME YEAR TO
FRACTION(N)" data type, where N is an integer from 1 to 5.
If STRING is a valid "datetime year to fraction"
keyword (according to validate_datetime_year_to_fraction_keyword) it is
returned unmodified. Returns undef if STRING could not be parsed as a
valid "DATETIME YEAR TO FRACTION(N)" value.
- parse_datetime_year_to_minute STRING
- Parse STRING and return a DateTime object. STRING should be formatted
according to the Informix "DATETIME YEAR TO MINUTE" data type.
If STRING is a valid "datetime year to minute"
keyword (according to validate_datetime_year_to_minute_keyword) it is
returned unmodified. Returns undef if STRING could not be parsed as a
valid "DATETIME YEAR TO MINUTE" value.
- parse_datetime_year_to_month STRING
- Parse STRING and return a DateTime object. STRING should be formatted
according to the Informix "DATETIME YEAR TO MINUTE" data type.
If STRING is a valid "datetime year to month"
keyword (according to validate_datetime_year_to_month_keyword) it is
returned unmodified. Returns undef if STRING could not be parsed as a
valid "DATETIME YEAR TO MONTH" value.
- parse_datetime_year_to_second STRING
- Parse STRING and return a DateTime object. STRING should be formatted
according to the Informix "DATETIME YEAR TO SECOND" data type.
If STRING is a valid "datetime year to second"
keyword (according to validate_datetime_year_to_second_keyword) it is
returned unmodified. Returns undef if STRING could not be parsed as a
valid "DATETIME YEAR TO SECOND" value.
- parse_set STRING | LIST | ARRAYREF
- Parse STRING and return a reference to an array. STRING should be
formatted according to Informix's "SET" data type. Undef is
returned if STRING is undefined.
If a LIST of more than one item is passed, a reference to an
array containing the values in LIST is returned.
If a an ARRAYREF is passed, it is returned as-is.
- parse_timestamp STRING
- Parse STRING and return a DateTime object. STRING should be formatted
according to the Informix "DATETIME YEAR TO FRACTION(5)"
data type.
If STRING is a valid timestamp keyword (according to
validate_timestamp_keyword) it is returned unmodified. Returns undef if
STRING could not be parsed as a valid "DATETIME YEAR TO
FRACTION(5)" value.
- validate_boolean_keyword STRING
- Returns true if STRING is a valid keyword for the "boolean" data
type of the current data source, false otherwise. Valid (case-insensitive)
boolean keywords are:
TRUE
FALSE
- validate_date_keyword STRING
- Returns true if STRING is a valid keyword for the Informix
"date", false otherwise. Valid (case-insensitive) date keywords
are:
current
today
The keywords are not case sensitive. Any string that looks
like a function call (matches /^\w+\(.*\)$/) is also considered a valid
date keyword if keyword_function_calls is true.
- validate_datetime_keyword STRING
- Returns true if STRING is a valid keyword for the Informix "datetime
year to second" data type, false otherwise. Valid (case-insensitive)
datetime keywords are:
current
current year to second
current year to minute
current year to hour
current year to day
current year to month
today
The keywords are not case sensitive. Any string that looks
like a function call (matches /^\w+\(.*\)$/) is also considered a valid
datetime keyword if keyword_function_calls is true.
- validate_datetime_year_to_fraction_keyword STRING
- Returns true if STRING is a valid keyword for the Informix "datetime
year to fraction(n)" data type (where n is an integer from 1 to 5),
false otherwise. Valid (case-insensitive) "datetime year to
fraction" keywords are:
current
current year to fraction
current year to fraction(1)
current year to fraction(2)
current year to fraction(3)
current year to fraction(4)
current year to fraction(5)
current year to second
current year to minute
current year to hour
current year to day
current year to month
today
The keywords are not case sensitive. Any string that looks
like a function call (matches /^\w+\(.*\)$/) is also considered a valid
"datetime year to fraction" keyword if keyword_function_calls
is true.
- validate_datetime_year_to_minute_keyword STRING
- Returns true if STRING is a valid keyword for the Informix "datetime
year to minute" data type, false otherwise. Valid (case-insensitive)
"datetime year to minute" keywords are:
current
current year to second
current year to minute
current year to hour
current year to day
current year to month
today
The keywords are not case sensitive. Any string that looks
like a function call (matches /^\w+\(.*\)$/) is also considered a valid
"datetime year to minute" keyword if keyword_function_calls is
true.
- validate_datetime_year_to_month_keyword STRING
- Returns true if STRING is a valid keyword for the Informix "datetime
year to month" data type, false otherwise. Valid (case-insensitive)
"datetime year to month" keywords are:
current
current year to second
current year to minute
current year to hour
current year to day
current year to month
today
The keywords are not case sensitive. Any string that looks
like a function call (matches /^\w+\(.*\)$/) is also considered a valid
"datetime year to month" keyword if keyword_function_calls is
true.
- validate_datetime_year_to_second_keyword STRING
- Returns true if STRING is a valid keyword for the Informix "datetime
year to second" data type, false otherwise. Valid (case-insensitive)
datetime keywords are:
current
current year to second
current year to minute
current year to hour
current year to day
current year to month
today
The keywords are not case sensitive. Any string that looks
like a function call (matches /^\w+\(.*\)$/) is also considered a valid
"datetime year to second" keyword if keyword_function_calls is
true.
- validate_timestamp_keyword STRING
- Returns true if STRING is a valid keyword for the Informix
"timestamp" data type, false otherwise. Valid (case-insensitive)
timestamp keywords are:
current
current year to fraction
current year to fraction(1)
current year to fraction(2)
current year to fraction(3)
current year to fraction(4)
current year to fraction(5)
current year to second
current year to minute
current year to hour
current year to day
current year to month
today
The keywords are not case sensitive. Any string that looks
like a function call (matches /^\w+\(.*\)$/) is also considered a valid
timestamp keyword if keyword_function_calls is true.