@@ -750,10 +750,9 @@ oracledb.stmtCacheSize = 30;
750
750
#### <a name =" propdbstreamnumrows " ></a > 3.2.17 streamNumRows
751
751
752
752
A value used when streaming rows with [ ` queryStream() ` ] ( #querystream ) .
753
- It does not limit the total number of rows returned by the stream.
754
- The value is passed to internal [ getRows()] ( #getrows ) calls and is
755
- used only for tuning because ` getRows() ` may be internally called one
756
- or more times when streaming results.
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.
757
756
758
757
The default value is 100.
759
758
@@ -1434,20 +1433,28 @@ stream.Readable queryStream(String sql, [Object bindParams, [Object options]]);
1434
1433
1435
1434
##### Return Value
1436
1435
1437
- This function will return a readable stream for queries.
1436
+ This function will return a
1437
+ [ Readable Stream] ( https://nodejs.org/api/stream.html ) for queries.
1438
1438
1439
1439
##### Description
1440
1440
1441
- This function provides query streaming support. The input of this
1442
- function is same as ` execute() ` however a callback is not used.
1443
- Instead this function returns a stream used to fetch data. See
1444
- [ Streaming Results] ( #streamingresults ) for more information.
1441
+ This function provides query streaming support. The parameters are
1442
+ the same as [ ` execute() ` ] ( #execute ) except a callback is not used.
1443
+ Instead this function returns a stream used to fetch data.
1444
+
1445
+ Each row is returned as a ` data ` event. Query metadata is available
1446
+ via a ` metadata ` event. The ` end ` event indicates the end of the
1447
+ query results.
1448
+
1449
+ Query results must be fetched to completion to avoid resource leaks.
1445
1450
1446
1451
The connection must remain open until the stream is completely read.
1447
1452
1453
+ See [ Streaming Query Results] ( #streamingresults ) for more information.
1454
+
1448
1455
##### Parameters
1449
1456
1450
- See [ connection. execute()] ( #execute ) .
1457
+ See [ execute()] ( #execute ) .
1451
1458
1452
1459
An additional options attribute ` streamNumRows ` can be set. This
1453
1460
overrides * Oracledb* [ ` streamNumRows ` ] ( #propdbstreamnumrows ) .
@@ -2436,7 +2443,8 @@ specified by the [`oracledb.streamNumRows`](#propdbstreamnumrows)
2436
2443
value or the ` queryStream ()` option attribute ` streamNumRows` . This
2437
2444
value does not alter the number of rows returned by the stream since
2438
2445
` getRows ()` will be called each time more rows are needed. However
2439
- the value can be used to tune performance.
2446
+ the value can be used to tune performance, as also can the value of
2447
+ [` prefetchRows` ](#propdbprefetchrows).
2440
2448
2441
2449
There is no explicit ResultSet ` close ()` call for streaming query
2442
2450
results. This call will be executed internally when all data has been
@@ -3014,7 +3022,7 @@ Lob switches to flowing mode.
3014
3022
For unpiped Readable Lobs operating in flowing mode where the Lob is
3015
3023
read through event handlers, the Lob object can be switched to paused
3016
3024
mode by calling ` pause ()` . Once the Lob is in paused mode, it stops
3017
- emitting ' data' events.
3025
+ emitting ` data` events.
3018
3026
3019
3027
Similarly, a Readable Lob operating in the paused mode can be switched
3020
3028
to flowing mode by calling ` resume ()` . It will then start emitting
0 commit comments