use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldSelectWhereNameBetween.
@Test
public void shouldSelectWhereNameBetween() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("id").between(10, 20).build();
DocumentDeleteQuery queryExpected = delete().from("Person").where("_id").between(10L, 20L).build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldSelectWhereNameLte.
@Test
public void shouldSelectWhereNameLte() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("id").lte(10).build();
DocumentDeleteQuery queryExpected = delete().from("Person").where("_id").lte(10L).build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldUseAttibuteConverter.
@Test
public void shouldUseAttibuteConverter() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Worker.class).where("salary").eq(new Money("USD", BigDecimal.TEN)).build();
DocumentDeleteQuery queryExpected = delete().from("Worker").where("money").eq("USD 10").build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldSelectWhereNameNot.
@Test
public void shouldSelectWhereNameNot() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("name").not().like("Ada").build();
DocumentDeleteQuery queryExpected = delete().from("Person").where("name").not().like("Ada").build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldSelectWhereNameEq.
@Test
public void shouldSelectWhereNameEq() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("name").eq("Ada").build();
DocumentDeleteQuery queryExpected = delete().from("Person").where("name").eq("Ada").build();
assertEquals(queryExpected, query);
}
Aggregations