use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldSelectWhereNameAnd.
@Test
public void shouldSelectWhereNameAnd() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("age").between(10, 20).and("name").eq("Ada").build();
DocumentDeleteQuery queryExpected = delete().from("Person").where("age").between(10, 20).and("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 shouldQueryBySubEntity.
@Test
public void shouldQueryBySubEntity() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Address.class).where("zipcode.zip").eq("01312321").build();
DocumentDeleteQuery queryExpected = delete().from("Address").where("zip").eq("01312321").build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldConvertField.
@Test
public void shouldConvertField() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("id").eq("20").build();
DocumentDeleteQuery queryExpected = delete().from("Person").where("_id").eq(20L).build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldSelectWhereNameGte.
@Test
public void shouldSelectWhereNameGte() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("id").gte(10).build();
DocumentDeleteQuery queryExpected = delete().from("Person").where("_id").gte(10L).build();
assertEquals(queryExpected, query);
}
use of org.jnosql.diana.api.document.DocumentDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultDocumentMapperDeleteBuilderTest method shouldSelectWhereNameGt.
@Test
public void shouldSelectWhereNameGt() {
DocumentDeleteQuery query = mapperBuilder.deleteFrom(Person.class).where("id").gt(10).build();
DocumentDeleteQuery queryExpected = delete().from("Person").where("_id").gt(10L).build();
assertEquals(queryExpected, query);
}
Aggregations