Examples of lastError()


Examples of cx.fbn.nevernote.sql.driver.NSqlQuery.lastError()

    query.bindValue(":isDirty", isDirty);
    query.bindValue(":guid", noteGuid);
    query.exec();
    if (!check) {
      logger.log(logger.MEDIUM, "RNoteTagsTable.saveNoteTag has failed to set note as dirty.");   
      logger.log(logger.MEDIUM, query.lastError());
    }
  }
  // Delete a note's tags
  public void deleteNoteTag(String noteGuid) {
    boolean check;
View Full Code Here

Examples of cx.fbn.nevernote.sql.driver.NSqlQuery.lastError()

 
    query.bindValue(":noteGuid", noteGuid);
    check = query.exec();
    if (!check) {
      logger.log(logger.MEDIUM, "NoteTags Table delete failed.");   
      logger.log(logger.MEDIUM, query.lastError());
    }

  }
  // Get a note tag counts
  public List<Pair<String,Integer>> getTagCounts() {
View Full Code Here

Examples of cx.fbn.nevernote.sql.driver.NSqlQuery.lastError()

  public List<Pair<String,Integer>> getTagCounts() {
    List<Pair<String,Integer>> counts = new ArrayList<Pair<String,Integer>>();   
    NSqlQuery query = new NSqlQuery(db.getConnection());
    if (!query.exec("select tagguid, count(noteguid) from notetags group by tagguid;")) {
      logger.log(logger.EXTREME, "NoteTags SQL getTagCounts has failed.");
      logger.log(logger.MEDIUM, query.lastError());
      return null;
    }
    while (query.next()) {
      Pair<String,Integer> newCount = new Pair<String,Integer>();
      newCount.setFirst(query.valueString(0));
View Full Code Here

Examples of cx.fbn.nevernote.sql.driver.NSqlQuery.lastError()

  public void createTable() {
    NSqlQuery query = new NSqlQuery(db.getIndexConnection());
        logger.log(logger.HIGH, "Creating table WORDS ...");
        if (!query.exec("create table words (word varchar, guid varchar, source varchar, weight int, primary key (word, guid, source));")) {
          logger.log(logger.HIGH, "Table WORDS creation FAILED!!!");  
          logger.log(logger.HIGH, query.lastError());
        }  
  }
  // Drop the table
  public void dropTable() {
    NSqlQuery query = new NSqlQuery(db.getIndexConnection());
View Full Code Here

Examples of cx.fbn.nevernote.sql.driver.NSqlQuery.lastError()

  //********************************************************************************
  public void expungeFromWordIndex(String guid, String type) {
    NSqlQuery deleteWords = new NSqlQuery(db.getIndexConnection());
    if (!deleteWords.prepare("delete from words where guid=:guid and source=:source")) {
      logger.log(logger.EXTREME, "Note SQL select prepare deleteWords has failed.");
      logger.log(logger.MEDIUM, deleteWords.lastError());
    }
 
    deleteWords.bindValue(":guid", guid);
    deleteWords.bindValue(":source", type);
    deleteWords.exec();
View Full Code Here

Examples of cx.fbn.nevernote.sql.driver.NSqlQuery.lastError()

  // Expunge words
  public void expunge(String guid) {
    NSqlQuery deleteWords = new NSqlQuery(db.getIndexConnection());
    if (!deleteWords.prepare("delete from words where guid=:guid")) {
      logger.log(logger.EXTREME, "Word SQL select prepare expunge has failed.");
      logger.log(logger.MEDIUM, deleteWords.lastError());
    }
 
    deleteWords.bindValue(":guid", guid);
    deleteWords.exec();
  }
View Full Code Here

Examples of cx.fbn.nevernote.sql.driver.NSqlQuery.lastError()

  // Reindex a note
  public synchronized void addWordToNoteIndex(String guid, String word, String type, Integer weight) {
    NSqlQuery findWords = new NSqlQuery(db.getIndexConnection());
    if (!findWords.prepare("Select weight from words where guid=:guid and source=:type and word=:word")) {
        logger.log(logger.MEDIUM, "Prepare failed in addWordToNoteIndex()");
      logger.log(logger.MEDIUM, findWords.lastError());
    }
   
    findWords.bindValue(":guid", guid);
    findWords.bindValue(":type", type);
    findWords.bindValue(":word", word);
View Full Code Here

Examples of cx.fbn.nevernote.sql.driver.NSqlQuery.lastError()

   
    NSqlQuery insertWords = new NSqlQuery(db.getIndexConnection());
    if (!insertWords.prepare("Insert Into Words (word, guid, weight, source)"
        +" Values(:word, :guid, :weight, :type )")) {
      logger.log(logger.EXTREME, "Note SQL select prepare checkWords has failed.");
      logger.log(logger.MEDIUM, insertWords.lastError());
    }
    insertWords.bindValue(":word", word);
    insertWords.bindValue(":guid", guid);
    insertWords.bindValue(":weight", weight);
    insertWords.bindValue(":type", type);
View Full Code Here

Examples of cx.fbn.nevernote.sql.driver.NSqlQuery.lastError()

    insertWords.bindValue(":word", word);
    insertWords.bindValue(":guid", guid);
    insertWords.bindValue(":weight", weight);
    insertWords.bindValue(":type", type);
    if (!insertWords.exec()) {
      String err = insertWords.lastError();
      logger.log(logger.MEDIUM, "Error inserting words into index: " +err);
    }
  }

  // Get a list of GUIDs in the table
View Full Code Here

Examples of cx.fbn.nevernote.sql.driver.NSqlQuery.lastError()

             return;
    }
    query.bindValue(":name", name);
    query.bindValue(":type", rectype);
    if (!query.exec())
      logger.log(logger.LOW, "Error setting system icon. " +query.lastError());
  }
 
 
 
  // Set the notebooks custom icon
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.