use of com.ctrip.platform.dal.dao.sqlbuilder.Clause in project dal by ctripcorp.
the class AbstractFreeSqlBuilderTest method testExpression.
@Test
public void testExpression() throws SQLException {
Clause test = expression(template);
AbstractFreeSqlBuilder builder = create();
builder.append(test);
builder.setLogicDbName(logicDbName);
assertEquals(template, test.build());
}
use of com.ctrip.platform.dal.dao.sqlbuilder.Clause in project dal by ctripcorp.
the class ExpressionsTest method testBracket.
@Test
public void testBracket() throws SQLException {
Clause test = bracket(expression(template));
setEnv(test);
assertEquals("(" + template + ")", test.build());
}
use of com.ctrip.platform.dal.dao.sqlbuilder.Clause in project dal by ctripcorp.
the class ExpressionsTest method testLeftBracket.
@Test
public void testLeftBracket() throws SQLException {
Clause test = leftBracket;
setEnv(test);
assertEquals("(", test.build());
}
use of com.ctrip.platform.dal.dao.sqlbuilder.Clause in project dal by ctripcorp.
the class ExpressionsTest method testIn.
@Test
public void testIn() throws SQLException {
Clause test = in(template);
setEnv(test);
assertEquals(wrappedTemplate + " IN ( ? )", test.build());
}
use of com.ctrip.platform.dal.dao.sqlbuilder.Clause in project dal by ctripcorp.
the class ExpressionsTest method testNotlike.
@Test
public void testNotlike() throws SQLException {
Clause test = notLike(template);
setEnv(test);
assertEquals(wrappedTemplate + " NOT LIKE ?", test.build());
}
Aggregations