public void testBetweenClause() throws Exception {
DataSource d = ds.executeSQL(
"select * from persona where id between 0 and 2;");
d.start();
Value v0 = ValueFactory.createValue(1);
Value v1 = ValueFactory.createValue("huracan");
Value 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();
d = ds.executeSQL("select * from persona where id not between 0 and 2;");
d.start();
v0 = ValueFactory.createValue(0);
v1 = ValueFactory.createValue("fernando");
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());