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.
@@ -1144,11 +1153,13 @@ request.cancel()
1144
1153
**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.
1151
1160
1161
+
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.
1162
+
1152
1163
__Example__
1153
1164
1154
1165
```javascript
@@ -1296,11 +1307,13 @@ __Errors__
1296
1307
**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.
1303
1314
1315
+
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