Skip to content

Commit 6b9cbd1

Browse files
committed
Add notes on when new attrs & methods were added
1 parent 51e8092 commit 6b9cbd1

File tree

1 file changed

+66
-24
lines changed

1 file changed

+66
-24
lines changed

doc/api.md

Lines changed: 66 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,8 @@ Events mode is required for [Fast Application Notification
651651
(FAN)](#connectionfan) and [Runtime Load Balancing
652652
(RLB)](#connectionrlb).
653653

654+
This property was added in node-oracledb 2.2.
655+
654656
#### <a name="propdbextendedmetadata"></a> 3.2.4 `oracledb.extendedMetaData`
655657

656658
```
@@ -671,6 +673,8 @@ additional attributes. These are listed in
671673

672674
This property may be overridden in an [`execute()`](#executeoptions) call.
673675

676+
This property was added in node-oracledb 1.10.
677+
674678
#### <a name="propdbisexternalauth"></a> 3.2.5 `oracledb.externalAuth`
675679

676680
```
@@ -732,7 +736,7 @@ For direct fetches (those using `execute()` option [`resultSet:
732736
false`](#propexecresultset)), the internal buffer size will be based
733737
on the lesser of [`maxRows`](#propdbmaxrows) and `fetchArraySize`.
734738

735-
The property was introduced in node-oracledb version 2. It replaces
739+
The property was introduced in node-oracledb version 2.0. It replaces
736740
[`prefetchRows`](#propdbprefetchrows).
737741

738742
##### Example
@@ -769,6 +773,8 @@ var oracledb = require('oracledb');
769773
oracledb.fetchAsBuffer = [ oracledb.BLOB ];
770774
```
771775

776+
This property was added in node-oracledb 1.13.
777+
772778
#### <a name="propdbfetchasstring"></a> 3.2.8 `oracledb.fetchAsString`
773779

774780
```
@@ -881,6 +887,8 @@ readonly Number oracleClientVersion
881887
This readonly property gives a numeric representation of the Oracle client library version which is useful in comparisons.
882888
For version *a.b.c.d.e*, this property gives the number: `(100000000 * a) + (1000000 * b) + (10000 * c) + (100 * d) + e`
883889

890+
This property was added in node-oracledb 1.3.
891+
884892
##### Example
885893

886894
```javascript
@@ -903,6 +911,8 @@ var oracledb = require('oracledb');
903911
console.log("Oracle client library version is " + oracledb.oracleClientVersionString);
904912
```
905913

914+
This property was added in node-oracledb 2.2.
915+
906916
#### <a name="propdboutformat"></a> 3.2.13 `oracledb.outFormat`
907917

908918
```
@@ -1052,6 +1062,8 @@ var oracledb = require('oracledb');
10521062
oracledb.poolPingInterval = 60; // seconds
10531063
```
10541064

1065+
This property was added in node-oracledb 1.12.
1066+
10551067
#### <a name="propdbpooltimeout"></a> 3.2.18 `oracledb.poolTimeout`
10561068

10571069
```
@@ -1148,6 +1160,8 @@ oracledb.queueRequests = false;
11481160

11491161
See [Connection Pool Queue](#connpoolqueue) for more information.
11501162

1163+
This property was added in node-oracledb 1.7.
1164+
11511165
#### <a name="propdbqueuetimeout"></a> 3.2.22 `oracledb.queueTimeout`
11521166

11531167
```
@@ -1171,6 +1185,8 @@ oracledb.queueTimeout = 3000; // 3 seconds
11711185

11721186
See [Connection Pool Queue](#connpoolqueue) for more information.
11731187

1188+
This property was added in node-oracledb 1.7.
1189+
11741190
#### <a name="propdbstmtcachesize"></a> 3.2.23 `oracledb.stmtCacheSize`
11751191

11761192
```
@@ -1227,6 +1243,8 @@ var oracledb = require('oracledb');
12271243
console.log("Driver version is " + oracledb.versionString);
12281244
```
12291245

1246+
This property was added in node-oracledb 2.1.
1247+
12301248
#### <a name="propdbversionsuffix"></a> 3.2.26 `oracledb.versionSuffix`
12311249
```
12321250
readonly String versionSuffix
@@ -1241,6 +1259,8 @@ var oracledb = require('oracledb');
12411259
console.log("Driver version suffix is " + oracledb.versionSuffix);
12421260
```
12431261

1262+
This property was added in node-oracledb 2.1.
1263+
12441264
### <a name="oracledbmethods"></a> 3.3 Oracledb Methods
12451265

12461266
#### <a name="createpool"></a> 3.3.1 `oracledb.createPool()`
@@ -1313,6 +1333,8 @@ Connect string, or a Net Service Name from a `tnsnames.ora` file, or the
13131333
name of a local Oracle database instance. See
13141334
[Connection Strings](#connectionstrings) for examples.
13151335

1336+
The `connectionString` alias was added in node-oracledb 2.1.
1337+
13161338
###### <a name="createpoolpoolattrsevents"></a> 3.3.1.1.2 `events`
13171339

13181340
```
@@ -1355,7 +1377,6 @@ proxy user is specified.
13551377

13561378
###### <a name="createpoolpoolattrspoolalias"></a> 3.3.1.1.5 `poolAlias`
13571379

1358-
<a name="createpoolpoolattrspoolalias"></a>
13591380
```
13601381
String poolAlias
13611382
```
@@ -1368,6 +1389,8 @@ that utilize the connection pool cache, such as [`oracledb.getPool()`](#getpool)
13681389

13691390
See [Connection Pool Cache](#connpoolcache) for details and examples.
13701391

1392+
This property was added in node-oracledb 1.11.
1393+
13711394
###### <a name="createpoolpoolattrspoolincrement"></a> 3.3.1.1.6 `poolIncrement`
13721395

13731396
```
@@ -1670,6 +1693,8 @@ See [Privileged Connections](#privconn) for more information.
16701693

16711694
Note only non-pooled connections can be privileged.
16721695

1696+
This property was added in node-oracledb 2.1.
1697+
16731698
###### <a name="getconnectiondbattrsstmtcachesize"></a> 3.3.2.1.2.7 `stmtCacheSize`
16741699

16751700
```
@@ -1789,6 +1814,7 @@ readonly Number oracleServerVersion
17891814
This readonly property gives a numeric representation of the Oracle database version which is useful in comparisons.
17901815
For version *a.b.c.d.e*, this property gives the number: `(100000000 * a) + (1000000 * b) + (10000 * c) + (100 * d) + e`
17911816

1817+
This property was added in node-oracledb 1.3.
17921818

17931819
#### <a name="propconnoracleserverversionstring"></a> 4.1.5 `connection.oracleServerVersionString`
17941820

@@ -1798,6 +1824,8 @@ readonly String oracleServerVersionString
17981824

17991825
This readonly property gives a string representation of the Oracle database version which is useful for display.
18001826

1827+
This property was added in node-oracledb 2.2.
1828+
18011829
#### <a name="propconnstmtcachesize"></a> 4.1.6 `connection.stmtCacheSize`
18021830

18031831
```
@@ -1868,6 +1896,8 @@ users.
18681896

18691897
See [Changing Passwords and Connecting with an Expired Password](#changingpassword).
18701898

1899+
This method was added in node-oracledb 2.2.
1900+
18711901
##### Parameters
18721902

18731903
```
@@ -1938,6 +1968,9 @@ make the connection unusable, then `close()` will drop that connection
19381968
from the connection pool. So a future pooled `getConnection()` call
19391969
that grows the pool will create a new, valid connection.
19401970

1971+
This method was added to node-oracledb 1.9, replacing the equivalent
1972+
alias `connection.release()`.
1973+
19411974
##### Parameters
19421975

19431976
```
@@ -2391,8 +2424,6 @@ Each row is returned as a `data` event. Query metadata is available
23912424
via a `metadata` event. The `end` event indicates the end of the
23922425
query results.
23932426

2394-
Query results must be fetched to completion to avoid resource leaks.
2395-
23962427
The connection must remain open until the stream is completely read.
23972428

23982429
For tuning, adjust the value of
@@ -2401,6 +2432,11 @@ option [`fetchArraySize`](#propexecfetcharraysize).
24012432

24022433
See [Query Streaming](#streamingresults) for more information.
24032434

2435+
Support for Node.js version 8 Stream `destroy()` method was added in
2436+
node-oracledb 2.1.
2437+
2438+
This method was added in node-oracledb 1.8.
2439+
24042440
##### Parameters
24052441

24062442
See [execute()](#execute).
@@ -2715,6 +2751,9 @@ before `pool.close()` is called.
27152751

27162752
If the pool is in the [connection pool cache](#connpoolcache) it will be removed from the cache.
27172753

2754+
This method was added to node-oracledb 1.9, replacing the equivalent
2755+
alias `pool.terminate()`.
2756+
27182757
##### Parameters
27192758

27202759
```
@@ -2913,6 +2952,9 @@ for performance, adjust global attributes such as
29132952

29142953
See [Query Streaming](#streamingresults) for more information.
29152954

2955+
The `toQueryStream()` method was added in node-oracledb 1.9. Support
2956+
for Node.js version 8 Stream `destroy()` method was added in node-oracledb 2.1.
2957+
29162958
## <a name="connectionhandling"></a> 8. Connection Handling
29172959

29182960
In applications which use connections infrequently, create a
@@ -4775,14 +4817,14 @@ Here are things to do when you see an *ORA-1000*:
47754817
47764818
- Avoid having too many incompletely processed statements open at one time:
47774819
4778-
- Make sure your application is handling connections and statements
4779-
in the order you expect.
4820+
- Make sure your application is handling connections and statements
4821+
in the order you expect.
47804822
4781-
- [Close ResultSets](#close) before releasing the connection.
4823+
- [Close ResultSets](#close) before releasing the connection.
47824824
4783-
- If cursors are opened with `DBMS_SQL.OPEN_CURSOR()` in a PL/SQL
4784-
block, close them before the block returns - except for REF
4785-
CURSORs being passed back to node-oracledb.
4825+
- If cursors are opened with `DBMS_SQL.OPEN_CURSOR()` in a PL/SQL
4826+
block, close them before the block returns - except for REF
4827+
CURSORs being passed back to node-oracledb.
47864828
47874829
- Choose the appropriate Statement Cache size. Node-oracledb has a
47884830
statement cache per connection. When node-oracledb internally
@@ -5542,9 +5584,9 @@ Persistent or temporary Lobs returned from the database should be
55425584
closed with `lob.close()` unless they have been automatically closed.
55435585
Automatic closing of returned Lobs occurs when:
55445586
5545-
- streaming has completed
5546-
- a stream error occurs
5547-
- the Lob was used as the source for an IN OUT bind
5587+
- streaming has completed
5588+
- a stream error occurs
5589+
- the Lob was used as the source for an IN OUT bind
55485590
55495591
If you try to close a Lob being used for streaming you will get the
55505592
error *NJS-023: concurrent operations on a Lob are not allowed*.
@@ -6982,17 +7024,17 @@ When upgrading from node-oracledb version 1.13 to version 2.0:
69827024
also replaces the overloaded use of `maxRows` for
69837025
[`queryStream()`](#querystream). To upgrade scripts:
69847026
6985-
- Replace the property `prefetchRows` with `fetchArraySize` and make
6986-
sure all values are greater than 0.
7027+
- Replace the property `prefetchRows` with `fetchArraySize` and make
7028+
sure all values are greater than 0.
69877029
6988-
- Tune `fetchArraySize` instead of `maxRows` for `queryStream()`.
7030+
- Tune `fetchArraySize` instead of `maxRows` for `queryStream()`.
69897031
6990-
- For [direct fetches](#fetchingrows), optionally tune
6991-
`fetchArraySize`.
7032+
- For [direct fetches](#fetchingrows), optionally tune
7033+
`fetchArraySize`.
69927034
6993-
- For [direct fetches](#fetchingrows), optionally replace enormously
6994-
over-sized `maxRows` values with 0, meaning an unlimited number of
6995-
rows can be returned.
7035+
- For [direct fetches](#fetchingrows), optionally replace enormously
7036+
over-sized `maxRows` values with 0, meaning an unlimited number of
7037+
rows can be returned.
69967038
69977039
- For [direct fetches](#fetchingrows) that relied on the version 1
69987040
default value of [`maxRows`](#propdbmaxrows) to limit the number of
@@ -7019,9 +7061,9 @@ When upgrading from node-oracledb version 2.0 to version 2.1:
70197061
- If using the experimental `_close` method with [Query
70207062
Streaming](#streamingresults) in Node 8 or later:
70217063
7022-
- Change the method name from `_close()` to [`destroy()`][92].
7023-
- Stop passing a callback.
7024-
- Optionally pass an error.
7064+
- Change the method name from `_close()` to [`destroy()`][92].
7065+
- Stop passing a callback.
7066+
- Optionally pass an error.
70257067
70267068
70277069
[1]: https://www.npmjs.com/package/oracledb

0 commit comments

Comments
 (0)