OSDN Git Service

Cleanup of initial sync with ink notes and added the ability to highlight words in...
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / sql / NotebookTable.java
index b60b02d..332c100 100644 (file)
@@ -54,7 +54,7 @@ public class NotebookTable {
                dbName = "Notebook";\r
        }\r
        // Create the table\r
-       public void createTable(boolean addDefault) {\r
+       public void createTable(boolean addDefaulte) {\r
                NSqlQuery query = new NSqlQuery(db.getConnection());\r
         logger.log(logger.HIGH, "Creating table "+dbName+"...");\r
         if (!query.exec("Create table "+dbName+" (guid varchar primary key, " +\r
@@ -75,9 +75,6 @@ public class NotebookTable {
         newnote.setPublished(false);\r
         newnote.setGuid("1");\r
         \r
-        if (!addDefault)\r
-               return;\r
-               \r
         // Setup an initial notebook\r
                SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");\r
         query = new NSqlQuery(db.getConnection());\r
@@ -643,7 +640,7 @@ public class NotebookTable {
        public List<Pair<String,Integer>> getNotebookCounts() {\r
                List<Pair<String,Integer>> counts = new ArrayList<Pair<String,Integer>>();              \r
                NSqlQuery query = new NSqlQuery(db.getConnection());\r
-               if (!query.exec("select notebookGuid, count(guid) from "+dbName+" where active=1 group by notebookguid;")) {\r
+               if (!query.exec("select notebookGuid, count(guid) from note where active=1 group by notebookguid;")) {\r
                        logger.log(logger.EXTREME, "NoteTags SQL getTagCounts has failed.");\r
                        logger.log(logger.MEDIUM, query.lastError());\r
                        return null;\r