@@ -111,11 +111,12 @@ limitations under the License.
111
111
4 . [ Connection Class] ( #connectionclass )
112
112
- 4.1 [ Connection Properties] ( #connectionproperties )
113
113
- 4.1.1 [ ` action ` ] ( #propconnaction )
114
- - 4.1.2 [ ` clientId ` ] ( #propconnclientid )
115
- - 4.1.3 [ ` module ` ] ( #propconnmodule )
116
- - 4.1.4 [ ` oracleServerVersion ` ] ( #propconnoracleserverversion )
117
- - 4.1.5 [ ` oracleServerVersionString ` ] ( #propconnoracleserverversionstring )
118
- - 4.1.6 [ ` stmtCacheSize ` ] ( #propconnstmtcachesize )
114
+ - 4.1.2 [ ` callTimeout ` ] ( #propconncalltimeout )
115
+ - 4.1.3 [ ` clientId ` ] ( #propconnclientid )
116
+ - 4.1.4 [ ` module ` ] ( #propconnmodule )
117
+ - 4.1.5 [ ` oracleServerVersion ` ] ( #propconnoracleserverversion )
118
+ - 4.1.6 [ ` oracleServerVersionString ` ] ( #propconnoracleserverversionstring )
119
+ - 4.1.7 [ ` stmtCacheSize ` ] ( #propconnstmtcachesize )
119
120
- 4.2 [ Connection Methods] ( #connectionmethods )
120
121
- 4.2.1 [ ` break() ` ] ( #break )
121
122
- 4.2.2 [ ` changePassword() ` ] ( #changepassword )
@@ -232,6 +233,7 @@ limitations under the License.
232
233
- 8.9 [ Connections and High Availability] ( #connectionha )
233
234
- 8.9.1 [ Fast Application Notification (FAN)] ( #connectionfan )
234
235
- 8.9.2 [ Runtime Load Balancing (RLB)] ( #connectionrlb )
236
+ - 8.9.3 [ Database Call Timeouts] ( #dbcalltimeouts )
235
237
- 8.10 [ Optional Client Configuration Files] ( #tnsadmin )
236
238
9 . [ SQL Execution] ( #sqlexecution )
237
239
- 9.1 [ SELECT Statements] ( #select )
@@ -1187,7 +1189,7 @@ This property may be overridden when [creating a connection pool](#createpool).
1187
1189
See [ Connection Pool Pinging] ( #connpoolpinging ) for more discussion.
1188
1190
1189
1191
This property was added in node-oracledb 1.12. It was disabled when
1190
- using Oracle Client 12.2+ until node-oracledb 3.0.
1192
+ using Oracle Client 12.2 (and later) until node-oracledb 3.0.
1191
1193
1192
1194
##### Example
1193
1195
@@ -1946,7 +1948,26 @@ This is a write-only property. Displaying a Connection object will
1946
1948
show a value of ` null ` for this attribute. See
1947
1949
[ End-to-end Tracing, Mid-tier Authentication, and Auditing] ( #endtoend ) .
1948
1950
1949
- #### <a name =" propconnclientid " ></a > 4.1.2 ` connection.clientId `
1951
+ #### <a name =" propconncalltimeout " ></a > 4.1.2 ` connection.callTimeout `
1952
+
1953
+ ```
1954
+ Number callTimeout
1955
+ ```
1956
+
1957
+ Sets the maximum number of milliseconds that each underlying
1958
+ round-trip between node-oracledb and Oracle Database may take. Each
1959
+ node-oracledb method or operation may make zero or more round-trips.
1960
+ The ` callTimeout ` value applies to each round-trip individually, not
1961
+ to the sum of all round-trips. Time spent processing in node-oracledb
1962
+ before or after the completion of each round-trip is not counted.
1963
+
1964
+ See [ Database Call Timeouts] ( #dbcalltimeouts ) for more information.
1965
+
1966
+ This property was added in node-oracledb 3.0. An exception will occur
1967
+ if node-oracledb is not using Oracle client library version 18.1 or
1968
+ later.
1969
+
1970
+ #### <a name =" propconnclientid " ></a > 4.1.3 ` connection.clientId `
1950
1971
1951
1972
```
1952
1973
writeonly String clientId
@@ -1960,7 +1981,7 @@ This is a write-only property. Displaying a Connection object will
1960
1981
show a value of ` null ` for this attribute. See
1961
1982
[ End-to-end Tracing, Mid-tier Authentication, and Auditing] ( #endtoend ) .
1962
1983
1963
- #### <a name =" propconnmodule " ></a > 4.1.3 ` connection.module `
1984
+ #### <a name =" propconnmodule " ></a > 4.1.4 ` connection.module `
1964
1985
1965
1986
```
1966
1987
writeonly String module
@@ -1972,7 +1993,7 @@ This is a write-only property. Displaying a Connection object will
1972
1993
show a value of ` null ` for this attribute. See
1973
1994
[ End-to-end Tracing, Mid-tier Authentication, and Auditing] ( #endtoend ) .
1974
1995
1975
- #### <a name =" propconnoracleserverversion " ></a > 4.1.4 ` connection.oracleServerVersion `
1996
+ #### <a name =" propconnoracleserverversion " ></a > 4.1.5 ` connection.oracleServerVersion `
1976
1997
1977
1998
```
1978
1999
readonly Number oracleServerVersion
@@ -1988,7 +2009,7 @@ instead of 1803000000.
1988
2009
1989
2010
This property was added in node-oracledb 1.3.
1990
2011
1991
- #### <a name =" propconnoracleserverversionstring " ></a > 4.1.5 ` connection.oracleServerVersionString `
2012
+ #### <a name =" propconnoracleserverversionstring " ></a > 4.1.6 ` connection.oracleServerVersionString `
1992
2013
1993
2014
```
1994
2015
readonly String oracleServerVersionString
@@ -2003,7 +2024,7 @@ libraries. Otherwise it will show the base release such as
2003
2024
2004
2025
This property was added in node-oracledb 2.2.
2005
2026
2006
- #### <a name =" propconnstmtcachesize " ></a > 4.1.6 ` connection.stmtCacheSize `
2027
+ #### <a name =" propconnstmtcachesize " ></a > 4.1.7 ` connection.stmtCacheSize `
2007
2028
2008
2029
```
2009
2030
readonly Number stmtCacheSize
@@ -4879,7 +4900,6 @@ application being aware of any service disruption.
4879
4900
For a more information on FAN see the [whitepaper on Fast Application
4880
4901
Notification][97].
4881
4902
4882
-
4883
4903
#### <a name="connectionrlb"></a> 8.9.2 Runtime Load Balancing (RLB)
4884
4904
4885
4905
[Oracle Database RAC][93] users with [Oracle Database (RLB)][65]
@@ -4894,6 +4914,44 @@ requests across RAC instances.
4894
4914
For a more information on RLB, see the [whitepaper on Fast Application
4895
4915
Notification][97].
4896
4916
4917
+ #### <a name="dbcalltimeouts"></a> 8.9.3 Database Call Timeouts
4918
+
4919
+ When node-oracledb is using Oracle client 18 libraries, a millisecond
4920
+ timeout for database calls can be set with
4921
+ [` connection .callTimeout ` ](#propconncalltimeout).
4922
+
4923
+ The call timeout is on each individual round-trip between
4924
+ node-oracledb and Oracle Database. Each node-oracledb method or
4925
+ operation may require zero or more round-trips to Oracle Database.
4926
+ The ` callTimeout` value applies to each round-trip individually, not
4927
+ to the sum of all round-trips. Time spent processing in node-oracledb
4928
+ before or after the completion of each round-trip is not counted.
4929
+
4930
+ - If the time from the start of any one round-trip to the completion
4931
+ of that same round-trip exceeds ` callTimeout` milliseconds, then the
4932
+ operation is halted and error "DPI-1067: call timeout of N ms exceeded
4933
+ with ORA-XXX" is returned.
4934
+
4935
+ - In the case where a node-oracledb operation requires more than one
4936
+ round-trip and each round-trip takes less than ` callTimeout`
4937
+ milliseconds, then no timeout will occur, even if the sum of all
4938
+ round-trip calls exceeds ` callTimeout` .
4939
+
4940
+ - If no round-trip is required, the operation will never be
4941
+ interrupted.
4942
+
4943
+ After a timeout occurs, node-oracledb attempts to clean up the
4944
+ internal connection state. The cleanup is allowed to take another
4945
+ ` callTimeout` milliseconds.
4946
+
4947
+ If the cleanup was successful, an *DPI-1067* error will be returned and the
4948
+ application can continue to use the connection.
4949
+
4950
+ For small values of ` callTimeout` , the connection cleanup may not
4951
+ complete successfully within the additional ` callTimeout` period. In
4952
+ this case an *ORA-3114* is returned and the connection will no longer
4953
+ be usable. It should be closed.
4954
+
4897
4955
### <a name="tnsadmin"></a> 8.10 Optional Client Configuration Files
4898
4956
4899
4957
Optional Oracle Client configuration files are read when node-oracledb
0 commit comments