assertTrue(d.getFieldValue(1, 2) instanceof NullValue);
d.stop();
}
public void testInClause() throws Exception {
DataSource d = ds.executeSQL(
"select * from persona where id in (0, 2);");
d.start();
Value v0 = ValueFactory.createValue(0);
Value v1 = ValueFactory.createValue("fernando");
Value v2 = ValueFactory.createValue("gonzalez");
Value v3 = ValueFactory.createValue(2);
Value v4 = ValueFactory.createValue("fernan");
assertTrue(d.getRowCount() == 2);
assertTrue(((BooleanValue) d.getFieldValue(0, 0).equals(v0)).getValue());
assertTrue(((BooleanValue) d.getFieldValue(0, 1).equals(v1)).getValue());
assertTrue(((BooleanValue) d.getFieldValue(0, 2).equals(v2)).getValue());
assertTrue(((BooleanValue) d.getFieldValue(1, 0).equals(v3)).getValue());
assertTrue(((BooleanValue) d.getFieldValue(1, 1).equals(v4)).getValue());
assertTrue(d.getFieldValue(1, 2) instanceof NullValue);
d.stop();
d = ds.executeSQL(
"select * from persona where id not in (0, 2);");
d.start();
v0 = ValueFactory.createValue(1);
v1 = ValueFactory.createValue("huracan");
v2 = ValueFactory.createValue("gonsales");
assertTrue(d.getRowCount() == 1);
assertTrue(((BooleanValue) d.getFieldValue(0, 0).equals(v0)).getValue());
assertTrue(((BooleanValue) d.getFieldValue(0, 1).equals(v1)).getValue());
assertTrue(((BooleanValue) d.getFieldValue(0, 2).equals(v2)).getValue());
d.stop();
}