You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[JSON](https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/Data-Types.html#GUID-E441F541-BA31-4E8C-B7B4-D2FB8C42D0DF)|`javax.json.JsonObject` or `oracle.sql.json.OracleJsonObject`|
|[INTERVAL DAY TO SECOND](https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/Data-Types.html#GUID-B03DD036-66F8-4BD3-AF26-6D4433EBEC1C)|`java.time.Duration`|
492
+
|[INTERVAL YEAR TO MONTH](https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/Data-Types.html#GUID-ED59E1B3-BA8D-4711-B5C8-B0199C676A95)|`java.time.Period`|
497
493
> Unlike the standard SQL type named "DATE", the Oracle Database type named
498
494
> "DATE" stores values for year, month, day, hour, minute, and second. The
499
495
> standard SQL type only stores year, month, and day. LocalDateTime objects are able
500
496
> to store the same values as a DATE in Oracle Database.
501
497
502
498
### BLOB, CLOB, and NCLOB
503
-
Oracle R2DBC supports reading and writing the content of large object (LOB)
504
-
types.
505
-
506
-
#### Configuring the Prefetched Data Size
507
-
When a SQL query returns the content of a LOB column, only a portion of the
508
-
entire content is received in the response from Oracle Database. The portion
509
-
which is received in the SQL query response is referred to as "prefetched data".
510
-
Any content remaining after the prefetched data must be fetched by additional
511
-
database calls.
512
-
513
-
For example, if a SQL query returns a LOB which is 100MB in size, then the
514
-
response might include only the first 1MB of the LOB's content. Additional
499
+
Oracle R2DBC allows large objects (LOBs) to be read and written as a reactive
500
+
stream, or as a
501
+
fully materialized value.
502
+
503
+
#### Prefetched LOB Data
504
+
When a SQL query returns a LOB column, only a portion of the LOB's content
505
+
is received in the response from Oracle Database. The portion received in the
506
+
SQL query response is referred to as "prefetched data". Any content remaining
507
+
after the prefetched portion must be fetched with additional database calls.
508
+
509
+
For example, if a SQL query returns a LOB that is 100MB in size, then the
510
+
response might prefetch only the first 1MB of the LOB's content. Additional
515
511
database calls would be required to fetch the remaining 99MB of content.
516
512
517
-
The number of prefetched bytes is configured by an `Option` named [oracle.jdbc.defaultLobPrefetchSize](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html?is-external=true#CONNECTION_PROPERTY_DEFAULT_LOB_PREFETCH_SIZE)
518
-
. The default value of this `Option` is 1 GB.
519
-
520
-
#### Streamed Type Mapping
521
-
For systems in which LOB values are too large for prefetching, a smaller
522
-
prefetch size may be configured. By mapping LOB columns to `Blob` or `Clob`
523
-
objects, the content may be streamed over a series of non-blocking database
524
-
calls.
513
+
By default, Oracle R2DBC attempts to prefetch the entire content of a LOB. Oracle R2DBC will
514
+
request up to 1GB of prefetched data from Oracle Database when executing a SQL
515
+
query.
525
516
526
517
#### Materialzed Type Mapping
527
518
The `Row.get(...)` method allows LOB values to be mapped into materialized
528
-
types like `ByteBuffer` and `String`. If the prefetch size is large
529
-
enough to have fetched the entire LOB value, then `Row.get(...)` can
530
-
return a `ByteBuffer/String` without any additional database calls. However, if
531
-
the LOB value is larger than the prefetch size, then `Row.get(...)` must execute
532
-
a **blocking database call** to fetch the remainder of that value.
519
+
types like `ByteBuffer` and `String`. If the entire LOB has been prefetched,
520
+
then `Row.get(...)` can return a `ByteBuffer/String` without any additional
521
+
database calls. However, if the LOB value is larger than the prefetch size, then
522
+
`Row.get(...)` must execute a **blocking database call** to fetch the remainder of that value.
523
+
524
+
#### Streamed Type Mapping
525
+
In a system that consumes very large LOBs, a very large amount of memory will be
526
+
consumed if the entire LOB is prefetched. When a LOB is too large to be
527
+
prefetched entirely, a smaller prefetch size can be configured using the
0 commit comments