You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add ability to set per-request requestTimeout
Adds an optional overrides object that can be passed to Request,
Transaction and PreparedStatement objects to provide per-instance
config overrides. Currently supports requestTimeout.
- Transaction overrides cascade to child requests unless overridden
- PreparedStatement overrides apply to prepare, execute and unprepare
- Validates timeout is a finite non-negative number
- Fixes missing setTimeout in tedious stored procedure path (_execute)
Closes#1529
-**recordset(columns)** - Dispatched when metadata for new recordset are parsed.
@@ -1118,11 +1127,13 @@ request.cancel()
1118
1127
**IMPORTANT:** always use `Transaction` class to create transactions - it ensures that all your requests are executed on one connection. Once you call `begin`, a single connection is acquired from the connection pool and all subsequent requests (initialized with the `Transaction` object) are executed exclusively on this connection. After you call `commit` or `rollback`, connection is then released back to the connection pool.
If you omit connection argument, global connection is used instead.
1125
1134
1135
+
The optional `options` argument allows per-transaction configuration overrides (e.g. `{ requestTimeout: 60000 }`). These are inherited by any requests created from this transaction unless overridden at the request level. Note that the timeout applies to data requests only, not to the `begin`/`commit`/`rollback` operations themselves.
1136
+
1126
1137
__Example__
1127
1138
1128
1139
```javascript
@@ -1270,11 +1281,13 @@ __Errors__
1270
1281
**IMPORTANT:** always use `PreparedStatement` class to create prepared statements - it ensures that all your executions of prepared statement are executed on one connection. Once you call `prepare`, a single connection is acquired from the connection pool and all subsequent executions are executed exclusively on this connection. After you call `unprepare`, the connection is then released back to the connection pool.
If you omit the connection argument, the global connection is used instead.
1277
1288
1289
+
The optional `options` argument allows per-statement configuration overrides (e.g. `{ requestTimeout: 60000 }`). The timeout is applied to the `prepare`, `execute`, and `unprepare` operations.
0 commit comments