Package cx.fbn.nevernote.sql.driver

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


    if (isDirty)
      query.bindValue(":isDirty", true);
    else
      query.bindValue(":isDirty", false);

    check = query.exec();
    if (!check) {
      logger.log(logger.MEDIUM, "SharedNotebook Table insert failed.");
      logger.log(logger.MEDIUM, query.lastError().toString());
    }
  }
View Full Code Here


  public boolean exists(long id) {
        NSqlQuery query = new NSqlQuery(db.getConnection());
        logger.log(logger.EXTREME, "Checking if shared notebook " +id +" exists");
         boolean check = query.prepare("Select id from sharednotebook where id=:id");
         query.bindValue(":id", id);
    check = query.exec();
    if (!check) {
      logger.log(logger.MEDIUM, "SharedNotebook Table exists check failed.");
      logger.log(logger.MEDIUM, query.lastError().toString());
    }
    if (query.next())
View Full Code Here

    if (!check) {
      logger.log(logger.EXTREME, "SharedNotebook SQL delete prepare has failed.");
      logger.log(logger.EXTREME, query.lastError().toString());
    }
    query.bindValue(":id", id);
    check = query.exec();
    if (!check)
      logger.log(logger.MEDIUM, "SharedNotebook delete failed.");
   
    // Signal the parent that work needs to be done
    if  (needsSync) {
View Full Code Here

    if (!check) {
      logger.log(logger.EXTREME, "SharedNotebook SQL delete by notebook guid prepare has failed.");
      logger.log(logger.EXTREME, query.lastError().toString());
    }
    query.bindValue(":id", id);
    check = query.exec();
    if (!check)
      logger.log(logger.MEDIUM, "SharedNotebook delete by notebook guid failed.");
   
    // Signal the parent that work needs to be done
    if  (needsSync) {
View Full Code Here

    query.bindValue(":shareKey", tempNotebook.getShareKey());
    query.bindValue(":username", tempNotebook.getUsername());
   
    query.bindValue(":isDirty", isDirty);
   
    check = query.exec();
    if (!check) {
      logger.log(logger.MEDIUM, "SharedNotebook Table update failed.");
      logger.log(logger.MEDIUM, query.lastError().toString());
    }
  }
View Full Code Here

    List<SharedNotebook> index = new ArrayList<SharedNotebook>();
    boolean check;
         
        NSqlQuery query = new NSqlQuery(db.getConnection());
               
    check = query.exec("Select id, userid, notebookGuid, email, notebookModifiable, requireLogin, " +
        "serviceCreated, "+
        "shareKey, username from SharedNotebook");
    if (!check)
      logger.log(logger.EXTREME, "Notebook SQL retrieve has failed.");
    while (query.next()) {
View Full Code Here

        "serviceCreated, "+
        "shareKey, username from SharedNotebook where notebookGuid=:notebookGuid ");
    if (!check)
      logger.log(logger.EXTREME, "SharedNotebook getForNotebook SQL prepare has failed.");
    query.bindValue(":notebookGuid", guid);
    check = query.exec();
    if (!check)
      logger.log(logger.EXTREME, "SharedNotebook getForNotebook SQL exec has failed.");
   
    while (query.next()) {
      tempNotebook = new SharedNotebook();
View Full Code Here

  public List <Long> getDirtyIds() {
    List<Long> index = new ArrayList<Long>();
    boolean check; 
        NSqlQuery query = new NSqlQuery(db.getConnection());
               
    check = query.exec("Select id from SharedNotebook where isDirty = true");
    if (!check)
      logger.log(logger.EXTREME, "SharedNotebook SQL retrieve has failed in getdirtyIds.");
    while (query.next()) {
      index.add(query.valueLong(0));
   
View Full Code Here

  public void expungeDeletedItem(String guid, String type) {
        NSqlQuery query = new NSqlQuery(db.getConnection());
    query.prepare("delete from DeletedItems where guid=:guid and type=:type");
    query.bindValue(":guid", guid);
    query.bindValue(":type", type);
    if (!query.exec()) {
      logger.log(logger.LOW, "Expunge deleted items failed.");
      logger.log(logger.LOW, query.lastError());
    }
  }
  public List<DeletedItemRecord> getAllDeleted() {
View Full Code Here

  }
  public List<DeletedItemRecord> getAllDeleted() {
    logger.log(logger.HIGH, "Entering DeletedTable.getAllDeleted");
    List<DeletedItemRecord> list = new ArrayList<DeletedItemRecord>();
    NSqlQuery query = new NSqlQuery(db.getConnection());
    query.exec("Select guid, type from DeletedItems");
    while (query.next()) {
      DeletedItemRecord record = new DeletedItemRecord();
      record.guid = query.valueString(0);
      record.type = query.valueString(1);
      list.add(record);
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.