Class TransactionConfigBuilder
The builder to create a TransactionConfig
public sealed class TransactionConfigBuilder
- Inheritance
-
TransactionConfigBuilder
- Inherited Members
- Extension Methods
Methods
- WithMetadata(IDictionary<string, object>)
The transaction metadata. Specified metadata will be attached to the executing transaction and visible in the output ofdbms.listQueriesand
dbms.listTransactionsprocedures. It will also get logged to the
query.log. Transactions starting with this TransactionConfig This functionality makes it easier to tag transactions and is equivalent to
dbms.setTXMetaDataprocedure. Leave this field unmodified to use default timeout configured on database.
- WithTimeout(TimeSpan?)
Sets the transaction timeout. Transactions that execute longer than the configured timeout will be terminated by the database. This functionality allows user code to limit query/transaction execution time. The specified timeout overrides the default timeout configured in the database using thedb.transaction.timeoutsetting (
<pre><code class="lang-csharp">dbms.transaction.timeout</code></pre>before Neo4j 5.0). Values higher than
db.transaction.timeoutwill be ignored and will fall back to default for server versions between 4.2 and 5.2 (inclusive). Leave this field unmodified or set it to
nullto use the default timeout configured on the server. A timeout of zero will make the transaction execute indefinitely.
<p></p> If the timeout is not an exact number of milliseconds, it will be rounded up to the next millisecond.