DotNet4Neo4j / Neo4jClient

.NET client binding for Neo4j
https://www.nuget.org/packages/Neo4jClient
Microsoft Public License
431 stars 146 forks source link

Set transaction timeout? #441

Open DarthSonic opened 2 years ago

DarthSonic commented 2 years ago

Describe the bug I cannot see any property or method to set transaction timeout.

Versions:

Expected behaviour Beeing able to set transaction timeout other than the default 60 seconds either in connection or for current transaction.

DarthSonic commented 2 years ago

Also it would be great to get an property if transaction is still active or timed out:

            if (_graphClient.Tx.InTransaction)
                await _graphClient.Tx.Transaction.KeepAliveAsync();

Will throw exception on KeepAliveAsync if timed out. Better to use like:

            if (_graphClient.Tx.InTransaction && _graphClient.Tx.IsActive)
                await _graphClient.Tx.Transaction.KeepAliveAsync();