Package cx.fbn.nevernote.sql.driver

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


        NSqlQuery query = new NSqlQuery(db.getConnection());
               
    check = query.prepare("Select notebookGuid "
        +"from LinkedNotebook where guid=:guid");
    query.bindValue(":guid", guid);
    check = query.exec();
    if (!check)
      logger.log(logger.EXTREME, "LinkedNotebook SQL retrieve of notebookguid by guidhas failed.");
    if (query.next()) {
      return query.valueString(0);
   
View Full Code Here


        NSqlQuery query = new NSqlQuery(db.getConnection());
               
    check = query.prepare("Select LastSequenceNumber "
        +"from LinkedNotebook where guid=:guid");
    query.bindValue(":guid", guid);
    check = query.exec();
    if (!check)
      logger.log(logger.EXTREME, "Notebook SQL retrieve has failed.");
    while (query.next()) {
      return query.valueInteger(0);
   
View Full Code Here

        NSqlQuery query = new NSqlQuery(db.getConnection());
               
    check = query.prepare("Select notebookGuid "
        +"from LinkedNotebook where guid=:guid");
    query.bindValue(":guid", guid);
    check = query.exec();
    if (!check)
      logger.log(logger.EXTREME, "Notebook SQL retrieve has failed.");
    while (query.next()) {
      return query.valueString(0);
   
View Full Code Here

    
    NSqlQuery query = new NSqlQuery(db.getConnection());
   
    query.prepare("Select guid from Linkednotebook where shareName=:name");
    query.bindValue(":name", name);
    if (!query.exec())
      logger.log(logger.EXTREME, "Linked notebook SQL retrieve by share name has failed.");
    String val = null;
    if (query.next())
      val = query.valueString(0);
    return val;
View Full Code Here

    NSqlQuery query = new NSqlQuery(db.getConnection());
   
    query.prepare("Update LinkedNotebook set notebookGuid=:notebookGuid where shareKey=:shareKey");
    query.bindValue(":notebookGuid", notebookGuid);
    query.bindValue(":shareKey", shareKey);
    if (!query.exec())
      logger.log(logger.EXTREME, "Linked notebook SQL retrieve by share name has failed.");
    String val = null;
    if (query.next())
      val = query.valueString(0);
    return val;
View Full Code Here

    NSqlQuery query = new NSqlQuery(db.getConnection());
   
    query.prepare("Update LinkedNotebook set lastsequencedate=:date where guid=:guid");
    query.bindValue(":date", date);
    query.bindValue(":guid", guid);
    if (!query.exec())
      logger.log(logger.EXTREME, "Linked notebook SQL retrieve by share name has failed.");
    String val = null;
    if (query.next())
      val = query.valueString(0);
    return val;
View Full Code Here

    NSqlQuery query = new NSqlQuery(db.getConnection());
   
    query.prepare("Update LinkedNotebook set lastsequencenumber=:number where guid=:guid");
    query.bindValue(":number", number);
    query.bindValue(":guid", guid);
    if (!query.exec())
      logger.log(logger.EXTREME, "Linked notebook SQL retrieve by share name has failed.");
    String val = null;
    if (query.next())
      val = query.valueString(0);
    return val;
View Full Code Here

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

      if (dbTableExists("NoteResources")) {
        // Begin migration of database
        NSqlQuery query = new NSqlQuery(resourceConn);
        String linkcmd = "create linked table oldnoteresources "+
            "('org.h2.Driver', '"+url+"', '"+userid+"', '"+passwordString+"', 'NoteResources')";
        query.exec(linkcmd);
        query.exec("insert into noteresources (select * from oldnoteresources)");
        query.exec("Drop table oldnoteresources;");
        query.exec("Update noteresources set indexneeded='true'");
       
      }
View Full Code Here

        // Begin migration of database
        NSqlQuery query = new NSqlQuery(resourceConn);
        String linkcmd = "create linked table oldnoteresources "+
            "('org.h2.Driver', '"+url+"', '"+userid+"', '"+passwordString+"', 'NoteResources')";
        query.exec(linkcmd);
        query.exec("insert into noteresources (select * from oldnoteresources)");
        query.exec("Drop table oldnoteresources;");
        query.exec("Update noteresources set indexneeded='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.