Package org.apache.jena.jdbc.metadata.results

Examples of org.apache.jena.jdbc.metadata.results.MetaResultSet


        return new MetaResultSet(MetadataSchema.getTablePrivilegeColumns());
    }

    @Override
    public ResultSet getTableTypes() throws SQLException {
        return new MetaResultSet(MetadataSchema.getTableTypeColumns());
    }
View Full Code Here


        return new MetaResultSet(MetadataSchema.getTableTypeColumns());
    }

    @Override
    public ResultSet getTables(String arg0, String arg1, String arg2, String[] arg3) throws SQLException {
        return new MetaResultSet(MetadataSchema.getTableColumns());
    }
View Full Code Here

        // SQL_DATA_TYPE int => unused
        // SQL_DATETIME_SUB int => unused
        // NUM_PREC_RADIX int => usually 2 or 10

        // Report types we can marshal appropriately
        return new MetaResultSet(MetadataSchema.getTypeInfoColumns(), new Object[][] {
                { XSD.xboolean.toString(), Types.BOOLEAN, 0, null, null, null, (short) typeNullable, false,
                        (short) typeSearchable, false, false, false, null, (short) 0, (short) 0, 0, 0, 0 },
                { XSD.xbyte.toString(), Types.TINYINT, Byte.toString(Byte.MAX_VALUE).length(), "\"", "\"", null,
                        (short) typeNullable, false, (short) typeSearchable, false, false, false, null, (short) 0, (short) 0, 0,
                        0, 0 },
View Full Code Here

                        false, false, false, null, (short) 0, (short) 0, 0, 0, 0 }, });
    }

    @Override
    public ResultSet getUDTs(String arg0, String arg1, String arg2, int[] arg3) throws SQLException {
        return new MetaResultSet(MetadataSchema.getUdtColumns());
    }
View Full Code Here

        return null;
    }

    @Override
    public ResultSet getVersionColumns(String arg0, String arg1, String arg2) throws SQLException {
        return new MetaResultSet(MetadataSchema.getVersionColumns());
    }
View Full Code Here

    public abstract boolean usesLocalFiles() throws SQLException;

    @SuppressWarnings("javadoc")
    public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
            throws SQLException {
        return new MetaResultSet(MetadataSchema.getPsuedoColumnColumns());
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test
    public void meta_result_set_integer_02() throws SQLException {
        MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new IntegerColumn("Test", ResultSetMetaData.columnNullable,
                true) }, new Object[][] { { null } });

        Assert.assertTrue(results.next());
        int value = results.getInt(1);
        Assert.assertEquals(0, value);
        Assert.assertTrue(results.wasNull());

        Assert.assertFalse(results.next());
        results.close();
        Assert.assertTrue(results.isClosed());
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test
    public void meta_result_set_long_integer_01() throws SQLException {
        MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new LongIntegerColumn("Test",
                ResultSetMetaData.columnNullable, true) }, new Object[][] { { 1234l } });

        Assert.assertTrue(results.next());
        long value = results.getLong(1);
        Assert.assertEquals(1234, value);
        Assert.assertFalse(results.wasNull());

        Assert.assertFalse(results.next());
        results.close();
        Assert.assertTrue(results.isClosed());
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test
    public void meta_result_set_long_integer_02() throws SQLException {
        MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new LongIntegerColumn("Test",
                ResultSetMetaData.columnNullable, true) }, new Object[][] { { null } });

        Assert.assertTrue(results.next());
        long value = results.getLong(1);
        Assert.assertEquals(0, value);
        Assert.assertTrue(results.wasNull());

        Assert.assertFalse(results.next());
        results.close();
        Assert.assertTrue(results.isClosed());
    }
View Full Code Here

     *
     * @throws SQLException
     */
    @Test
    public void meta_result_set_short_integer_01() throws SQLException {
        MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new ShortIntegerColumn("Test",
                ResultSetMetaData.columnNullable, true) }, new Object[][] { { (short) 1234 } });

        Assert.assertTrue(results.next());
        short value = results.getShort(1);
        Assert.assertEquals((short) 1234, value);
        Assert.assertFalse(results.wasNull());

        Assert.assertFalse(results.next());
        results.close();
        Assert.assertTrue(results.isClosed());
    }
View Full Code Here

TOP

Related Classes of org.apache.jena.jdbc.metadata.results.MetaResultSet

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.