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());
}
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());
}
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());
}
Aggregations