Skip to content

Commit 982a1e4

Browse files
SNOW-973444: Change Prepare to be handled as a Noop (#894)
### Description Change Prepare method to be handled as a noop, removed throw NotImplementedException. ### Checklist - [x] Code compiles correctly - [x] Code is formatted according to [Coding Conventions](../CodingConventions.md) - [x] Created tests which fail without the change (if possible) - [x] All tests passing (`dotnet test`) - [x] Extended the README / documentation, if necessary - [x] Provide JIRA issue id (if possible) or GitHub issue id in PR name
1 parent 9736edd commit 982a1e4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Snowflake.Data.Tests/UnitTests/SFDbCommandTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ public void TestCommandExecuteAsyncThrowsExceptionWhenCommandTextIsNotSet()
6060
}
6161

6262
[Test]
63-
public void TestCommandPrepareThrowsNotImplemented()
63+
public void TestCommandPrepareShouldNotThrowsException()
6464
{
65-
Assert.Throws<NotImplementedException>(() => command.Prepare());
65+
Assert.DoesNotThrow(() => command.Prepare());
6666
}
6767
}
6868
}

Snowflake.Data/Client/SnowflakeDbCommand.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,12 @@ public override async Task<object> ExecuteScalarAsync(CancellationToken cancella
239239
return DBNull.Value;
240240
}
241241

242+
/// <summary>
243+
/// Prepares the command for execution.
244+
/// This method is currently not implemented and acts as a no-operation (Noop).
245+
/// </summary>
242246
public override void Prepare()
243247
{
244-
throw new NotImplementedException();
245248
}
246249

247250
public string GetQueryId()

0 commit comments

Comments
 (0)