internal static async Task <List <T> > ReadTransactionAsList <T>(this IAsyncTransaction tx, string query, object parameters, Func <IResultCursor, T> conversionFunction) { var cursor = await tx.RunAsync(query, parameters); var fetched = await cursor.FetchAsync(); var output = new List <T>(); while (fetched) { output.Add(conversionFunction(cursor)); fetched = await cursor.FetchAsync(); } return(output); }
public IRxStatementResult Run(Statement statement) { return(new InternalRxStatementResult(Observable.FromAsync(() => _transaction.RunAsync(statement)) .Cast <IInternalStatementResultCursor>())); }