Package com.almworks.sqlite4java

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


      List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
      if(st.step()) {
        do {
          // true if there is data (SQLITE_ROW) was returned, false if statement has been completed (SQLITE_DONE)
          Map<String, Object> objectToRead = new HashMap<String, Object>();
          for(int i = 0; i < st.columnCount(); i++) {
            objectToRead.put(st.getColumnName(i), st.columnValue(i));
          }
          list.add(objectToRead);
        } while(st.step() && list.size() < maxResults);
      }
View Full Code Here


      protected List<List<Object>> job(SQLiteConnection connection) throws Throwable {
        SQLiteStatement currStatement = connection.prepare(request, false);
        List<List<Object>> datas = new ArrayList<List<Object>>();
        while (currStatement.step()) {
          ArrayList<Object> row = new ArrayList<Object>();
          for (int i = 0; i < currStatement.columnCount(); i++) {
            row.add(currStatement.columnValue(i));
          }
          datas.add(row);
        }
        currStatement.dispose();
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.