MCPcopy Create free account
hub / github.com/cinience/RedisStudio / OnKeyDel

Method OnKeyDel

RedisStudio/RedisDataUI.cpp:869–886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

867}
868
869LRESULT RedisDataUI::OnKeyDel( HWND hwnd, WPARAM wParam, LPARAM lParam )
870{
871 CTreeNodeUI* pNode = reinterpret_cast<CTreeNodeUI*>(wParam);
872 CTreeNodeUI* pPNode;
873 CDuiString a = pNode->GetItemText();
874 std::string key = Base::CharacterSet::UnicodeToANSI(pNode->GetItemText().GetData());
875 /// 暂时用同步方法删除,大数据时会有卡顿
876 DBClient* cli = Env()->GetDBClient();
877 if (!cli || !cli->DelKey(key)) return FALSE;
878 while (pNode)
879 {
880 if (pNode->IsHasChild() || pNode->GetTag()>0) break;
881 pPNode = pNode->GetParentNode();
882 pPNode->Remove(pNode);
883 pNode = pPNode;
884 }
885 return TRUE;
886}
887
888LRESULT RedisDataUI::OnKeyVerbose(HWND hwnd, WPARAM wParam, LPARAM lParam)
889{

Callers

nothing calls this directly

Calls 8

GetDBClientMethod · 0.80
IsHasChildMethod · 0.80
GetTagMethod · 0.80
GetParentNodeMethod · 0.80
GetItemTextMethod · 0.45
GetDataMethod · 0.45
DelKeyMethod · 0.45
RemoveMethod · 0.45

Tested by

no test coverage detected