use of org.apache.jena.jdbc.results.metadata.columns.TimeColumn in project jena by apache.
the class TestMetaResultSet method meta_result_set_time_02.
/**
* Test retrieving meta column values
*
* @throws SQLException
*/
@Test
public void meta_result_set_time_02() throws SQLException {
MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new TimeColumn("Test", ResultSetMetaData.columnNullable) }, new Object[][] { { null } });
Assert.assertTrue(results.next());
Time value = results.getTime(1);
Assert.assertEquals(null, value);
Assert.assertTrue(results.wasNull());
Assert.assertFalse(results.next());
results.close();
Assert.assertTrue(results.isClosed());
}
use of org.apache.jena.jdbc.results.metadata.columns.TimeColumn in project jena by apache.
the class TestMetaResultSet method meta_result_set_time_01.
/**
* Test retrieving meta column values
*
* @throws SQLException
*/
@Test
public void meta_result_set_time_01() throws SQLException {
MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new TimeColumn("Test", ResultSetMetaData.columnNullable) }, new Object[][] { { new Time(0) } });
Assert.assertTrue(results.next());
Time value = results.getTime(1);
Assert.assertEquals(new Time(0), value);
Assert.assertFalse(results.wasNull());
Assert.assertFalse(results.next());
results.close();
Assert.assertTrue(results.isClosed());
}
Aggregations