Package com.almworks.sqlite4java

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


        String request = "select * " +
                         "from graph s1 " +
                         "where s1.db_id = " + Integer.valueOf(graphId).toString() + ";";
        currStatement = connection.prepare(request,false);
        String name = "";
        if (currStatement.step())
          if (currStatement.hasRow())
          {
            name = currStatement.columnString(2);
           
          }
View Full Code Here


        String request = "select * " +
                     "from com_graph_subgraph s1 " +
                     "where s1.db_id_graph = " + Integer.valueOf(graphId).toString() + ";";
        SQLiteStatement currStatement = connection.prepare(request,false);
        ArrayList<StorableSubGraph>subGraphs = new ArrayList<StorableSubGraph>();
        while(currStatement.step()) {
          //getting of subgraph------------
          int id_subgraph = currStatement.columnInt(2);
          boolean directed = false;
          String id = null;
          String name = null;
View Full Code Here

         
          request = "select *" +
                    "from subgraph s1 " +
                    "where s1.db_id = " + Integer.valueOf(id_subgraph).toString() + ";";
          subgraphStatement = connection.prepare(request,false);         
          if(subgraphStatement.step()) {
            String buf = subgraphStatement.columnString(3);
            if(buf != null && buf.equals("true")) {
              directed = true;
            } else {
              directed = false;
View Full Code Here

     
          request = "select s2.db_id, s2.id, s2.db_id_inner_graph " +
                "from com_subgraph_vertex s1, vertex s2 " +
                "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);
View Full Code Here

            SQLiteStatement attrStatement = null;
            request = "select s2.db_id, s2.name, s2.value, s2.value_type " +
                      "from com_vertex_attribute s1, attribute s2 " +
                      "where s1.db_id_vertex = " + Integer.valueOf(db_id_vertex).toString() + " and s2.db_id = s1.db_id_attribute;";
            attrStatement = connection.prepare(request,false);
            while(attrStatement.step()) {
              int db_id_attr = attrStatement.columnInt(0);
              String db_name = attrStatement.columnString(1);
              String db_value = attrStatement.columnString(2);
              String db_type = attrStatement.columnString(3);
              v.addStorableAttribute(new StorableAttribute(db_id_attr, db_name, db_value, db_type));
View Full Code Here

          request = "select s2.db_id, s2.id, s2.db_id_source, db_id_target " +
                    "from com_subgraph_edge s1, edge s2 " +
                    "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) {
View Full Code Here

           
                request = "select s2.db_id, s2.name, s2.value, s2.value_type " +
                          "from com_edge_attribute s1, attribute s2 " +
                          "where s1.db_id_edge = " + Integer.valueOf(db_id_edge).toString() + " and s2.db_id = s1.db_id_attribute;";
                attrStatement = connection.prepare(request,false);
                while(attrStatement.step()) {
                  int db_id_attr = attrStatement.columnInt(0);
                  String db_name = attrStatement.columnString(1);
                  String db_value = attrStatement.columnString(2);
                  String db_type = attrStatement.columnString(3);
                  e.addStorableAttribute(new StorableAttribute(db_id_attr, db_name, db_value, db_type));
View Full Code Here

        request = "select * " +
                "from graph s1 " +
                "where s1.db_id = " + Integer.valueOf(graphId).toString() + ";";
        graphStatement = connection.prepare(request,false);
        StorableGraph sg = null;
        if(graphStatement.step()) {
          Integer rootKey = graphStatement.columnInt(1);
          String name = graphStatement.columnString(2);
          sg = new StorableGraph(graphId, name, subGraphs, rootKey);
        } else {
          sg = new StorableGraph(graphId, "Untitle", subGraphs, null);
View Full Code Here

        request = "select *" +
                  "from subgraph s1 " +
                  "where s1.db_id = " + Integer.valueOf(id_subgraph).toString() + ";";
        subgraphStatement = connection.prepare(request,false);
        if(subgraphStatement.step()) {
          String buf = subgraphStatement.columnString(3);
          if(buf != null && buf.equals("true")) {
            directed = true;
          } else {
            directed = false;
View Full Code Here

 
        request = "select s2.db_id, s2.id, s2.db_id_inner_graph " +
              "from com_subgraph_vertex s1, vertex s2 " +
              "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);
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.