Oracle Database MLE supports these DB types:
The NUMBER type is a precise arithmetic type that supports a wide range of values:
- Positive numbers in the range 1 x 10-130 to 9.99...9 x 10125 with up to 38 significant digits
- Negative numbers from -1 x 10-130 to -9.99...99 x 10125 with up to 38 significant digits
Note that the range is smaller than the range of BINARY_DOUBLE, but all numbers within this range are precisely represented.
The BINARY_DOUBLE type corresponds to the usual IEEE 754 floating point data type and comes with the usual imprecision. This datatype supports infinite values and NaN which cannot be represented as NUMBER.
The VARCHAR2 type corresponds to character data. At the moment, Oracle Database MLE only supports the US ASCII character set.
REMARK: The Oracle Database does not distinguish between
NULL and the
empty string. Thus, every empty string is
NULL and vice versa.
Oracle Database MLE does not support the types Undefined, Symbol, and Object. The only
element of the Null type (the value
null) represents the SQL
The Number type is defined as IEEE 754 type that supports infinite values and NaN values. It suffers from the usual imprecision in IEEE 754 representation and arithmetics.
DB to JS Conversions¶
An exception to this conversion specification is the
NULL value of the
null. Since the
Oracle Database treats the empty string as
NULL, the empty string value
inside the database will also be converted into
JS to DB Conversions¶
|Number||direct, may overflow||direct||toFixed()|
|Boolean||0 or 1||0 or 1||
The table shows all implicit conversions provided. direct specifies no
implicit conversion since the types are (mostly) compatible. "may overflow"
denotes a possible numeric overflow (ORA-1426) if the JS value is too big to
be represented as an Oracle Number, error indicates an
unsupported conversion (ORA-1460), NULL the conversion to SQL
and the other cases specify the conversion applied. See below for details.
Number to NUMBER¶
Number to BINARY_DOUBLE¶
Number to VARCHAR2¶
to a string as if the
toFixed() function had been called on the number.
If the string is longer than the precision of the VARCHAR2 it gets silently
Boolean to NUMBER or BINARY_DOUBLE¶
transform the boolean into the usual 0 or 1 representation. Thus, e.g., the
true will be turned into
Boolean to VARCHAR2¶
true into the VARCHAR2
TRUE and the boolean value
FALSE. If the string is longer than the precision of the VARCHAR2 it gets
String into NUMBER or BINARY_DOUBLE¶
String into VARCHAR2¶
No conversion is necessary here. If the string is longer than the precision of the VARCHAR2 it is silently truncated.
REMARK: The oracle database does not distinguish between NULL and the empty string. Thus, returning an empty string from a user-defined extension will result in a NULL value in the database.
null value is converted into the SQL
NULL value. This
happens independently of the datatype.
undefined, Object, Symbol¶
These types are not supported and will raise an ORA-1460 error.
Errors that occur during conversion are reported directly to the database.
try ... catch.