use of jakarta.nosql.document.DocumentDeleteQuery in project jnosql-diana 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);
}
use of jakarta.nosql.document.DocumentDeleteQuery in project jnosql-diana 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 jakarta.nosql.document.DocumentDeleteQuery in project jnosql-diana 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 jakarta.nosql.document.DocumentDeleteQuery in project jnosql-diana 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 jakarta.nosql.document.DocumentDeleteQuery in project jnosql-diana 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