Package com.almworks.sqlite4java

Examples of com.almworks.sqlite4java.SQLiteStatement.step()


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

    st.step();
  }

  public void update() throws Exception
  {
    String sql = "UPDATE " +
View Full Code Here


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

    st.step();
  }

  public void delete() throws Exception
  {
    String sql = "DELETE FROM " +
View Full Code Here

    "WHERE " +
      "id = " + id;

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

    st.step();

    if(st.hasRow())
    {
      Project project = new Project();
     
View Full Code Here

    "FROM " +
      "projects";

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

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

    return projects;
View Full Code Here

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

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

    st.step();
  }

  public void update() throws Exception
  {
    String sql = "UPDATE " +
View Full Code Here

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

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

    st.step();
  }

  public void delete() throws Exception
  {
    String sql = "DELETE FROM " +
View Full Code Here

    "WHERE " +
      "id = " + id;

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

    st.step();

    if(st.hasRow())
    {
      Release release = new Release();
View Full Code Here

      champions = new LinkedList<Champion>();
      queue.execute(new SQLiteJob<Object>() {
        protected Object job(SQLiteConnection connection) throws Throwable {
          SQLiteStatement st = connection
              .prepare("SELECT * FROM champions");
          while (st.step()) {
            Champion newChamp = new Champion();
            int i = 0; // first column is id
            newChamp.ID = st.columnInt(i); i++;
            newChamp.name = st.columnString(i); i++;
            newChamp.displayName = st.columnString(i); i++;
View Full Code Here

            newChamp.selectSoundPath = st.columnString(i); i++;
 
            SQLiteStatement skinsDB = connection
                .prepare("SELECT * FROM championskins WHERE championId = ?");
            skinsDB.bind(1, newChamp.ID);
            while (skinsDB.step()) {
              ChampionSkin theSkin = new ChampionSkin();
              i = 0;
              theSkin.ID = skinsDB.columnInt(i); i++;
              theSkin.isDefault = skinsDB.columnInt(i) == 1; i++;
              theSkin.order = skinsDB.columnInt(i); i++;
View Full Code Here

    SQLiteQueue queue = GameStatsDBWrapper.getQueue();
    items = new LinkedList<Item>();
    queue.execute(new SQLiteJob<Object>() {
      protected Object job(SQLiteConnection connection) throws Throwable {
        SQLiteStatement st = connection.prepare("SELECT * FROM items");
        while (st.step()) {
          Item newItem = new Item();
          int i = 0;
          newItem.ID = st.columnInt(i);
          i++;
          newItem.name = st.columnString(i);
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.