use of jakarta.nosql.mapping.document.DocumentQueryMapper.DocumentMapperFrom in project jnosql-diana by eclipse.
the class DefaultDocumentMapperSelectBuilderTest method shouldCreateQueryWithPagination.
@Test
public void shouldCreateQueryWithPagination() {
Pagination pagination = Pagination.page(2).size(2);
DocumentMapperFrom columnFrom = mapperBuilder.selectFrom(Person.class);
DocumentQuery query = columnFrom.build(pagination);
assertEquals(pagination.getLimit(), query.getLimit());
assertEquals(pagination.getSkip(), query.getSkip());
}
use of jakarta.nosql.mapping.document.DocumentQueryMapper.DocumentMapperFrom in project jnosql-diana by eclipse.
the class DefaultDocumentMapperSelectBuilderTest method shouldReturnSelectStarFrom.
@Test
public void shouldReturnSelectStarFrom() {
DocumentMapperFrom documentFrom = mapperBuilder.selectFrom(Person.class);
DocumentQuery query = documentFrom.build();
DocumentQuery queryExpected = select().from("Person").build();
assertEquals(queryExpected, query);
}
Aggregations