Search in sources :

Example 31 with StringPath

use of com.querydsl.core.types.dsl.StringPath in project querydsl by querydsl.

the class LuceneSerializerNotTokenizedTest method multiple_field_search_from_movies.

@Test
public void multiple_field_search_from_movies() throws Exception {
    StringPath movie = Expressions.stringPath("movie");
    testQuery(movie.in("Interview with the Vampire"), "movie:Interview with the Vampire", 1);
    testQuery(movie.eq("Up in the Air"), "movie:Up in the Air", 1);
}
Also used : StringPath(com.querydsl.core.types.dsl.StringPath) Test(org.junit.Test)

Example 32 with StringPath

use of com.querydsl.core.types.dsl.StringPath in project querydsl by querydsl.

the class LuceneSerializerTest method eq_with_deep_path.

@Test
public void eq_with_deep_path() throws Exception {
    StringPath deepPath = entityPath.get("property1", Object.class).getString("property2");
    testQuery(deepPath.eq("good"), "property1.property2:good", 0);
}
Also used : StringPath(com.querydsl.core.types.dsl.StringPath) Test(org.junit.Test)

Example 33 with StringPath

use of com.querydsl.core.types.dsl.StringPath in project querydsl by querydsl.

the class UpdateBase method setNullEmptyRootPath.

@Test
@SkipForQuoted
@ExcludeIn({ DERBY })
public void setNullEmptyRootPath() {
    StringPath name = Expressions.stringPath("name");
    long count = query().from(survey).fetchCount();
    assertEquals(count, execute(update(survey).setNull(name)));
}
Also used : StringPath(com.querydsl.core.types.dsl.StringPath) Test(org.junit.Test) ExcludeIn(com.querydsl.core.testutil.ExcludeIn)

Aggregations

StringPath (com.querydsl.core.types.dsl.StringPath)33 Test (org.junit.Test)33 DefaultQueryMetadata (com.querydsl.core.DefaultQueryMetadata)6 QueryMetadata (com.querydsl.core.QueryMetadata)6 Tuple (com.querydsl.core.Tuple)4 QTuple (com.querydsl.core.types.QTuple)2 LuceneSerializer (com.querydsl.lucene5.LuceneSerializer)2 Ignore (org.junit.Ignore)2 ExcludeIn (com.querydsl.core.testutil.ExcludeIn)1 JavaTemplates (com.querydsl.core.types.JavaTemplates)1 Predicate (com.querydsl.core.types.Predicate)1 BooleanExpression (com.querydsl.core.types.dsl.BooleanExpression)1 PhraseElement (com.querydsl.lucene5.PhraseElement)1 TermElement (com.querydsl.lucene5.TermElement)1 BigDecimal (java.math.BigDecimal)1