@@ -4826,8 +4826,8 @@ may be used in `pool.getConnection()` like:
4826
4826
``` javascript
4827
4827
const connection = await pool .getConnection (
4828
4828
{
4829
- user : ' hr' ,
4830
- password : mypw, // mypw contains the hr schema password
4829
+ user : ' hr' ,
4830
+ password : mypw, // mypw contains the hr schema password
4831
4831
}
4832
4832
);,
4833
4833
```
@@ -10664,15 +10664,30 @@ const bindVars = [
10664
10664
10665
10665
### <a name="dmlreturn"></a> 20.3 DML RETURNING Bind Parameters
10666
10666
10667
- [DML][14] statements query or manipulate data in existing schema
10668
- objects.
10669
-
10670
- Bind parameters from "DML RETURNING" statements (such as ` INSERT
10671
- ... RETURNING ... INTO ... ` ) can use ` oracledb .BLOB ` , ` oracledb .CLOB ` , ` oracledb .STRING ` ,
10672
- ` oracledb .NUMBER ` or ` oracledb .DATE ` for the OUT [` type` ](#executebindParams).
10673
-
10674
- For ` oracledb .STRING ` types, an error occurs if [` maxSize` ](#executebindParams)
10675
- is not large enough to hold a returned value.
10667
+ "DML RETURNING" statements (such as ` INSERT ... RETURNING ... INTO
10668
+ ... ` ) are a way information can be returned about row changes from
10669
+ [DML][14] statements. For example you can use DML RETURNING to get
10670
+ the ROWIDs of newly inserted rows. Another common use case is to
10671
+ return [auto incremented column values ](#autoincrement).
10672
+
10673
+ Bind parameters for DML RETURNING statements can use ` oracledb .BLOB ` ,
10674
+ ` oracledb .CLOB ` , ` oracledb .STRING ` , ` oracledb .NUMBER ` or
10675
+ ` oracledb .DATE ` for the BIND_OUT [` type` ](#executebindParams). To
10676
+ bind named Oracle objects use the class name or
10677
+ [DbObject](#dbobjectclass) prototype class for the bind type, as shown
10678
+ for object binds in [Fetching Oracle Database Objects and
10679
+ Collections](#objects).
10680
+
10681
+ Oracle Database DATE, TIMESTAMP, TIMESTAMP WITH LOCAL TIME ZONE and
10682
+ TIMESTAMP WITH TIME ZONE types can be bound as ` oracledb .DATE ` for DML
10683
+ RETURNING. These types can also be bound as ` oracledb .STRING ` , if
10684
+ desired. ROWID and UROWID data to be returned can be bound as
10685
+ ` oracledb .STRING ` . Note that a string representing a UROWID may be up
10686
+ to 5267 bytes long.
10687
+
10688
+ For ` oracledb .STRING ` types, an error occurs if
10689
+ [` maxSize` ](#executebindParams) is not large enough to hold a returned
10690
+ value.
10676
10691
10677
10692
Note each DML RETURNING bind OUT parameter is returned as an array
10678
10693
containing zero or more elements. Application code that is designed
@@ -10681,20 +10696,10 @@ returned array length is not greater than one. This will help identify
10681
10696
invalid data or an incorrect ` WHERE ` clause that causes more results
10682
10697
to be returned.
10683
10698
10684
- Oracle Database DATE, TIMESTAMP, TIMESTAMP WITH LOCAL TIME ZONE
10685
- and TIMESTAMP WITH TIME ZONE types can be bound as ` oracledb .DATE ` for DML
10686
- RETURNING. These types can also be bound as ` oracledb .STRING ` , if desired.
10687
- ROWID and UROWID data to be returned can be bound as ` oracledb .STRING ` .
10688
- Note that a string representing a UROWID may be up to 5267 bytes
10689
- long.
10690
-
10691
10699
No duplicate binds are allowed in a DML statement with a ` RETURNING `
10692
10700
clause, and no duplication is allowed between bind parameters in the
10693
10701
DML section and the ` RETURNING ` section of the statement.
10694
10702
10695
- One common use case is to return an 'auto incremented' key values, see
10696
- [Auto-Increment Columns](#autoincrement).
10697
-
10698
10703
An example of DML RETURNING binds is:
10699
10704
10700
10705
` ` ` javascript
0 commit comments