Package com.almworks.sqlite4java

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


      job = this.currConnection.execute(new SQLiteJob<Object>() {
        protected Object job(SQLiteConnection connection) throws Throwable {
          SQLiteStatement currStatement = null;
          currStatement = connection.prepare("COMMIT;");
          currStatement.stepThrough();
          currStatement.dispose();
          return null;
        }
      });
      job.complete();
      if (job.getError() != null)
View Full Code Here


        @Override
        protected Object job(SQLiteConnection connection) throws Throwable {
          SQLiteStatement currStatement = null;
          currStatement = connection.prepare("BEGIN;");
          currStatement.stepThrough();
          currStatement.dispose();
           //add graph--------------------------
          StringBuffer request = new StringBuffer(10*1024);
          request.append("insert into subgraph values(");
          request.append(ssg.getStorableId());
          if(ssg.getId() == null) {
View Full Code Here

            request.append(", 'false');");
          }
          currStatement = connection.prepare(request.toString(),false);
          request.setLength(0);
            currStatement.stepThrough();
            currStatement.dispose();
          //add all vertexes---------------
          for(StorableVertex bufVertex : ssg.getVertices()) {
            request.append("insert into vertex values(");
            request.append(bufVertex.getStorableId());
            if(bufVertex.getId() == null) {
View Full Code Here

              request.append(");");
            }
            currStatement = connection.prepare(request.toString(),false);
            request.setLength(0);
              currStatement.stepThrough();
              currStatement.dispose();
            //add all attributes---------
            for(StorableAttribute bufAttribute : bufVertex.getAttributes()) {
              request.append("insert into attribute values(");
              request.append(bufAttribute.getStorableId());
              if(bufAttribute.getName() == null) {
View Full Code Here

                request.append("');");
              }
              currStatement = connection.prepare(request.toString(),false);
              request.setLength(0);
                currStatement.stepThrough();
                currStatement.dispose();
              //add composition between vertex and attribute
              request.append("insert into com_vertex_attribute values(?, ");
              request.append(bufVertex.getStorableId());
              request.append(", ");
              request.append(bufAttribute.getStorableId());
View Full Code Here

              request.append(bufAttribute.getStorableId());
              request.append(");");
              currStatement = connection.prepare(request.toString(),false);
              request.setLength(0);
                currStatement.stepThrough();
                currStatement.dispose();
            }
            //add composition between subgraph and vertex
            request.append("insert into com_subgraph_vertex values(?, ");
            request.append(ssg.getStorableId());
            request.append(", ");
View Full Code Here

            request.append(bufVertex.getStorableId());
            request.append(");");
            currStatement = connection.prepare(request.toString(),false);
            request.setLength(0);
              currStatement.stepThrough();
              currStatement.dispose();
          }     
          //add all edges------------------
          for(StorableEdge bufEdge : ssg.getEdges()) {
            request.append("insert into edge values(");
            request.append(bufEdge.getStorableId());
View Full Code Here

            request.append(bufEdge.getStorableTarget().getStorableId());
            request.append(");");
            currStatement = connection.prepare(request.toString(),false);
            request.setLength(0);
              currStatement.stepThrough();
              currStatement.dispose();
            //add all attributes---------
            for(StorableAttribute bufAttribute : bufEdge.getStorableAttributes()) {
              request.append("insert into attribute values(");
              request.append(bufAttribute.getStorableId());
              if(bufAttribute.getName() == null) {
View Full Code Here

                request.append("');");
              }
              currStatement = connection.prepare(request.toString(),false);
              request.setLength(0);
                currStatement.stepThrough();
                currStatement.dispose();
              //add composition between edge and attribute
              request.append("insert into com_edge_attribute values(?, ");
              request.append(bufEdge.getStorableId());
              request.append(", ");
              request.append(bufAttribute.getStorableId());
View Full Code Here

              request.append(bufAttribute.getStorableId());
              request.append(");");
              currStatement = connection.prepare(request.toString(),false);
              request.setLength(0);
                currStatement.stepThrough();
                currStatement.dispose();
            }
            //add composition between subgraph and edge
            request.append("insert into com_subgraph_edge values(?, ");
            request.append(ssg.getStorableId());
            request.append(", ");
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.