Feature request: ExecuteScalar<T> and ExecuteScalarAsync<T>
tsanton opened this issue · 2 comments
tsanton commented
Hi,
First of all; great client!
I'm wondering if you would consider altering the ExecuteScalars to accept a generic of type string, int, double, bool etc..?
Typical usages will be select count(1) and the like^^
Will make the code look cleaner if we could remove the type casting.
Wouldn't mind having a crack at it if you're pressed for time.
Speak soon!
/T
fixer-m commented
fixer-m commented
So there is a new public API method ExecuteScalarAsync which can be used like this:
var result = await _snowflakeClient.ExecuteScalarAsync<int>("SELECT 1;");
Assert.AreEqual(1, result);Don't forget to specify correct C# type according to Snowflake value type.
Closing this.