Closed tsanton closed 1 year ago
@Tsanton Hi! Thanks, that's a nice improvement. This is implemented now in 0.4.4. Commit: https://github.com/fixer-m/snowflake-db-net-client/commit/ebac54f2100a108aec9f50354e0c4f61f75351a4
So there is a new public API method ExecuteScalarAsync
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.
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