use of com.baidu.hugegraph.backend.query.IdPrefixQuery in project incubator-hugegraph by apache.
the class QueryTest method testToStringOfIdPrefixQuery.
@Test
public void testToStringOfIdPrefixQuery() {
IdPrefixQuery query = new IdPrefixQuery(HugeType.EDGE, IdGenerator.of(1));
query.limit(5L);
Assert.assertEquals("`Query * from EDGE limit 5 where id prefix " + "with 1`", query.toString());
query = new IdPrefixQuery(query, IdGenerator.of(12), IdGenerator.of(1));
Assert.assertEquals("`Query * from EDGE limit 5 where id prefix " + "with 1 and start with 12(inclusive)`", query.toString());
query = new IdPrefixQuery(query, IdGenerator.of(12), false, IdGenerator.of(1));
Assert.assertEquals("`Query * from EDGE limit 5 where id prefix " + "with 1 and start with 12(exclusive)`", query.toString());
}
Aggregations