Skip to content

Commit 79637cf

Browse files
committed
Add note about transactions in db.query
Fixes #799.
1 parent 9de7404 commit 79637cf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/database.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4169,6 +4169,10 @@ export class Database {
41694169
* to create a query string without manually defining bind parameters nor
41704170
* having to worry about escaping variables.
41714171
*
4172+
* **Note**: When executing a query in a streaming transaction using the
4173+
* `step` method, the resulting cursor will be bound to that transaction and
4174+
* you do not need to use the `step` method to consume it.
4175+
*
41724176
* @param query - An object containing an AQL query string and bind
41734177
* parameters, e.g. the object returned from an {@link aql!aql} template string.
41744178
* @param options - Options for the query execution.
@@ -4218,6 +4222,10 @@ export class Database {
42184222
* See the {@link aql!aql} template string handler for a safer and easier
42194223
* alternative to passing strings directly.
42204224
*
4225+
* **Note**: When executing a query in a streaming transaction using the
4226+
* `step` method, the resulting cursor will be bound to that transaction and
4227+
* you do not need to use the `step` method to consume it.
4228+
*
42214229
* @param query - An AQL query string.
42224230
* @param bindVars - An object defining bind parameters for the query.
42234231
* @param options - Options for the query execution.

0 commit comments

Comments
 (0)