@@ -344,12 +344,32 @@ Oracle R2DBC's implementation of Publishers that emit multiple items will
344
344
typically defer execution until a Subscriber signals demand, and not support
345
345
multiple subscribers.
346
346
347
- ### Errors
347
+ ### Errors and Warnings
348
348
Oracle R2DBC creates R2dbcExceptions having the same ORA-XXXXX error codes
349
- used by Oracle Database and Oracle JDBC.
349
+ used by Oracle Database and Oracle JDBC. The
350
+ [ Database Error Messages] ( https://docs.oracle.com/en/database/oracle/oracle-database/21/errmg/ORA-00000.html#GUID-27437B7F-F0C3-4F1F-9C6E-6780706FB0F6 )
351
+ document provides a reference for all ORA-XXXXX error codes.
350
352
351
- A reference for the ORA-XXXXX error codes can be found
352
- [ here] ( https://docs.oracle.com/en/database/oracle/oracle-database/21/errmg/ORA-00000.html#GUID-27437B7F-F0C3-4F1F-9C6E-6780706FB0F6 )
353
+ Warning messages from Oracle Database are emitted as
354
+ ` oracle.r2dbc.OracleR2dbcWarning ` segments. These segments may be consumed using
355
+ ` Result.flatMap(Function) ` :
356
+ ``` java
357
+ result. flatMap(segment - > {
358
+ if (segment instanceof OracleR2dbcWarning ) {
359
+ logWarning(((OracleR2dbcWarning )segment). getMessage());
360
+ return emptyPublisher();
361
+ }
362
+ else if (segment instanceof Result . Message ){
363
+ ... handle an error ...
364
+ }
365
+ else {
366
+ ... handle other segment types ...
367
+ }
368
+ })
369
+ ```
370
+ Unlike the errors of standard ` Result.Message ` segments, if a warning is not
371
+ consumed by ` flatMap ` , then it will be silently discarded when a ` Result ` is
372
+ consumed using the ` map ` or ` getRowsUpdated ` methods.
353
373
354
374
### Transactions
355
375
Oracle R2DBC uses READ COMMITTED as the default transaction isolation level.
0 commit comments