edgedb / edgedb-net

The official .NET client library for EdgeDB
https://edgedb.com
Apache License 2.0
83 stars 9 forks source link

Feature: configure state in transactions #44

Open quinchs opened 1 year ago

quinchs commented 1 year ago

Currently, there's no way to configure state within transactions. The API for state on the client should be accessible on the tx object like so:

var result = await client.TransactionAsync(async (tx) =>
    tx.WithGlobals(new Dictionary<string, object>
    {
        { "abc": 123L }    
    })
    .QuerySingleAsync<long>("select global abc")
);