use of jakarta.nosql.column.ColumnDeleteQuery in project jnosql-diana by eclipse.
the class DefaultColumnMapperDeleteBuilderTest method shouldSelectWhereNameNot.
@Test
public void shouldSelectWhereNameNot() {
ColumnDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("name").not().like("Ada").build();
ColumnDeleteQuery queryExpected = delete().from("Person").where("name").not().like("Ada").build();
assertEquals(queryExpected, query);
}
use of jakarta.nosql.column.ColumnDeleteQuery in project jnosql-diana by eclipse.
the class DefaultColumnMapperDeleteBuilderTest method shouldSelectWhereNameEq.
@Test
public void shouldSelectWhereNameEq() {
ColumnDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("name").eq("Ada").build();
ColumnDeleteQuery queryExpected = delete().from("Person").where("name").eq("Ada").build();
assertEquals(queryExpected, query);
}
use of jakarta.nosql.column.ColumnDeleteQuery 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.column.ColumnDeleteQuery in project jnosql-diana by eclipse.
the class DefaultColumnMapperDeleteBuilderTest method shouldConvertField.
@Test
public void shouldConvertField() {
ColumnDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("id").eq("20").build();
ColumnDeleteQuery queryExpected = delete().from("Person").where("_id").eq(20L).build();
assertEquals(queryExpected, query);
}
use of jakarta.nosql.column.ColumnDeleteQuery in project jnosql-diana by eclipse.
the class DefaultColumnMapperDeleteBuilderTest method shouldSelectWhereNameGt.
@Test
public void shouldSelectWhereNameGt() {
ColumnDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("id").gt(10).build();
ColumnDeleteQuery queryExpected = delete().from("Person").where("_id").gt(10L).build();
assertEquals(queryExpected, query);
}
Aggregations