Package org.apache.jena.jdbc.connections

Examples of org.apache.jena.jdbc.connections.JenaConnection.createStatement()


     * @throws SQLException
     */
    @Test
    public void statement_metadata_01() throws SQLException {
        JenaConnection conn = this.getConnection();
        Statement stmt = conn.createStatement();

        Assert.assertEquals(ResultSet.TYPE_FORWARD_ONLY, stmt.getResultSetType());
        Assert.assertEquals(conn.getHoldability(), stmt.getResultSetHoldability());
        Assert.assertEquals(ResultSet.CONCUR_READ_ONLY, stmt.getResultSetConcurrency());
    }
View Full Code Here


     * @throws SQLException
     */
    @Test
    public void statement_metadata_02() throws SQLException {
        JenaConnection conn = this.getConnection();
        Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY,
                ResultSet.HOLD_CURSORS_OVER_COMMIT);

        Assert.assertEquals(ResultSet.TYPE_SCROLL_INSENSITIVE, stmt.getResultSetType());
        Assert.assertEquals(ResultSet.HOLD_CURSORS_OVER_COMMIT, stmt.getResultSetHoldability());
        Assert.assertEquals(ResultSet.CONCUR_READ_ONLY, stmt.getResultSetConcurrency());
View Full Code Here

     * @throws SQLException
     */
    @Test
    public void statement_warnings_05() throws SQLException {
        JenaConnection conn = this.getConnection();
        JenaStatement stmt = (JenaStatement) conn.createStatement();

        Assert.assertNull(stmt.getWarnings());
        stmt.setWarning("A");
        Assert.assertNotNull(stmt.getWarnings());
        stmt.setWarning("B");
View Full Code Here

     * @throws SQLException
     */
    @Test
    public void statement_fetch_direction_01() throws SQLException {
        JenaConnection conn = this.getConnection();
        Statement stmt = conn.createStatement();

        Assert.assertEquals(ResultSet.FETCH_FORWARD, stmt.getFetchDirection());
        conn.close();
    }

View Full Code Here

     * @throws SQLException
     */
    @Test(expected = SQLFeatureNotSupportedException.class)
    public void statement_fetch_direction_02() throws SQLException {
        JenaConnection conn = this.getConnection();
        Statement stmt = conn.createStatement();

        try {
            // Only FETCH_FORWARD is supported
            stmt.setFetchDirection(ResultSet.FETCH_REVERSE);
        } finally {
View Full Code Here

     * @throws SQLException
     */
    @Test(expected = SQLException.class)
    public void statement_closed_execute_01() throws SQLException {
        JenaConnection conn = this.getConnection();
        Statement stmt = conn.createStatement();

        stmt.close();

        try {
            stmt.execute("SELECT * WHERE { ?s ?p ?o }");
View Full Code Here

     * @throws SQLException
     */
    @Test(expected = SQLException.class)
    public void statement_closed_execute_02() throws SQLException {
        JenaConnection conn = this.getConnection();
        Statement stmt = conn.createStatement();

        stmt.close();

        try {
            stmt.execute("SELECT * WHERE { ?s ?p ?o }", 0);
View Full Code Here

     * @throws SQLException
     */
    @Test(expected = SQLException.class)
    public void statement_closed_execute_03() throws SQLException {
        JenaConnection conn = this.getConnection();
        Statement stmt = conn.createStatement();

        stmt.close();

        try {
            stmt.execute("SELECT * WHERE { ?s ?p ?o }", new int[0]);
View Full Code Here

     * @throws SQLException
     */
    @Test(expected = SQLException.class)
    public void statement_closed_execute_04() throws SQLException {
        JenaConnection conn = this.getConnection();
        Statement stmt = conn.createStatement();

        stmt.close();

        try {
            stmt.execute("SELECT * WHERE { ?s ?p ?o }", new String[0]);
View Full Code Here

     * @throws SQLException
     */
    @Test(expected = SQLException.class)
    public void statement_closed_execute_05() throws SQLException {
        JenaConnection conn = this.getConnection();
        Statement stmt = conn.createStatement();

        stmt.close();

        try {
            stmt.executeQuery("SELECT * WHERE { ?s ?p ?o }");
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.