@Test
public void testIsNull() throws Exception {
db.runTransaction(new ISqlJetTransaction() {
public Object run(SqlJetDb db) throws SqlJetException {
ISqlJetTable table = db.getTable("beans");
table.insertOr(SqlJetConflictAction.REPLACE, null, "SOME MESSAGE");
return true;
}
}, SqlJetTransactionMode.WRITE);
db.runTransaction(new ISqlJetTransaction() {
public Object run(SqlJetDb db) throws SqlJetException {
ISqlJetTable table = db.getTable("beans");
ISqlJetCursor cur = table.lookup(table.getPrimaryKeyIndexName(),1);
if (!cur.eof()) {
long v = cur.getInteger(0);
Assert.assertEquals(1, v);
boolean isNull = cur.isNull(0); // -> returns true
Assert.assertFalse(isNull);