From 9dead635211b87455c488dd354e1378649bbd03e Mon Sep 17 00:00:00 2001 From: Juan Martinez Ramirez Date: Wed, 20 Mar 2024 07:17:03 -0600 Subject: [PATCH 1/3] Change Prepare to be handled as a Noop --- Snowflake.Data/Client/SnowflakeDbCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Snowflake.Data/Client/SnowflakeDbCommand.cs b/Snowflake.Data/Client/SnowflakeDbCommand.cs index 15d8e0870..6445e1e31 100755 --- a/Snowflake.Data/Client/SnowflakeDbCommand.cs +++ b/Snowflake.Data/Client/SnowflakeDbCommand.cs @@ -241,7 +241,7 @@ public override async Task ExecuteScalarAsync(CancellationToken cancella public override void Prepare() { - throw new NotImplementedException(); + // Currently handled as a Noop } public string GetQueryId() From fbfa8d67ced11ec49f8953fc5469409e1c9ecf90 Mon Sep 17 00:00:00 2001 From: Juan Martinez Ramirez Date: Wed, 20 Mar 2024 08:29:48 -0600 Subject: [PATCH 2/3] Updated test to validate that not throws any exception --- Snowflake.Data.Tests/UnitTests/SFDbCommandTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Snowflake.Data.Tests/UnitTests/SFDbCommandTest.cs b/Snowflake.Data.Tests/UnitTests/SFDbCommandTest.cs index 714d237d2..e595002ad 100644 --- a/Snowflake.Data.Tests/UnitTests/SFDbCommandTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFDbCommandTest.cs @@ -60,9 +60,9 @@ public void TestCommandExecuteAsyncThrowsExceptionWhenCommandTextIsNotSet() } [Test] - public void TestCommandPrepareThrowsNotImplemented() + public void TestCommandPrepareShouldNotThrowsException() { - Assert.Throws(() => command.Prepare()); + Assert.DoesNotThrow(() => command.Prepare()); } } } From 13f2a30de0f922636ab1fb9752f1b3f0d188a60a Mon Sep 17 00:00:00 2001 From: Juan Martinez Ramirez Date: Thu, 18 Jul 2024 07:01:48 -0600 Subject: [PATCH 3/3] Applying PR suggestions --- Snowflake.Data/Client/SnowflakeDbCommand.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Snowflake.Data/Client/SnowflakeDbCommand.cs b/Snowflake.Data/Client/SnowflakeDbCommand.cs index 6445e1e31..b52d53643 100755 --- a/Snowflake.Data/Client/SnowflakeDbCommand.cs +++ b/Snowflake.Data/Client/SnowflakeDbCommand.cs @@ -239,9 +239,12 @@ public override async Task ExecuteScalarAsync(CancellationToken cancella return DBNull.Value; } + /// + /// Prepares the command for execution. + /// This method is currently not implemented and acts as a no-operation (Noop). + /// public override void Prepare() { - // Currently handled as a Noop } public string GetQueryId()