]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOSQLiteTreeHandler.cpp
Added Settings dialog, customize configuration options and the listener on an externa...
[creaImageIO.git] / src2 / creaImageIOSQLiteTreeHandler.cpp
index 14bb3db2476d9f31ce80372afbe1993b2b21eb3d..6d4d25b9ce249d2ce1023d33d72cba8b75feeb04 100644 (file)
@@ -149,7 +149,7 @@ namespace creaImageIO
     if (parent)
       {
        int nC = parent->RemoveChildrenFromList(node);
-       if(nC>0)
+       if(nC>0 && parent->GetLevel()>0)
        {       
                std::stringstream out;
                out <<nC;
@@ -892,6 +892,7 @@ namespace creaImageIO
        sql += " = '";
     sql += searchVal;
        sql += "'";
+       std::cout<<sql<<std::endl;
     UPDATEDB(sql);
   }
    //=====================================================================
@@ -1080,6 +1081,17 @@ namespace creaImageIO
 
   }
 
+  //=====================================================================
+  void SQLiteTreeHandler::RemoveEntries(const std::string i_table, 
+               const std::string i_attribute, 
+               const std::string i_operand, 
+               const std::string i_val)
+    {
+        std::stringstream query;
+               query<<"DELETE  FROM "<<i_table<<" WHERE "<<i_attribute<<" "<<i_operand<<" '"<<i_val<<"'";
+        UPDATEDB(query.str());
+       }
+
   /*
   //=====================================================================
   bool SQLiteTreeHandler::DBInsert(Node* alien_node,