Examples of createStatement()


Examples of com.alibaba.druid.pool.DruidPooledConnection.createStatement()

            @Override
            public void run() {
                try {
                    DruidPooledConnection conn = dataSource.getConnection();
                    Statement stmt = conn.createStatement();

                    CloseTask closeTask = new CloseTask(conn, closeLatch);

                    closeExecutor.submit(closeTask);
                    closeExecutor.submit(closeTask); // dup close
View Full Code Here

Examples of com.alibaba.druid.proxy.jdbc.ConnectionProxy.createStatement()

        };

        ConnectionProxy conn = (ConnectionProxy) dataSource.connect(new Properties());

        {
            StatementProxy stmt = (StatementProxy) conn.createStatement();
            MockResultSet rs = new MockResultSet(null) {

                @Override
                public ResultSetMetaData getMetaData() throws SQLException {
                    return rsMeta;
View Full Code Here

Examples of com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.createStatement()

        Assert.assertNull(connection.unwrap(null));

        org.apache.derby.impl.jdbc.EmbedConnection derbyConnection = connection.unwrap(org.apache.derby.impl.jdbc.EmbedConnection.class);
        Assert.assertNotNull(derbyConnection);

        Statement statement = connection.createStatement();
        Assert.assertFalse(statement.isWrapperFor(com.mysql.jdbc.Statement.class));
        Assert.assertFalse(statement.isWrapperFor(null));
        Assert.assertTrue(statement.isWrapperFor(org.apache.derby.impl.jdbc.EmbedStatement.class));

        org.apache.derby.impl.jdbc.EmbedStatement rayStatement = statement.unwrap(org.apache.derby.impl.jdbc.EmbedStatement.class);
View Full Code Here

Examples of com.facebook.presto.sql.parser.SqlParser.createStatement()

            throws Exception
    {
        ClientOptions options = new ClientOptions();
        ClientSession session = options.toClientSession();
        SqlParser sqlParser = new SqlParser();
        session = Console.processSessionParameterChange(sqlParser.createStatement("USE CATALOG test_catalog"), session);
        assertEquals(session.getCatalog(), "test_catalog");
        session = Console.processSessionParameterChange(sqlParser.createStatement("USE SCHEMA test_schema"), session);
        assertEquals(session.getSchema(), "test_schema");
    }
}
View Full Code Here

Examples of com.google.code.hs4j.IndexSession.createStatement()

        "NAME_MAIL_INDEX", icolumns, fcolumns));
    assertTrue(this.hsClient.insert(indexId, new String[] { "0", "dennis",
        "killme2008@gmail.com", "7", "2010-11-28 13:24:00" }));

    final String[] keys = {"dennis", "killme2008@gmail.com"};
    ModifyStatement stmt = session.createStatement();
    stmt.setInt(1, 1);

    // increment 100
    sum = 100;
    for (i = 0; i < sum; i++) {
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntModel.createStatement()

    Resource a = model.createResource( "a", OWL.Thing );
    Resource b = model.createResource( "b", OWL.Thing );
    Literal lit = model.createLiteral( "l" );

    Statement[] stats = new Statement[] {
      model.createStatement( a, OWL2.topObjectProperty, b ),
      model.createStatement( a, OWL2.topDataProperty, lit ),
      model.createStatement( a, OWL2.bottomObjectProperty, b ),
      model.createStatement( a, OWL2.bottomDataProperty, lit )
    };
   
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.InfModel.createStatement()

        Reasoner r = ReasonerRegistry.getOWLReasoner();
        InfModel omodel = ModelFactory.createInfModel(r, model);
        String baseuri = "http://decsai.ugr.es/~ontoserver/bacarex2.owl#";
//        Resource js = omodel.getResource(baseuri + "JS");
        Resource surname = omodel.getResource(baseuri + "surname");
        Statement s = omodel.createStatement(surname, RDFS.range, OWL.Nothing);
        assertTrue(! omodel.contains(s));
    }

    /**
     * Test change of RDF specs to allow plain literals w/o lang and XSD string to be the same.
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Model.createStatement()

    String value = ((Text) n).getNodeValue();
    value = processWhitespace(n,value,null,ctx);
    if (!value.equals("")) {
      Model m = ctx.getModel();
      Literal lit = m.createLiteral(value);
      Statement stmt = m.createStatement(subject, RDF.value, lit);
      m.add(stmt);
      if (seq!=null) seq.add(stmt.createReifiedStatement());
    }
  }
 
View Full Code Here

Examples of com.knowgate.jdc.JDCConnection.createStatement()

      int iDeleted = oDeleted.load(oConn);
      if (DebugFile.trace) DebugFile.writeln("there are "+String.valueOf(iDeleted)+" messages to be deleted");

      // ****************************************
      // Erase files referenced by draft messages   
      oStmt = oConn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
      if (DebugFile.trace) DebugFile.writeln("Statement.executeQuery(SELECT p." + DB.file_name + " FROM " + DB.k_mime_parts + " p," + DB.k_mime_msgs + " m WHERE p." + DB.gu_mimemsg + "=m."+ DB.gu_mimemsg + " AND m." + DB.id_disposition + "='reference' AND m." + DB.bo_deleted + "=1 AND m." + DB.gu_category +"='"+oCatg.getString(DB.gu_category)+"')");
      oRSet = oStmt.executeQuery("SELECT p." + DB.file_name + " FROM " + DB.k_mime_parts + " p," + DB.k_mime_msgs + " m WHERE p." + DB.gu_mimemsg + "=m."+ DB.gu_mimemsg + " AND m." + DB.id_disposition + "='reference' AND m." + DB.bo_deleted + "=1 AND m." + DB.gu_category +"='"+oCatg.getString(DB.gu_category)+"'");

      while (oRSet.next()) {
        String sFileName = oRSet.getString(1);
View Full Code Here

Examples of com.mchange.v2.c3p0.C3P0ProxyConnection.createStatement()

    System.out.println("rawConnection.toString() -> " +
           conn.rawConnectionOperation(toStringMethod, C3P0ProxyConnection.RAW_CONNECTION, new Object[]{}));
    Integer ihc = (Integer) conn.rawConnectionOperation(identityHashCodeMethod, null, new Object[]{C3P0ProxyConnection.RAW_CONNECTION});
    System.out.println("System.identityHashCode( rawConnection ) -> " + Integer.toHexString( ihc.intValue() ));

    C3P0ProxyStatement stmt = (C3P0ProxyStatement) conn.createStatement();
    System.out.println("rawStatement.toString() -> " +
           stmt.rawStatementOperation(toStringMethod, C3P0ProxyStatement.RAW_STATEMENT, new Object[]{}));
    Integer ihc2 = (Integer) stmt.rawStatementOperation(identityHashCodeMethod, null, new Object[]{C3P0ProxyStatement.RAW_STATEMENT});
    System.out.println("System.identityHashCode( rawStatement ) -> " + Integer.toHexString( ihc2.intValue() ));
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.