Async DbCommand methods
I have been told that the code at the bottom is Targit code.
Is there any plans on using the async methods on the command? Like command.ExecuteReaderAsync ?
That way I could just override those in my custom ADO provider, rather than starting a new Task manually.
public static InMemoryTable genInmemoryTable(
string p_tableName,
DbConnection conn,
string sql,
bool compileTable,
CancellationToken token)
{
Timer delta = new Timer();
if (!InMemoryDatabase.DisableTimers)
delta.start();
DbCommand command = conn.CreateCommand();
command.CommandText = sql;
command.CommandType = CommandType.Text;
command.CommandTimeout = InMemoryDatabase.ImportTimeout;
DbDataReader reader = command.ExecuteReader();
InMemoryTable inMemoryTable = new InMemoryTable(p_tableName, reader, compileTable, token);
reader.Dispose();
command.Dispose();
if (!InMemoryDatabase.DisableTimers)
{
delta.stop();
InMemoryDatabase.loadingTimer.addElapsed(delta);
}
return inMemoryTable;
}
Comments
Hi Kenneth,
I am forwarding this reply from our developers:
It is not something we can do now, but... "We could do an implementation using a task approach, more as a helper type implementation. Full Async support would be a bigger job."
May I suggest that you add it to our Feature requests list? https://community.targit.com/hc/en-us/community/topics/7278561562141-Feature-requests-Ideas
BR / Ole
Please sign in to leave a comment.