snowflake-connector-net
snowflake-connector-net copied to clipboard
SNOW-970839: Prepare should not throw
Currently, DbCommand.Prepare
is implemented as a throw: https://github.com/snowflakedb/snowflake-connector-net/blob/master/Snowflake.Data/Client/SnowflakeDbCommand.cs#L236-L239
If Prepare()
is not required, IMO this should be a simple no-op; callers may not know what specific provider library is being used (think "Dapper" etc), so the API should be usable even if it does nothing when not required.
hi and thank you for raising this issue ! I see your point, however not entirely sure if this is a bug - we're going to take a look regardless.
PR in review https://github.com/snowflakedb/snowflake-connector-net/pull/894
fix is merged and will be part of the next driver release
released with v4.1.0 of the Snowflake .NET driver