Search in sources :

Example 6 with Address

use of org.jnosql.artemis.model.Address 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);
}
Also used : Address(org.jnosql.artemis.model.Address) DocumentDeleteQuery(org.jnosql.diana.api.document.DocumentDeleteQuery) Test(org.junit.jupiter.api.Test)

Example 7 with Address

use of org.jnosql.artemis.model.Address 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);
}
Also used : Address(org.jnosql.artemis.model.Address) ColumnDeleteQuery(org.jnosql.diana.api.column.ColumnDeleteQuery) Test(org.junit.jupiter.api.Test)

Example 8 with Address

use of org.jnosql.artemis.model.Address in project jnosql-artemis by eclipse.

the class DefaultColumnMapperSelectBuilderTest method shouldQueryBySubEntity.

@Test
public void shouldQueryBySubEntity() {
    ColumnQuery query = mapperBuilder.selectFrom(Address.class).where("zipcode.zip").eq("01312321").build();
    ColumnQuery queryExpected = select().from("Address").where("zip").eq("01312321").build();
    assertEquals(queryExpected, query);
}
Also used : ColumnQuery(org.jnosql.diana.api.column.ColumnQuery) Address(org.jnosql.artemis.model.Address) Test(org.junit.jupiter.api.Test)

Aggregations

Address (org.jnosql.artemis.model.Address)8 Test (org.junit.jupiter.api.Test)8 Zipcode (org.jnosql.artemis.model.Zipcode)2 ColumnEntity (org.jnosql.diana.api.column.ColumnEntity)2 DocumentEntity (org.jnosql.diana.api.document.DocumentEntity)2 Column (org.jnosql.diana.api.column.Column)1 ColumnDeleteQuery (org.jnosql.diana.api.column.ColumnDeleteQuery)1 ColumnQuery (org.jnosql.diana.api.column.ColumnQuery)1 Document (org.jnosql.diana.api.document.Document)1 DocumentDeleteQuery (org.jnosql.diana.api.document.DocumentDeleteQuery)1 DocumentQuery (org.jnosql.diana.api.document.DocumentQuery)1