use of jakarta.nosql.tck.entities.Worker in project jnosql-diana by eclipse.
the class DefaultColumnMapperDeleteBuilderTest method shouldQueryByEmbeddable.
@Test
public void shouldQueryByEmbeddable() {
ColumnDeleteQuery query = mapperBuilder.deleteFrom(Worker.class).where("job.city").eq("Salvador").build();
ColumnDeleteQuery queryExpected = delete().from("Worker").where("city").eq("Salvador").build();
assertEquals(queryExpected, query);
}
use of jakarta.nosql.tck.entities.Worker in project jnosql-diana by eclipse.
the class DefaultColumnMapperDeleteBuilderTest method shouldUseAttributeConverter.
@Test
public void shouldUseAttributeConverter() {
ColumnDeleteQuery query = mapperBuilder.deleteFrom(Worker.class).where("salary").eq(new Money("USD", BigDecimal.TEN)).build();
ColumnDeleteQuery queryExpected = delete().from("Worker").where("money").eq("USD 10").build();
assertEquals(queryExpected, query);
}
use of jakarta.nosql.tck.entities.Worker in project jnosql-diana by eclipse.
the class DefaultColumnMapperSelectBuilderTest method shouldSelectOrderAsc.
@Test
public void shouldSelectOrderAsc() {
ColumnQuery query = mapperBuilder.selectFrom(Worker.class).orderBy("salary").asc().build();
ColumnQuery queryExpected = select().from("Worker").orderBy("money").asc().build();
assertEquals(queryExpected, query);
}
use of jakarta.nosql.tck.entities.Worker in project jnosql-diana by eclipse.
the class DefaultColumnMapperSelectBuilderTest method shouldUseAttributeConverter.
@Test
public void shouldUseAttributeConverter() {
ColumnQuery query = mapperBuilder.selectFrom(Worker.class).where("salary").eq(new Money("USD", BigDecimal.TEN)).build();
ColumnQuery queryExpected = select().from("Worker").where("money").eq("USD 10").build();
assertEquals(queryExpected, query);
}
use of jakarta.nosql.tck.entities.Worker in project jnosql-diana by eclipse.
the class DefaultColumnMapperSelectBuilderTest method shouldSelectOrderDesc.
@Test
public void shouldSelectOrderDesc() {
ColumnQuery query = mapperBuilder.selectFrom(Worker.class).orderBy("salary").desc().build();
ColumnQuery queryExpected = select().from("Worker").orderBy("money").desc().build();
assertEquals(queryExpected, query);
}
Aggregations