Search in sources :

Example 1 with SQLServerTemplates

use of com.querydsl.sql.SQLServerTemplates in project querydsl by querydsl.

the class SQLServerQueryTest method tableHints_multiple.

@Test
public void tableHints_multiple() {
    SQLServerQuery<?> query = new SQLServerQuery<Void>(null, new SQLServerTemplates());
    query.from(survey).tableHints(SQLServerTableHints.NOWAIT, SQLServerTableHints.NOLOCK).where(survey.name.isNull());
    assertEquals("from SURVEY SURVEY with (NOWAIT, NOLOCK)\nwhere SURVEY.NAME is null", query.toString());
}
Also used : SQLServerTemplates(com.querydsl.sql.SQLServerTemplates) Test(org.junit.Test)

Example 2 with SQLServerTemplates

use of com.querydsl.sql.SQLServerTemplates in project querydsl by querydsl.

the class SQLServerQueryTest method tableHints_single.

@Test
public void tableHints_single() {
    SQLServerQuery<?> query = new SQLServerQuery<Void>(null, new SQLServerTemplates());
    query.from(survey).tableHints(SQLServerTableHints.NOWAIT).where(survey.name.isNull());
    assertEquals("from SURVEY SURVEY with (NOWAIT)\nwhere SURVEY.NAME is null", query.toString());
}
Also used : SQLServerTemplates(com.querydsl.sql.SQLServerTemplates) Test(org.junit.Test)

Example 3 with SQLServerTemplates

use of com.querydsl.sql.SQLServerTemplates in project querydsl by querydsl.

the class SQLServerQueryTest method tableHints_multiple2.

@Test
public void tableHints_multiple2() {
    QSurvey survey2 = new QSurvey("survey2");
    SQLServerQuery<?> query = new SQLServerQuery<Void>(null, new SQLServerTemplates());
    query.from(survey).tableHints(SQLServerTableHints.NOWAIT).from(survey2).tableHints(SQLServerTableHints.NOLOCK).where(survey.name.isNull());
    assertEquals("from SURVEY SURVEY with (NOWAIT), SURVEY survey2 with (NOLOCK)\nwhere SURVEY.NAME is null", query.toString());
}
Also used : SQLServerTemplates(com.querydsl.sql.SQLServerTemplates) QSurvey(com.querydsl.sql.domain.QSurvey) Test(org.junit.Test)

Aggregations

SQLServerTemplates (com.querydsl.sql.SQLServerTemplates)3 Test (org.junit.Test)3 QSurvey (com.querydsl.sql.domain.QSurvey)1