Package org.apache.jena.jdbc.connections

Examples of org.apache.jena.jdbc.connections.JenaConnection


     *
     * @throws SQLException
     */
    @Test(expected = SQLFeatureNotSupportedException.class)
    public void prepared_statement_unsupported_setters_26() throws SQLException {
        JenaConnection conn = this.getConnection();
        PreparedStatement stmt = conn.prepareStatement("SELECT * WHERE { ? ?p ?o }");

        try {
            stmt.setNull(1, 0, null);
        } finally {
            stmt.close();
            conn.close();
        }
    }
View Full Code Here


     *
     * @throws SQLException
     */
    @Test(expected = SQLFeatureNotSupportedException.class)
    public void prepared_statement_unsupported_setters_27() throws SQLException {
        JenaConnection conn = this.getConnection();
        PreparedStatement stmt = conn.prepareStatement("SELECT * WHERE { ? ?p ?o }");

        try {
            // 4 argument form is unsupported, others are supported
            stmt.setObject(1, null, 0, 0);
        } finally {
            stmt.close();
            conn.close();
        }
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test(expected = SQLFeatureNotSupportedException.class)
    public void prepared_statement_unsupported_setters_28() throws SQLException {
        JenaConnection conn = this.getConnection();
        PreparedStatement stmt = conn.prepareStatement("SELECT * WHERE { ? ?p ?o }");

        try {
            stmt.setRef(1, null);
        } finally {
            stmt.close();
            conn.close();
        }
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test(expected = SQLFeatureNotSupportedException.class)
    public void prepared_statement_unsupported_setters_29() throws SQLException {
        JenaConnection conn = this.getConnection();
        PreparedStatement stmt = conn.prepareStatement("SELECT * WHERE { ? ?p ?o }");

        try {
            stmt.setRowId(1, null);
        } finally {
            stmt.close();
            conn.close();
        }
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test(expected = SQLFeatureNotSupportedException.class)
    public void prepared_statement_unsupported_setters_30() throws SQLException {
        JenaConnection conn = this.getConnection();
        PreparedStatement stmt = conn.prepareStatement("SELECT * WHERE { ? ?p ?o }");

        try {
            stmt.setSQLXML(1, null);
        } finally {
            stmt.close();
            conn.close();
        }
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test(expected = SQLFeatureNotSupportedException.class)
    public void prepared_statement_unsupported_setters_31() throws SQLException {
        JenaConnection conn = this.getConnection();
        PreparedStatement stmt = conn.prepareStatement("SELECT * WHERE { ? ?p ?o }");

        try {
            stmt.setTime(1, null, null);
        } finally {
            stmt.close();
            conn.close();
        }
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test(expected = SQLFeatureNotSupportedException.class)
    public void prepared_statement_unsupported_setters_32() throws SQLException {
        JenaConnection conn = this.getConnection();
        PreparedStatement stmt = conn.prepareStatement("SELECT * WHERE { ? ?p ?o }");

        try {
            stmt.setTimestamp(1, null);
        } finally {
            stmt.close();
            conn.close();
        }
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test(expected = SQLFeatureNotSupportedException.class)
    public void prepared_statement_unsupported_setters_33() throws SQLException {
        JenaConnection conn = this.getConnection();
        PreparedStatement stmt = conn.prepareStatement("SELECT * WHERE { ? ?p ?o }");

        try {
            stmt.setTimestamp(1, null, null);
        } finally {
            stmt.close();
            conn.close();
        }
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test
    public void prepared_statement_setters_10() throws SQLException {
        JenaConnection conn = this.getConnection();
        JenaPreparedStatement stmt = (JenaPreparedStatement) conn.prepareStatement("SELECT * WHERE { ?s ?p ? }");

        stmt.setObject(1, new Date(0));
        ParameterizedSparqlString pss = stmt.getParameterizedString();
        Assert.assertTrue(pss.toString().contains(XSDDatatype.XSDdate.getURI()));

        stmt.close();
        conn.close();
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test
    public void prepared_statement_setters_11() throws SQLException {
        JenaConnection conn = this.getConnection();
        JenaPreparedStatement stmt = (JenaPreparedStatement) conn.prepareStatement("SELECT * WHERE { ?s ?p ? }");

        stmt.setObject(1, new Time(0));
        ParameterizedSparqlString pss = stmt.getParameterizedString();
        Assert.assertTrue(pss.toString().contains(XSDDatatype.XSDtime.getURI()));

        stmt.close();
        conn.close();
    }
View Full Code Here

TOP

Related Classes of org.apache.jena.jdbc.connections.JenaConnection

Copyright © 2018 www.massapicom. 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.