snowflake-connector-net icon indicating copy to clipboard operation
snowflake-connector-net copied to clipboard

SNOW-970839: Prepare should not throw

Open mgravell opened this issue 1 year ago • 2 comments

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.

mgravell avatar Nov 15 '23 08:11 mgravell

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 avatar Nov 17 '23 11:11 sfc-gh-dszmolka

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

sfc-gh-dszmolka avatar Mar 20 '24 14:03 sfc-gh-dszmolka

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

sfc-gh-dszmolka avatar Jul 21 '24 06:07 sfc-gh-dszmolka

released with v4.1.0 of the Snowflake .NET driver

sfc-gh-dszmolka avatar Aug 06 '24 07:08 sfc-gh-dszmolka