Package cx.fbn.nevernote.sql.driver

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


    query.bindValue(":newGuid", newGuid);
    query.bindValue(":oldGuid", oldGuid);
    query.exec();
    if (!check) {
      logger.log(logger.MEDIUM, "Tag guid update failed.");
      logger.log(logger.MEDIUM, query.lastError());
    }
   
    check = query.prepare("Update NoteTags set tagGuid=:newGuid where tagGuid=:oldGuid");
    query.bindValue(":newGuid", newGuid);
    query.bindValue(":oldGuid", oldGuid);
View Full Code Here


    query.bindValue(":newGuid", newGuid);
    query.bindValue(":oldGuid", oldGuid);
    query.exec();
    if (!check) {
      logger.log(logger.MEDIUM, "Tag guid update failed for NoteTags.");
      logger.log(logger.MEDIUM, query.lastError());
    }
    
  }
  // Get dirty tags
  public List<Tag> getDirty() {
View Full Code Here

           else
             return;
    }
    query.bindValue(":guid", guid);
    if (!query.exec())
      logger.log(logger.LOW, "Error setting tag icon. " +query.lastError());
  }

  // Get a list of all icons
  public HashMap<String, QIcon> getAllIcons() {
    HashMap<String, QIcon> values = new HashMap<String, QIcon>();
View Full Code Here

    query.prepare("Insert Into InvalidXML (type, element, attribute) Values('ATTRIBUTE', :element, :attribute)");
    query.bindValue(":element", element);
    query.bindValue(":attribute", attribute);
    if (!query.exec()) {
      logger.log(logger.MEDIUM, "Insert Attribute into invalidXML failed.");
      logger.log(logger.MEDIUM, query.lastError());
    }
  }
  // Add an item to the table
  public void addElement(String element) {
    if (elementExists(element))
View Full Code Here

        NSqlQuery query = new NSqlQuery(db.getConnection());
    query.prepare("Insert Into InvalidXML (type, element) Values('ELEMENT', :element)");
    query.bindValue(":element", element);
    if (!query.exec()) {
      logger.log(logger.MEDIUM, "Insert Element into invalidXML failed.");
      logger.log(logger.MEDIUM, query.lastError());
    }
  }
  // get invalid elements
  public List<String> getInvalidElements() {
        NSqlQuery query = new NSqlQuery(db.getConnection());
View Full Code Here

  // get invalid elements
  public List<String> getInvalidElements() {
        NSqlQuery query = new NSqlQuery(db.getConnection());
    if (!query.exec("Select element from InvalidXML where type = 'ELEMENT'")) {
      logger.log(logger.MEDIUM, "getInvalidElement from invalidXML failed.");
      logger.log(logger.MEDIUM, query.lastError());
      return null;
    }
    List<String> elements = new ArrayList<String>();
    while (query.next()) {
      elements.add(query.valueString(0));
View Full Code Here

  // get invalid elements
  public List<String> getInvalidAttributeElements() {
        NSqlQuery query = new NSqlQuery(db.getConnection());
    if (!query.exec("Select distinct element from InvalidXML where type = 'ATTRIBUTE'")) {
      logger.log(logger.MEDIUM, "getInvalidElement from invalidXML failed.");
      logger.log(logger.MEDIUM, query.lastError());
      return null;
    }
    List<String> elements = new ArrayList<String>();
    while (query.next()) {
      elements.add(query.valueString(0));
View Full Code Here

        NSqlQuery query = new NSqlQuery(db.getConnection());
    query.prepare("Select attribute from InvalidXML where type = 'ATTRIBUTE' and element = :element");
    query.bindValue(":element", element);
    if (!query.exec()) {
      logger.log(logger.MEDIUM, "getInvalidElement from invalidXML failed.");
      logger.log(logger.MEDIUM, query.lastError());
      return null;
    }
    ArrayList<String> elements = new ArrayList<String>();
    while (query.next()) {
      elements.add(query.valueString(0));
View Full Code Here

        NSqlQuery query = new NSqlQuery(db.getConnection());
    query.prepare("Select element from InvalidXML where type='ELEMENT' and element=:element");
    query.bindValue(":element", element);
    if (!query.exec()) {
      logger.log(logger.MEDIUM, "elementExists in invalidXML failed.");
      logger.log(logger.MEDIUM, query.lastError());
    }
    if (query.next())
      return true;
    else
      return false;
View Full Code Here

    query.prepare("Select element from InvalidXML where type='ATTRIBUTE' and element=:element and attribute=:attribute");
    query.bindValue(":element", element);
    query.bindValue(":attribute", attribute);
    if (!query.exec()) {
      logger.log(logger.MEDIUM, "attributeExists in invalidXML failed.");
      logger.log(logger.MEDIUM, query.lastError());
    }
    if (query.next())
      return true;
    else
      return false;
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.