Examples of SQLiteStatement


Examples of com.almworks.sqlite4java.SQLiteStatement

    "FROM " +
      "exclude " +
    "WHERE " +
      "id = " + id;

    SQLiteStatement st = Db.getInstance().query(sql);

    st.step();

    if(st.hasRow())
    {
      Exclude exclude = new Exclude();

      exclude.id = st.columnInt(0);
      exclude.projectId = st.columnInt(1);
      exclude.pattern = st.columnString(2);

      return exclude;
    }
    else
    {
View Full Code Here

Examples of com.almworks.sqlite4java.SQLiteStatement

    if(limit > 0)
    {
      sql+= " LIMIT " + limit;
    }

    SQLiteStatement st = Db.getInstance().query(sql);

    while(st.step())
    {
      releases.add(Release.getReleaseById(st.columnInt(0)));
    }

    return releases;
  }
View Full Code Here

Examples of com.almworks.sqlite4java.SQLiteStatement

    "FROM " +
      "exclude " +
    "ORDER BY " +
      "id DESC";

    SQLiteStatement st = Db.getInstance().query(sql);

    while(st.step())
    {
      excludes.add(Exclude.getExcludeById(st.columnInt(0)));
    }

    return excludes;
  }
View Full Code Here

Examples of com.almworks.sqlite4java.SQLiteStatement

      "?, " +
      "?, " +
      "?" +
    ")";

    SQLiteStatement st = Db.getInstance().query(sql);

    st.bind(1, this.getName());
    st.bind(2, this.getLeftPath());
    st.bind(3, this.getLeftResourceId());
    st.bind(4, this.getRightPath());
    st.bind(5, this.getRightResourceId());

    st.step();
  }
View Full Code Here

Examples of com.almworks.sqlite4java.SQLiteStatement

      "rightPath = ?, " +
      "rightResourceId = ? " +
    "WHERE " +
      "id = " + this.getId();

    SQLiteStatement st = Db.getInstance().query(sql);

    st.bind(1, this.getName());
    st.bind(2, this.getLeftPath());
    st.bind(3, this.getLeftResourceId());
    st.bind(4, this.getRightPath());
    st.bind(5, this.getRightResourceId());

    st.step();
  }
View Full Code Here

Examples of com.almworks.sqlite4java.SQLiteStatement

    "FROM " +
      "projects " +
    "WHERE " +
      "id = " + id;

    SQLiteStatement st = Db.getInstance().query(sql);

    st.step();

    if(st.hasRow())
    {
      Project project = new Project();
     
      project.id = st.columnInt(0);
      project.name = st.columnString(1);
      project.date = st.columnString(2);

      project.leftPath = st.columnString(3);
      project.leftResourceId = st.columnInt(4);
      project.leftHandler = HandlerFactory.factory(Resource.getResourceById(project.getLeftResourceId()), project.getLeftPath());

      project.rightPath = st.columnString(5);
      project.rightResourceId = st.columnInt(6);
      project.rightHandler = HandlerFactory.factory(Resource.getResourceById(project.getRightResourceId()), project.getRightPath());

      project.exclude = Project.getExclude(project.getId());

      return project;
View Full Code Here

Examples of com.almworks.sqlite4java.SQLiteStatement

    String sql = "SELECT " +
      "id " +
    "FROM " +
      "projects";

    SQLiteStatement st = Db.getInstance().query(sql);

    while(st.step())
    {
      projects.add(Project.getProjectById(st.columnInt(0)));
    }

    return projects;
  }
View Full Code Here

Examples of com.almworks.sqlite4java.SQLiteStatement

    ") VALUES (" +
      "?, " +
      "datetime()" +
    ")";

    SQLiteStatement st = Db.getInstance().query(sql);

    st.bind(1, this.getProjectId());

    st.step();
  }
View Full Code Here

Examples of com.almworks.sqlite4java.SQLiteStatement

      "projectId = ?, " +
      "date = datetime() " +
    "WHERE " +
      "id = " + this.getId();

    SQLiteStatement st = Db.getInstance().query(sql);

    st.bind(1, this.getProjectId());

    st.step();
  }
View Full Code Here

Examples of com.almworks.sqlite4java.SQLiteStatement

    "FROM " +
      "releases " +
    "WHERE " +
      "id = " + id;

    SQLiteStatement st = Db.getInstance().query(sql);

    st.step();

    if(st.hasRow())
    {
      Release release = new Release();

      release.id = st.columnInt(0);
      release.projectId = st.columnInt(1);
      release.date = st.columnString(2);

      return release;
    }
    else
    {
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.