diff --git a/CHANGELOG.md b/CHANGELOG.md index 82e9c463..c7d08bf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +* Changed InvalidCastException to InvalidOperationException in YdbParameter. +* Added specification tests: YdbCommandTests and YdbParameterTests. +* YdbConnection.Database returns string.Empty if ConnectionStringBuilder is null. +* Propagated cancellationToken in Execute[.*]Async methods. +* When YdbCommand has an open data reader, it throws InvalidOperationException on the setters: CommandText, DbConnection. +* Added checkers to YdbCommand.Prepare(). +* CommandText getter doesn't throw an exception if the CommandText property has not been initialized. + ## v0.11.0 * Fix bug: GetValue(int ordinal) return DBNull.Value if fetched NULL value. * Fix: NextResult() moves to the next result and skip the first ResultSet. diff --git a/src/Ydb.Sdk/src/Ado/YdbCommand.cs b/src/Ydb.Sdk/src/Ado/YdbCommand.cs index 946304a3..01ffbca0 100644 --- a/src/Ydb.Sdk/src/Ado/YdbCommand.cs +++ b/src/Ydb.Sdk/src/Ado/YdbCommand.cs @@ -87,7 +87,7 @@ public override string CommandText [param: AllowNull] set { - if (_ydbConnection?.LastReader?.IsOpen ?? false) + if (_ydbConnection?.IsBusy ?? false) { throw new InvalidOperationException("An open data reader exists for this command"); }