Package com.almworks.sqlite4java

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


      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);
      }
      if(list.size() == maxResults) {
View Full Code Here


                "where s1.db_id_subgraph = " + Integer.valueOf(id_subgraph).toString() + " and s2.db_id = s1.db_id_vertex;";
          vertexStatement = connection.prepare(request,false);
          while(vertexStatement.step()) {
            int db_id_vertex = vertexStatement.columnInt(0);
            String id_vertex = vertexStatement.columnString(1);
            Integer db_id_innder_graph = (Integer)vertexStatement.columnValue(2);
            StorableVertex v = new StorableVertex(db_id_vertex, id_vertex);
            v.setInnerGraph(db_id_innder_graph);
            listVertex.add(v);
            //attributes-----------------
            SQLiteStatement attrStatement = null;
View Full Code Here

                    "where s1.db_id_subgraph = " + Integer.valueOf(id_subgraph).toString() + " and s2.db_id = s1.db_id_edge;";
          edgeStatement = connection.prepare(request,false);
          while(edgeStatement.step()) {
            int db_id_edge = edgeStatement.columnInt(0);
            String id_edge = edgeStatement.columnString(1);
            Integer db_id_source = (Integer)edgeStatement.columnValue(2);
            Integer db_id_target = (Integer)edgeStatement.columnValue(3);
            if(db_id_source != null && db_id_target != null) {
              StorableVertex source = null, target = null;
              for(StorableVertex bufVertex : listVertex) {
                if(bufVertex.getStorableId() == db_id_source) {
View Full Code Here

          edgeStatement = connection.prepare(request,false);
          while(edgeStatement.step()) {
            int db_id_edge = edgeStatement.columnInt(0);
            String id_edge = edgeStatement.columnString(1);
            Integer db_id_source = (Integer)edgeStatement.columnValue(2);
            Integer db_id_target = (Integer)edgeStatement.columnValue(3);
            if(db_id_source != null && db_id_target != null) {
              StorableVertex source = null, target = null;
              for(StorableVertex bufVertex : listVertex) {
                if(bufVertex.getStorableId() == db_id_source) {
                  source = bufVertex;
View Full Code Here

              "where s1.db_id_subgraph = " + Integer.valueOf(id_subgraph).toString() + " and s1.db_id_vertex = s2.db_id;";
        vertexStatement = connection.prepare(request,false);
        while(vertexStatement.step()) {
          int db_id_vertex = vertexStatement.columnInt(0);
          String id_vertex = vertexStatement.columnString(1);
          Integer db_id_innder_graph = (Integer)vertexStatement.columnValue(2);
          StorableVertex v = new StorableVertex(db_id_vertex, id_vertex);
          v.setInnerGraph(db_id_innder_graph);
          listVertex.add(v);
          //attributes-----------------
          SQLiteStatement attrStatement = null;
View Full Code Here

                  "where s1.db_id_subgraph = " + Integer.valueOf(id_subgraph).toString() + " and s1.db_id_edge = s2.db_id;";
        edgeStatement = connection.prepare(request,false);
        while(edgeStatement.step()) {
          int db_id_edge = edgeStatement.columnInt(0);
          String id_edge = edgeStatement.columnString(1);
          Integer db_id_source = (Integer)edgeStatement.columnValue(2);
          Integer db_id_target = (Integer)edgeStatement.columnValue(3);
          if(db_id_source != null && db_id_target != null) {
            StorableVertex source = null, target = null;
            for(StorableVertex bufVertex : listVertex) {
              if(bufVertex.getStorableId() == db_id_source) {
View Full Code Here

        edgeStatement = connection.prepare(request,false);
        while(edgeStatement.step()) {
          int db_id_edge = edgeStatement.columnInt(0);
          String id_edge = edgeStatement.columnString(1);
          Integer db_id_source = (Integer)edgeStatement.columnValue(2);
          Integer db_id_target = (Integer)edgeStatement.columnValue(3);
          if(db_id_source != null && db_id_target != null) {
            StorableVertex source = null, target = null;
            for(StorableVertex bufVertex : listVertex) {
              if(bufVertex.getStorableId() == db_id_source) {
                source = bufVertex;
View Full Code Here

        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();
        return (datas);
View Full Code Here

        SQLiteStatement currStatement = connection.prepare(request, false);
        StorableVertex v = null;
        if (currStatement != null && currStatement.step()) {
          int db_id = currStatement.columnInt(0);
          String id = currStatement.columnString(1);
          Integer db_id_inner_graph = (Integer) currStatement.columnValue(2);
          v = new StorableVertex(db_id, id);
          v.setInnerGraph(db_id_inner_graph);
        }
        currStatement.dispose();
        return v;
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.