@@ -52,8 +52,7 @@ limitations under the License.
52
52
- 3.2.14 [ queueRequests] ( #propdbqueuerequests )
53
53
- 3.2.15 [ queueTimeout] ( #propdbqueuetimeout )
54
54
- 3.2.16 [ stmtCacheSize] ( #propdbstmtcachesize )
55
- - 3.2.17 [ streamNumRows] ( #propdbstreamnumrows )
56
- - 3.2.18 [ version] ( #propdbversion )
55
+ - 3.2.17 [ version] ( #propdbversion )
57
56
- 3.3 [ Oracledb Methods] ( #oracledbmethods )
58
57
- 3.3.1 [ createPool()] ( #createpool )
59
58
- 3.3.2 [ getConnection()] ( #getconnectiondb )
@@ -490,6 +489,9 @@ The default value is 100.
490
489
491
490
This property may be overridden in an [ ` execute() ` ] ( #execute ) call.
492
491
492
+ This property is also used by [ ` queryStream() ` ] ( #querystream ) as an
493
+ internal buffer size tuning parameter.
494
+
493
495
To improve database efficiency, SQL queries should use a row
494
496
limiting clause like [ OFFSET /
495
497
FETCH] ( https://docs.oracle.com/database/121/SQLRF/statements_10002.htm#BABEAACC )
@@ -747,25 +749,7 @@ var oracledb = require('oracledb');
747
749
oracledb .stmtCacheSize = 30 ;
748
750
```
749
751
750
- #### <a name =" propdbstreamnumrows " ></a > 3.2.17 streamNumRows
751
-
752
- A value used when streaming rows with [ ` queryStream() ` ] ( #querystream ) .
753
- It does not limit the total number of rows returned by the stream or
754
- the ` data ` events generated. The value is passed to internal
755
- [ getRows()] ( #getrows ) calls and is used only for tuning.
756
-
757
- The default value is 100.
758
-
759
- This property may be overridden in a [ ` queryStream() ` ] ( #querystream ) call.
760
-
761
- ##### Example
762
-
763
- ``` javascript
764
- var oracledb = require (' oracledb' );
765
- oracledb .streamNumRows = 100 ;
766
- ```
767
-
768
- #### <a name =" propdbversion " ></a > 3.2.18 version
752
+ #### <a name =" propdbversion " ></a > 3.2.17 version
769
753
```
770
754
readonly Number version
771
755
```
@@ -1450,15 +1434,18 @@ Query results must be fetched to completion to avoid resource leaks.
1450
1434
1451
1435
The connection must remain open until the stream is completely read.
1452
1436
1437
+ For tuning purposes the [ ` oracledb.maxRows ` ] ( #propdbmaxrows ) property
1438
+ can be used to size an internal buffer used by ` queryStream() ` . Note
1439
+ it does not limit the number of rows returned by the stream. The
1440
+ [ ` oracledb.prefetchRows ` ] ( #propdbprefetchrows ) value will also affect
1441
+ performance.
1442
+
1453
1443
See [ Streaming Query Results] ( #streamingresults ) for more information.
1454
1444
1455
1445
##### Parameters
1456
1446
1457
1447
See [ execute()] ( #execute ) .
1458
1448
1459
- An additional options attribute ` streamNumRows ` can be set. This
1460
- overrides * Oracledb* [ ` streamNumRows ` ] ( #propdbstreamnumrows ) .
1461
-
1462
1449
#### <a name =" release " ></a > 4.2.5 release()
1463
1450
1464
1451
##### Prototype
@@ -2439,12 +2426,11 @@ The query stream implementation is a wrapper over the
2439
2426
[getRows()](#getrows) are made internally to fetch each successive
2440
2427
subset of data, each row of which will generate a ` data` event. The
2441
2428
number of rows fetched from the database by each ` getRows ()` call is
2442
- specified by the [` oracledb .streamNumRows ` ](#propdbstreamnumrows)
2443
- value or the ` queryStream ()` option attribute ` streamNumRows` . This
2444
- value does not alter the number of rows returned by the stream since
2429
+ set to the value of [` oracledb .maxRows ` ](#propdbmaxrows). This value
2430
+ does not alter the number of rows returned by the stream since
2445
2431
` getRows ()` will be called each time more rows are needed. However
2446
2432
the value can be used to tune performance, as also can the value of
2447
- [` prefetchRows` ](#propdbprefetchrows).
2433
+ [` oracledb . prefetchRows ` ](#propdbprefetchrows).
2448
2434
2449
2435
There is no explicit ResultSet ` close ()` call for streaming query
2450
2436
results. This call will be executed internally when all data has been
@@ -2454,11 +2440,7 @@ data, use a [ResultSet with callbacks](#resultsethandling).
2454
2440
An example of streaming query results is:
2455
2441
2456
2442
` ` ` javascript
2457
- var stream = connection .queryStream (' SELECT employees_name FROM employees' ,
2458
- [], // no bind variables
2459
- { streamNumRows: 100 } // Used for tuning. Does not affect how many rows are returned.
2460
- // Default is 100
2461
- );
2443
+ var stream = connection .queryStream (' SELECT employees_name FROM employees' );
2462
2444
2463
2445
stream .on (' error' , function (error ) {
2464
2446
// handle any error...
0 commit comments