📄 clientdaotest.java
字号:
package com.doone.fj1w.bbsTest;
import com.doone.data.DacClient;
import com.doone.data.DataTable;
import com.doone.fj1w.bbs.ClientDAO;
import junit.framework.TestCase;
public class ClientDAOTest extends TestCase {
protected void setUp() throws Exception {
super.setUp();
}
public void testGetConditionResult() {
if(true) return ;
String sql="SELECT COUNT (c.content_id) count FROM tf_content c "+
"WHERE c.board_id = 2435 AND c.up_content_id = 0 AND "+
"c.CONTENTTYPE='05'";
// String sql="SELECT content_id, up_content_id, board_id, account_id, user_name, " +
// " create_time, title, tip_order, extract_sign, reply_count, exist_attch, " +
// " last_reply_time,click_count, reply_user_name, delete_sign, CONTENTTYPE," +
// " mood_icon FROM (SELECT content_id, up_content_id, board_id," +
// " account_id, user_name, create_time, title, tip_order, extract_sign," +
// " reply_count, last_reply_time, click_count, reply_user_name, delete_sign," +
// " mood_icon, CONTENTTYPE, exist_attch, ROWNUM rn /*+ first_row */ FROM " +
// " (SELECT c.content_id, c.up_content_id, c.board_id, c.account_id," +
// " c.user_name, c.create_time, c.title, c.tip_order, c.extract_sign," +
// " c.reply_count, c.last_reply_time, c.click_count, c.reply_user_name," +
// " c.delete_sign, c.mood_icon, c.CONTENTTYPE, c.exist_attch FROM " +
// " tf_content c WHERE CONTENTTYPE ='05' AND c.board_id = 2435 AND " +
// " c.up_content_id = 0 ORDER BY c.tip_order DESC, c.last_reply_time DESC," +
// " c.content_id DESC) WHERE ROWNUM <= 5) WHERE rn > 0";
try{
DacClient dac=new DacClient();
System.out.println(sql);
DataTable dt=dac.executeQuery(sql);
if(dt!=null && dt.getRows().getCount()>0)
System.out.println("count==>"+dt.getRows().getCount());
}catch(Exception e) {
e.printStackTrace();
}
// fail("尚未实现");
}
public void testGetContextResult() {
DataTable dt=ClientDAO.getContentCode("");
}
public void testParseCondition() {
// fail("尚未实现");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -