ibatis support

This commit is contained in:
wenshao
2012-07-10 20:38:42 +08:00
parent b277367cea
commit 60a7c3d271
4 changed files with 62 additions and 35 deletions
@@ -8,7 +8,7 @@ import junit.framework.TestCase;
public class OracleFormatTest2 extends TestCase {
public void test_formatOracle() throws Exception {
String text = "SELECT count(*) FROM T1, (SELECT DISTINCT parent_id AS parentId FROM T2 a1 WHERE FSEQ IN (?) AND NOT order_from = ? AND status IN (?) ) b WHERE ID = b.parentId AND GMT_CREATE >= to_date(?, ?) AND GMT_CREATE <= to_date(?, ?)";
String text = "UPDATE MEMBER SET GMT_MODIFIED = SYSDATE, STATUS = ?, email = CASE WHEN status = ? THEN rtrim(email, ? || id || ?) ELSE email END WHERE ID IN (?) AND STATUS <> ?";
String formatedText = SQLUtils.format(text, JdbcUtils.ORACLE);
System.out.println(formatedText);