snowflakedb / snowflake-connector-net

Snowflake Connector for .NET
Apache License 2.0
175 stars 135 forks source link

SNOW-970839: Prepare should not throw #812

Closed mgravell closed 1 month ago

mgravell commented 9 months ago

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.

sfc-gh-dszmolka commented 9 months ago

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.

sfc-gh-dszmolka commented 5 months ago

PR in review https://github.com/snowflakedb/snowflake-connector-net/pull/894

sfc-gh-dszmolka commented 1 month ago

fix is merged and will be part of the next driver release

sfc-gh-dszmolka commented 1 month ago

released with v4.1.0 of the Snowflake .NET driver