Skip to content

Commit 1b291e9

Browse files
committed
Mention that ROWID and TIMESTAMP WITH TIMEZONE can be mapped to string
1 parent 2951791 commit 1b291e9

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

doc/api.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,10 @@ This property helps avoid situations where using JavaScript types can
506506
lead to numeric precision loss, or where date conversion is unwanted.
507507

508508
The valid types that can be mapped to strings are
509-
[`DATE`](#oracledbconstantsnodbtype) and [`NUMBER`](#oracledbconstantsnodbtype).
509+
[`DATE`](#oracledbconstantsnodbtype) and
510+
[`NUMBER`](#oracledbconstantsnodbtype). Columns of type `ROWID` and
511+
`TIMESTAMP WITH TIME ZONE` that cannot natively be fetched can also be
512+
mapped and fetched as strings.
510513

511514
The maximum length of a string created by this mapping is 200 bytes.
512515

@@ -2847,10 +2850,10 @@ The default query result type mappings for Oracle Database types to JavaScript t
28472850
Therefore, timestamps having greater
28482851
precision lose their sub-millisecond fractional part
28492852
when fetched. Internally, `TIMESTAMP` and `DATE`
2850-
columns are fetched as `TIMESTAMP WITH LOCAL TIMEZONE` using
2853+
columns are fetched as `TIMESTAMP WITH LOCAL TIME ZONE` using
28512854
[OCIDateTime](https://docs.oracle.com/database/121/LNOCI/oci12oty.htm#LNOCI16840).
28522855
When binding a JavaScript Date value in an `INSERT` statement, the date is also inserted as `TIMESTAMP WITH
2853-
LOCAL TIMEZONE` using OCIDateTime.
2856+
LOCAL TIME ZONE` using OCIDateTime.
28542857
28552858
##### Fetching as String
28562859
@@ -3695,8 +3698,8 @@ returned array length is not greater than one. This will help identify
36953698
invalid data or an incorrect `WHERE` clause that causes more results
36963699
to be returned.
36973700
3698-
Oracle Database DATE, TIMESTAMP and TIMESTAMP WITH LOCAL TIME ZONE
3699-
types can be bound as `DATE` for DML RETURNING. These types and ROWID
3701+
Oracle Database `DATE`, `TIMESTAMP` and `TIMESTAMP WITH LOCAL TIME ZONE`
3702+
types can be bound as `DATE` for DML RETURNING. These types and `ROWID`
37003703
can also be bound as `STRING`.
37013704
37023705
An example of DML RETURNING binds is:

0 commit comments

Comments
 (0)