Skip to content

Commit

Permalink
SNOW-973444: Change Prepare to be handled as a Noop (#894)
Browse files Browse the repository at this point in the history
### 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
  • Loading branch information
sfc-gh-jmartinezramirez authored Jul 19, 2024
1 parent 9736edd commit 982a1e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Snowflake.Data.Tests/UnitTests/SFDbCommandTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public void TestCommandExecuteAsyncThrowsExceptionWhenCommandTextIsNotSet()
}

[Test]
public void TestCommandPrepareThrowsNotImplemented()
public void TestCommandPrepareShouldNotThrowsException()
{
Assert.Throws<NotImplementedException>(() => command.Prepare());
Assert.DoesNotThrow(() => command.Prepare());
}
}
}
5 changes: 4 additions & 1 deletion Snowflake.Data/Client/SnowflakeDbCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,12 @@ public override async Task<object> ExecuteScalarAsync(CancellationToken cancella
return DBNull.Value;
}

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

public string GetQueryId()
Expand Down

0 comments on commit 982a1e4

Please sign in to comment.