map.addIndex("name", false);
testPredicateStringAttribute(map);
}
private void testPredicateStringAttribute(IMap map) {
map.put(1, new Value("abc"));
map.put(2, new Value("xyz"));
map.put(3, new Value("aaa"));
map.put(4, new Value("zzz"));
map.put(5, new Value("klm"));
map.put(6, new Value("prs"));
map.put(7, new Value("prs"));
map.put(8, new Value("def"));
map.put(9, new Value("qwx"));
assertEquals(8, map.values(new SqlPredicate("name > 'aac'")).size());
assertEquals(9, map.values(new SqlPredicate("name between 'aaa' and 'zzz'")).size());
assertEquals(7, map.values(new SqlPredicate("name < 't'")).size());
assertEquals(6, map.values(new SqlPredicate("name >= 'gh'")).size());
assertEquals(8, map.values(new PredicateBuilder().getEntryObject().get("name").greaterThan("aac")).size());