Package com.almworks.sqlite4java

Examples of com.almworks.sqlite4java.SQLiteStatement


    "FROM " +
      "exclude " +
    "WHERE " +
      "projectId = " + projectId;

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

    while(st.step())
    {
      exclude.add(st.columnString(0));
    }

    return exclude;
  }
View Full Code Here


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

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

    st.bind(1, this.getType());
    st.bind(2, this.getName());
    st.bind(3, serialize(this.getConfig()));

    st.step();
  }
View Full Code Here

      "name = ?, " +
      "config = ? " +
    "WHERE " +
      "id = " + this.getId();

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

    st.bind(1, this.getType());
    st.bind(2, this.getName());
    st.bind(3, serialize(this.getConfig()));

    st.step();
  }
View Full Code Here

    "FROM " +
      "resources " +
    "WHERE " +
      "id = " + id;

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

    st.step();

    if(st.hasRow())
    {
      Resource resource = new Resource();

      resource.id = st.columnInt(0);
      resource.type = st.columnString(1);
      resource.name = st.columnString(2);
      resource.config = Resource.unserialize(st.columnBlob(3));

      return resource;
    }
    else
    {
View Full Code Here

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

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

    while(st.step())
    {
      resources.add(Resource.getResourceById(st.columnInt(0)));
    }

    return resources;
  }
View Full Code Here

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

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

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

    st.step();
  }
View Full Code Here

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

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

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

    st.step();
  }
View Full Code Here

    "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

    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

    "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

TOP

Related Classes of com.almworks.sqlite4java.SQLiteStatement

Copyright © 2018 www.massapicom. 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.