Search in sources :

Example 6 with Clause

use of com.ctrip.platform.dal.dao.sqlbuilder.Clause in project dal by ctripcorp.

the class ExpressionsTest method testEqual.

@Test
public void testEqual() throws SQLException {
    Clause test = equal(template);
    setEnv(test);
    assertEquals(wrappedTemplate + " = ?", test.build());
}
Also used : Clause(com.ctrip.platform.dal.dao.sqlbuilder.Clause) Test(org.junit.Test)

Example 7 with Clause

use of com.ctrip.platform.dal.dao.sqlbuilder.Clause in project dal by ctripcorp.

the class ExpressionsTest method testLessThan.

@Test
public void testLessThan() throws SQLException {
    Clause test = lessThan(template);
    setEnv(test);
    assertEquals(wrappedTemplate + " < ?", test.build());
}
Also used : Clause(com.ctrip.platform.dal.dao.sqlbuilder.Clause) Test(org.junit.Test)

Example 8 with Clause

use of com.ctrip.platform.dal.dao.sqlbuilder.Clause in project dal by ctripcorp.

the class ExpressionsTest method testGreaterThanEquals.

@Test
public void testGreaterThanEquals() throws SQLException {
    Clause test = greaterThanEquals(template);
    setEnv(test);
    assertEquals(wrappedTemplate + " >= ?", test.build());
}
Also used : Clause(com.ctrip.platform.dal.dao.sqlbuilder.Clause) Test(org.junit.Test)

Example 9 with Clause

use of com.ctrip.platform.dal.dao.sqlbuilder.Clause in project dal by ctripcorp.

the class ExpressionsTest method testLike.

@Test
public void testLike() throws SQLException {
    Clause test = like(template);
    setEnv(test);
    assertEquals(wrappedTemplate + " LIKE ?", test.build());
}
Also used : Clause(com.ctrip.platform.dal.dao.sqlbuilder.Clause) Test(org.junit.Test)

Example 10 with Clause

use of com.ctrip.platform.dal.dao.sqlbuilder.Clause in project dal by ctripcorp.

the class ExpressionsTest method testBetween.

@Test
public void testBetween() throws SQLException {
    Clause test = between(template);
    setEnv(test);
    assertEquals(wrappedTemplate + " BETWEEN ? AND ?", test.build());
}
Also used : Clause(com.ctrip.platform.dal.dao.sqlbuilder.Clause) Test(org.junit.Test)

Aggregations

Clause (com.ctrip.platform.dal.dao.sqlbuilder.Clause)19 Test (org.junit.Test)19 AbstractFreeSqlBuilder (com.ctrip.platform.dal.dao.sqlbuilder.AbstractFreeSqlBuilder)1