Search in sources :

Example 1 with DoubleColumn

use of org.apache.jena.jdbc.results.metadata.columns.DoubleColumn in project jena by apache.

the class TestMetaResultSet method meta_result_set_double_01.

/**
     * Test retrieving meta column values
     * 
     * @throws SQLException
     */
@Test
public void meta_result_set_double_01() throws SQLException {
    MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new DoubleColumn("Test", ResultSetMetaData.columnNullable) }, new Object[][] { { 0.123d } });
    Assert.assertTrue(results.next());
    double value = results.getDouble(1);
    Assert.assertEquals(0.123d, value, 0d);
    Assert.assertFalse(results.wasNull());
    Assert.assertFalse(results.next());
    results.close();
    Assert.assertTrue(results.isClosed());
}
Also used : MetaResultSet(org.apache.jena.jdbc.metadata.results.MetaResultSet) DoubleColumn(org.apache.jena.jdbc.results.metadata.columns.DoubleColumn) Test(org.junit.Test)

Aggregations

MetaResultSet (org.apache.jena.jdbc.metadata.results.MetaResultSet)1 DoubleColumn (org.apache.jena.jdbc.results.metadata.columns.DoubleColumn)1 Test (org.junit.Test)1