gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-schemafuzz] branch master updated: fixed minor bugs.


From: gnunet
Subject: [GNUnet-SVN] [taler-schemafuzz] branch master updated: fixed minor bugs.seems to be working flawlessly.
Date: Tue, 12 Jun 2018 13:54:29 +0200

This is an automated email from the git hooks/post-receive script.

erwan-ulrich pushed a commit to branch master
in repository schemafuzz.

The following commit(s) were added to refs/heads/master by this push:
     new 0d92809  fixed minor bugs.seems to be working flawlessly.
0d92809 is described below

commit 0d92809a929e9cea852d30e018db8059c7608972
Author: Feideus <address@hidden>
AuthorDate: Tue Jun 12 13:54:23 2018 +0200

    fixed minor bugs.seems to be working flawlessly.
---
 TODO.txt                                           |  1 -
 .../java/org/schemaspy/model/GenericTreeNode.java  | 27 +++++++++++-----------
 src/main/java/org/schemaspy/model/Row.java         |  6 +++--
 3 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/TODO.txt b/TODO.txt
index 1e12e98..33b36bd 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -3,7 +3,6 @@ MANUAL FOR USE
 WEBSITE
 TEST CASES/ UNIT TESTING INTEGRATION TESTING
 VARCHAR CLASSIFIER (LATER)
-ADD MULTI TABLE/ROW SUPPORT TO THE TREE
 MORE TYPES
 MORE DB TYPES  
 
diff --git a/src/main/java/org/schemaspy/model/GenericTreeNode.java 
b/src/main/java/org/schemaspy/model/GenericTreeNode.java
index 2174d84..5a5025c 100644
--- a/src/main/java/org/schemaspy/model/GenericTreeNode.java
+++ b/src/main/java/org/schemaspy/model/GenericTreeNode.java
@@ -417,19 +417,20 @@ public class GenericTreeNode {
             {
                 if 
(!entry.getKey().equals(chosenChange.getParentTableColumn().getName()))
                 {
-                    if 
(chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("varchar")
-                            || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("bool")
-                            || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("timestamp")
-                            || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("date")
-                            || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("_text")
-                            || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("text")
-                            || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("fulltext")
-                            || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("email"))
-                    {
-                        if(entry.getValue() != null )
-                            theQuery = theQuery + (entry.getKey() + "='" + 
entry.getValue().toString() + "' AND ");
-                        else
-                            theQuery = theQuery + (entry.getKey() + "= null 
AND ");
+                    
if(chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()) != 
null) {// not very good, check why the field is null in the first place
+                        if 
(chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("varchar")
+                                || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("bool")
+                                || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("timestamp")
+                                || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("date")
+                                || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("_text")
+                                || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("text")
+                                || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("fulltext")
+                                || 
chosenChange.getParentTableColumn().getTable().getColumn(entry.getKey()).getTypeName().equals("email"))
 {
+                            if (entry.getValue() != null)
+                                theQuery = theQuery + (entry.getKey() + "='" + 
entry.getValue().toString() + "' AND ");
+                            else
+                                theQuery = theQuery + (entry.getKey() + "= 
null AND ");
+                        }
                     }
                 }
                 else
diff --git a/src/main/java/org/schemaspy/model/Row.java 
b/src/main/java/org/schemaspy/model/Row.java
index a5858d7..a3d3ea3 100644
--- a/src/main/java/org/schemaspy/model/Row.java
+++ b/src/main/java/org/schemaspy/model/Row.java
@@ -92,17 +92,19 @@ public class Row
 
   public boolean compare(Row initial_state_row)
   {
-
     if(content.size() != initial_state_row.getContent().size())
       return false;
 
     for(Map.Entry<String,Object> entry : content.entrySet())
     {
+      if(initial_state_row.getContent().get(entry.getKey()) == null )
+        return false;
+
       if(!initial_state_row.getContent().containsKey(entry.getKey()))
         return false;
 
       
if(!initial_state_row.getContent().get(entry.getKey()).equals(entry.getValue()))
-          return false;
+        return false;
     }
       return true;
   }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]