Skip to content

Commit

Permalink
[Tdbc] Fix static analysis issue (Samsung#5497)
Browse files Browse the repository at this point in the history
Signed-off-by: Sangyoon Jang <[email protected]>
Co-authored-by: sukhyungkang <[email protected]>
Co-authored-by: pjh9216 <[email protected]>
  • Loading branch information
3 people authored Aug 23, 2023
1 parent 8b85c3c commit fa35eac
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,17 @@ private void UpdateHookCallback(IntPtr data, int action, string db_name, string
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 = (operationType != OperationType.Delete ? stmt.ExecuteQuery(sql).FirstOrDefault() : null);
RecordChangedEventArgs ev = new RecordChangedEventArgs(operationType, db_name, table_name, record);
IRecord record = resultSet.FirstOrDefault();
lock (_lock)
{
RecordChangedEventArgs ev = new RecordChangedEventArgs(operationType, db_name, table_name, record);
_recordChanged?.Invoke(this, ev);
}
}
Expand Down

0 comments on commit fa35eac

Please sign in to comment.