use of org.jnosql.diana.api.column.ColumnDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultColumnEventPersistManagerTest method shouldFirePreDeleteQuery.
@Test
public void shouldFirePreDeleteQuery() {
ColumnDeleteQuery query = delete().from("person").build();
subject.firePreDeleteQuery(query);
ArgumentCaptor<ColumnDeleteQueryExecute> captor = ArgumentCaptor.forClass(ColumnDeleteQueryExecute.class);
verify(columnDeleteQueryExecute).fire(captor.capture());
assertEquals(query, captor.getValue().getQuery());
}
use of org.jnosql.diana.api.column.ColumnDeleteQuery in project jnosql-artemis 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("job.city").eq("Salvador").build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.column.ColumnDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultColumnMapperDeleteBuilderTest method shouldSelectWhereNameLte.
@Test
public void shouldSelectWhereNameLte() {
ColumnDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("id").lte(10).build();
ColumnDeleteQuery queryExpected = delete().from("Person").where("_id").lte(10L).build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.column.ColumnDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultColumnMapperDeleteBuilderTest method shouldQueryBySubEntity.
@Test
public void shouldQueryBySubEntity() {
ColumnDeleteQuery query = mapperBuilder.deleteFrom(Address.class).where("zipcode.zip").eq("01312321").build();
ColumnDeleteQuery queryExpected = delete().from("Address").where("zip").eq("01312321").build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.column.ColumnDeleteQuery in project jnosql-artemis 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);
}
Aggregations