neo4j / neo4j-javascript-driver

Neo4j Bolt driver for JavaScript
https://neo4j.com/docs/javascript-manual/current/
Apache License 2.0
853 stars 148 forks source link

Introduce `transactionConfig` to `Driver.executeQuery` #1160

Closed bigmontz closed 10 months ago

bigmontz commented 10 months ago

Transaction config enables the user to configure timeouts and set metadata for the transaction.

This configuration is already present in APIs such as Session.executeRead and Session.executeWrite.

Usage example:

const { records } = await driver.executeQuery(myQuery, myParams, {
    database: 'neo4j',
    transactionConfig: {
        timeout: 3000,
        metadata: { key: 'value' }
    }
})