use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldSelectWhereNameLt.
@Test
public void shouldSelectWhereNameLt() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("id").lt(10).build();
DocumentDeleteQuery queryExpected = delete().from("Person").where("_id").lt(10L).build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldSelectWhereNameOr.
@Test
public void shouldSelectWhereNameOr() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("id").between(10, 20).or("name").eq("Ada").build();
DocumentDeleteQuery queryExpected = delete().from("Person").where("_id").between(10L, 20L).or("name").eq("Ada").build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldReturnDeleteFrom.
@Test
public void shouldReturnDeleteFrom() {
DocumentDeleteFrom DocumentFrom = mapperBuilder.deleteFrom(Person.class);
DocumentDeleteQuery query = DocumentFrom.build();
DocumentDeleteQuery queryExpected = delete().from("Person").build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldQueryByEmbeddable.
@Test
public void shouldQueryByEmbeddable() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Worker.class).where("job.city").eq("Salvador").build();
DocumentDeleteQuery queryExpected = delete().from("Worker").where("job.city").eq("Salvador").build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldSelectWhereNameLike.
@Test
public void shouldSelectWhereNameLike() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("name").like("Ada").build();
DocumentDeleteQuery queryExpected = delete().from("Person").where("name").like("Ada").build();
assertEquals(queryExpected, query);
}
Aggregations