use of jakarta.nosql.mapping.column.ColumnQueryMapper.ColumnMapperFrom in project jnosql-diana by eclipse.
the class DefaultColumnQueryMapperBuilderTest method shouldReturnSelectFrom.
@Test
public void shouldReturnSelectFrom() {
ColumnMapperFrom columnFrom = mapperBuilder.selectFrom(Person.class);
assertNotNull(columnFrom);
}
use of jakarta.nosql.mapping.column.ColumnQueryMapper.ColumnMapperFrom in project jnosql-diana by eclipse.
the class DefaultColumnMapperSelectBuilderTest method shouldReturnSelectStarFrom.
@Test
public void shouldReturnSelectStarFrom() {
ColumnMapperFrom columnFrom = mapperBuilder.selectFrom(Person.class);
ColumnQuery query = columnFrom.build();
ColumnQuery queryExpected = select().from("Person").build();
assertEquals(queryExpected, query);
}
use of jakarta.nosql.mapping.column.ColumnQueryMapper.ColumnMapperFrom in project jnosql-diana by eclipse.
the class DefaultColumnMapperSelectBuilderTest method shouldCreateQueryWithPagination.
@Test
public void shouldCreateQueryWithPagination() {
Pagination pagination = Pagination.page(2).size(2);
ColumnMapperFrom columnFrom = mapperBuilder.selectFrom(Person.class);
ColumnQuery query = columnFrom.build(pagination);
assertEquals(pagination.getLimit(), query.getLimit());
assertEquals(pagination.getSkip(), query.getSkip());
}
Aggregations