From: jeremy-jang <35089715+jeremy-jang@users.noreply.github.com> Date: Fri, 8 Sep 2023 04:03:57 +0000 (+0900) Subject: [Tdbc] Fix sqlite driver (#5539) X-Git-Tag: accepted/tizen/unified/20231205.024657~157 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d832c70fe3ab09f123cc779bdfa256c7450e3cd;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Tdbc] Fix sqlite driver (#5539) When the operation type is delete, the empty record will be passed to callback. Signed-off-by: Sangyoon Jang --- diff --git a/src/Tizen.Data.Tdbc.Driver.Sqlite/Tizen.Data.Tdbc.Driver.Sqlite/Connection.cs b/src/Tizen.Data.Tdbc.Driver.Sqlite/Tizen.Data.Tdbc.Driver.Sqlite/Connection.cs index 8177fa2..b1463f6 100644 --- a/src/Tizen.Data.Tdbc.Driver.Sqlite/Tizen.Data.Tdbc.Driver.Sqlite/Connection.cs +++ b/src/Tizen.Data.Tdbc.Driver.Sqlite/Tizen.Data.Tdbc.Driver.Sqlite/Connection.cs @@ -89,14 +89,11 @@ namespace Tizen.Data.Tdbc.Driver.Sqlite break; } - if (operationType == OperationType.Delete) - return; - Sql sql = new Sql(string.Format("SELECT * from {0} WHERE rowid = {1}", table_name, rowid)); using (IStatement stmt = CreateStatement()) using (IResultSet resultSet = stmt.ExecuteQuery(sql)) { - IRecord record = resultSet.FirstOrDefault(); + IRecord record = resultSet?.FirstOrDefault(); lock (_lock) { RecordChangedEventArgs ev = new RecordChangedEventArgs(operationType, db_name, table_name, record);