use of com.querydsl.sql.domain.QSurvey in project querydsl by querydsl.
the class RelationalFunctionCallTest method validation.
@Test
public void validation() {
QSurvey survey = QSurvey.survey;
TokenizeFunction func = new TokenizeFunction("func", "a", "b");
SQLQuery<?> sub = selectOne().from(func.as(func.alias)).where(survey.name.like(func.token));
System.out.println(sub);
}
use of com.querydsl.sql.domain.QSurvey in project querydsl by querydsl.
the class RelationalPathTest method in_tuple.
@Test
public void in_tuple() throws ClassNotFoundException, IOException {
//(survey.id, survey.name)
QSurvey survey = QSurvey.survey;
QTuple tuple = Projections.tuple(survey.id, survey.name);
serialize(tuple);
serialize(tuple.newInstance(1, "a"));
}
use of com.querydsl.sql.domain.QSurvey in project querydsl by querydsl.
the class RelationalPathTest method path.
@Test
public void path() throws ClassNotFoundException, IOException {
QSurvey survey = QSurvey.survey;
QSurvey survey2 = serialize(survey);
assertEquals(Arrays.asList(survey.all()), Arrays.asList(survey2.all()));
assertEquals(survey.getMetadata(), survey2.getMetadata());
assertEquals(survey.getMetadata(survey.id), survey2.getMetadata(survey.id));
}
use of com.querydsl.sql.domain.QSurvey 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