Package cx.fbn.nevernote.sql.driver

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


    }
   
    query.bindValue(":guid", tempNotebook.getGuid());
    query.bindValue(":stack", tempNotebook.getStack());
   
    check = query.exec();
    if (!check) {
      logger.log(logger.MEDIUM, dbName+" Table update failed.");
      logger.log(logger.MEDIUM, query.lastError().toString());
    }
  }
View Full Code Here


    List<Notebook> index = new ArrayList<Notebook>();
    boolean check;
         
        NSqlQuery query = new NSqlQuery(db.getConnection());
               
    check = query.exec("Select guid, sequence, name, defaultNotebook, " +
        "serviceCreated, "+
        "serviceUpdated, "+
        "published, stack, publishinguri, publishingascending, publishingPublicDescription, "+
        "publishingOrder from "+dbName+" order by name");
    if (!check)
View Full Code Here

    List<Notebook> index = new ArrayList<Notebook>();
    boolean check;

        NSqlQuery query = new NSqlQuery(db.getConnection());
               
    check = query.exec("Select guid, sequence, name, defaultNotebook, " +
        "serviceCreated, serviceUpdated, published, stack from "+dbName+" where local=true order by name");
    if (!check)
      logger.log(logger.EXTREME, dbName+" SQL retrieve has failed.");
    while (query.next()) {
      tempNotebook = new Notebook();
View Full Code Here

    check = query.prepare("Update "+dbName+" set archived=:archived where guid=:guid");
    if (!check)
      logger.log(logger.EXTREME, dbName+" SQL archive update has failed.");
    query.bindValue(":guid", guid);
    query.bindValue(":archived", val);
    query.exec();
  }
  // Load non-archived notebooks from the database
  public List<Notebook> getAllArchived() {
    Notebook tempNotebook;
    List<Notebook> index = new ArrayList<Notebook>();
View Full Code Here

    List<Notebook> index = new ArrayList<Notebook>();
    boolean check;
           
        NSqlQuery query = new NSqlQuery(db.getConnection());
               
    check = query.exec("Select guid, sequence, name, defaultNotebook, " +
        "serviceCreated, serviceUpdated, published, stack, "+
        "publishinguri, publishingascending, publishingPublicDescription, "+
        "publishingOrder " +
        "from "+dbName+" where archived=true order by name");
    if (!check)
View Full Code Here

  public boolean isNotebookLocal(String guid) {
        NSqlQuery query = new NSqlQuery(db.getConnection());
   
    query.prepare("Select local from "+dbName+" where guid=:guid");
    query.bindValue(":guid", guid);
    query.exec();
    if (!query.next()) {
      return false;
    }
    boolean returnValue = query.valueBoolean(0, false);
    return returnValue;
View Full Code Here

  public boolean isNotebookLinked(String guid) {
        NSqlQuery query = new NSqlQuery(db.getConnection());
   
    query.prepare("Select linked from "+dbName+" where guid=:guid");
    query.bindValue(":guid", guid);
    query.exec();
    if (!query.next()) {
      return false;
    }
    boolean returnValue = query.valueBoolean(0, false);
    return returnValue;
View Full Code Here

  public boolean isReadOnly(String guid) {
        NSqlQuery query = new NSqlQuery(db.getConnection());
   
    query.prepare("Select readOnly from "+dbName+" where guid=:guid and readOnly=true");
    query.bindValue(":guid", guid);
    query.exec();
    if (!query.next()) {
      return false;
    }
    boolean returnValue = query.valueBoolean(0, false);
    return returnValue;
View Full Code Here

    boolean check;
        NSqlQuery query = new NSqlQuery(db.getConnection());
    check = query.prepare("Update "+dbName+" set sequence=:sequence where guid=:guid");
    query.bindValue(":guid", guid);
    query.bindValue(":sequence", sequence);
    query.exec();
    if (!check) {
      logger.log(logger.MEDIUM, dbName+" sequence update failed.");
      logger.log(logger.MEDIUM, query.lastError());
    }
  }
View Full Code Here

  }
  // Create the table
  public void createTable() {
    NSqlQuery query = new NSqlQuery(db.getConnection());
        logger.log(logger.HIGH, "Creating table SavedSearch...");
        if (!query.exec("Create table SavedSearch (guid varchar primary key, " +
            "name varchar, query varchar, format integer, sequence integer, isDirty boolean)"))
          logger.log(logger.HIGH, "Table SavedSearch creation FAILED!!!");
  }
  // Drop the table
  public void dropTable() {
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.