RelationalAI / rai-sdk-csharp

The RelationalAI Software Development Kit (SDK) for C#
Apache License 2.0
0 stars 1 forks source link

RelationReader implementation #31

Open NRHelmi opened 2 years ago

NRHelmi commented 2 years ago

This PR adds RelationReader implementation to csharp sdk reader.Tuples(), reader.Tuple(int index), reader.ColumnCount(), reader.TupleCount(), reader.Physical() & reader.Print() Please check the RelationReader integration tests for more examples :pray:

var rsp = await client.ExecuteWaitAsync(database, engine, "(1, 2, 3); (:a, :b, :c)");
foreach (var result in rsp.Results)
{
  var reader = new RelationReader(result);
  reader.Print();
}

 ------------------------------------- 
 | String | String | String | String |
 ------------------------------------- 
 | output | a      | b      | c      |
 ------------------------------------- 

 ---------------------------------- 
 | String | Int64 | Int64 | Int64 |
 ---------------------------------- 
 | output | 1     | 2     | 3     |
 ----------------------------------