Search in sources :

Example 1 with Clause

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

the class ExpressionsTest method testOr.

@Test
public void testOr() throws SQLException {
    Clause test = OR;
    setEnv(test);
    assertEquals("OR", test.build());
}
Also used : Clause(com.ctrip.platform.dal.dao.sqlbuilder.Clause) Test(org.junit.Test)

Example 2 with Clause

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

the class ExpressionsTest method testNot.

@Test
public void testNot() throws SQLException {
    Clause test = NOT;
    setEnv(test);
    assertEquals("NOT", test.build());
}
Also used : Clause(com.ctrip.platform.dal.dao.sqlbuilder.Clause) Test(org.junit.Test)

Example 3 with Clause

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

the class ExpressionsTest method testGreaterThan.

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

Example 4 with Clause

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

the class ExpressionsTest method testLessThanEquals.

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

Example 5 with Clause

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

the class ExpressionsTest method testNotEqual.

@Test
public void testNotEqual() throws SQLException {
    Clause test = notEqual(template);
    setEnv(test);
    assertEquals(wrappedTemplate + " <> ?", 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