Package cx.fbn.nevernote.sql.driver

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


    check = query.exec();
    if (!check)   {
      logger.log(logger.MEDIUM, "dbRunner.getNoteResourceGuidByHashHex Select failed." +
          "Note Guid:" +noteGuid+
          "Data Body Hash:" +hash);   
      logger.log(logger.MEDIUM, query.lastError());
    }
    if (!query.next()) {
      logger.log(logger.MEDIUM, "Note Resource not found.");
      return null;
    }
View Full Code Here


   
    check = query.prepare("Select guid, mime, from NoteResources " +
          "where noteGuid=:noteGuid and dataHash=:hash");
    if (!check) {
       logger.log(logger.EXTREME, "NoteResource SQL select prepare has failed.");
      logger.log(logger.MEDIUM, query.lastError());
    }
    query.bindValue(":noteGuid", noteGuid);
    query.bindValue(":hash", hash);
 
    if (!query.exec()) {
View Full Code Here

      logger.log(logger.MEDIUM, tags.lastError());
    }

    if (!words.exec()) {
      logger.log(logger.MEDIUM, "Word delete failed.");
      logger.log(logger.MEDIUM, words.lastError());
    }
    if (needsSync) {
      DeletedTable deletedTable = new DeletedTable(logger, db);
      deletedTable.addDeletedItem(guid, "Note");
    }
View Full Code Here

    query.bindValue(":guid", guid);
   
    query.exec();
    if (!check) {
      logger.log(logger.MEDIUM, "Note sequence update failed.");
      logger.log(logger.MEDIUM, query.lastError());
    }
    logger.log(logger.HIGH, "Leaving NoteTable.updateNoteSequence");
  }
  // Update the note Guid
  public void updateNoteGuid(String oldGuid, String newGuid) {
View Full Code Here

    wordQuery.bindValue(":newGuid", newGuid);
    wordQuery.bindValue(":oldGuid", oldGuid);
    wordQuery.exec();
    if (!check) {
      logger.log(logger.MEDIUM, "Note guid update failed for Words.");
      logger.log(logger.MEDIUM, wordQuery.lastError());
    }
    resQuery.prepare("Update noteresources set noteguid=:newGuid where noteguid=:oldGuid");
    resQuery.bindValue(":newGuid", newGuid);
    resQuery.bindValue(":oldGuid", oldGuid);
    resQuery.exec();
View Full Code Here

    boolean check;     
        NSqlQuery query = new NSqlQuery(db.getConnection());
                     
    check = query.exec("Select guid from Note where isDirty = true and isExpunged = false and notebookGuid not in (select guid from notebook where local = true or linked = true)");
    if (!check)
      logger.log(logger.EXTREME, "Note SQL retrieve has failed: " +query.lastError().toString());
   
    // Get a list of the notes
    while (query.next()) {
      guid = new String();
      guid = query.valueString(0);
View Full Code Here

    boolean check;     
        NSqlQuery query = new NSqlQuery(db.getConnection());
               
    check = query.exec("Select guid from Note where isDirty = true and isExpunged = false and notebookGuid in (select guid from notebook where linked = true)");
    if (!check)
      logger.log(logger.EXTREME, "Note SQL retrieve has failed: " +query.lastError().toString());
   
    // Get a list of the notes
    while (query.next()) {
      guid = new String();
      guid = query.valueString(0);
View Full Code Here

               
    query.prepare("Select guid from Note where isDirty = true and isExpunged = false and notebookGuid=:notebookGuid");
    query.bindValue(":notebookGuid", notebookGuid);
    check = query.exec();
    if (!check)
      logger.log(logger.EXTREME, "Note SQL retrieve has failed getting dirty linked notes: " +query.lastError().toString());
   
    // Get a list of the notes
    while (query.next()) {
      guid = new String();
      guid = query.valueString(0);
View Full Code Here

    boolean check;     
        NSqlQuery query = new NSqlQuery(db.getConnection());
               
    check = query.prepare("Select guid from Note where notebookguid=:notebookguid");
    if (!check)
      logger.log(logger.EXTREME, "Note SQL retrieve has failed: " +query.lastError().toString());
    query.bindValue(":notebookguid", notebookGuid);
    query. exec();
   
    // Get a list of the notes
    while (query.next()) {
View Full Code Here

               
    check = query.prepare("Select guid from Note where isDirty = true and guid=:guid");
    query.bindValue(":guid", guid);
    check = query.exec();
    if (!check)
      logger.log(logger.EXTREME, "Note SQL retrieve has failed: " +query.lastError().toString());
   
    boolean returnValue;
    // Get a list of the notes
    if (query.next())
      returnValue = true;
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.