Examples of execQuery()


Examples of com.bleujin.framework.db.procedure.IUserCommand.execQuery()


  public void testPage() throws Exception {
    final IUserCommand cmd = dc.createUserCommand("select * from millon_tblt") ;
    cmd.setPage(Page.TEN) ;
    Rows rows = cmd.execQuery();
   
    assertEquals(10, rows.getRowCount()) ;
 
 
  public void testProcedure() throws Exception {
View Full Code Here

Examples of com.bleujin.framework.db.procedure.IUserCommand.execQuery()

 
  public void testHandleBean() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select * from copy_tblc") ;
    cmd.setPage(Page.TEN) ;
   
    List<TestBean> beans =  (List<TestBean>)(cmd.execQuery().toHandle(new BeanListHandler(TestBean.class))) ;
    assertEquals(10, beans.size()) ;
  }

 
  public void testHandleBeanProcedure() throws Exception {
View Full Code Here

Examples of com.bleujin.framework.db.procedure.IUserCommand.execQuery()

 
  public void testNextPage() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select * from copy_tblc") ;
    cmd.setPage(Page.TEN) ;

    Rows rows = cmd.execQuery();
    assertEquals(10, rows.getRowCount()) ;
   
   
    Rows nextPageRows = rows.nextPageRows() ;
    assertEquals(11, nextPageRows.firstRow().getInt(2)) ;
View Full Code Here

Examples of com.bleujin.framework.db.procedure.IUserCommand.execQuery()

 
 
  public void testParameter() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select ? from copy_sample") ;
    cmd.addParam(0, "abc") ; // start index of param is 0 (zero)
    Rows rows = cmd.execQuery() ;
   
    rows.next() ;
    assertEquals("abc", rows.getString(1)) ;
  }
 
View Full Code Here

Examples of com.bleujin.framework.db.procedure.IUserCommand.execQuery()

 
  public void testDefaultLimit() throws Exception {
    dc.setLimitedRows(20) ;
    IUserCommand cmd = dc.createUserCommand(query1) ;
   
    Rows rows = cmd.execQuery() ;
    assertEquals(20, rows.getRowCount()) ;

    rows.absolute(20) ;
    assertEquals(20, rows.getInt("no2")) ;
  }
View Full Code Here

Examples of com.bleujin.framework.db.procedure.IUserCommand.execQuery()

 
  public void testNextPage() throws Exception {
    IUserCommand cmd = dc.createUserCommand(query1) ;
    cmd.setPage(Page.create(10, 1))
   
    Rows rows = cmd.execQuery() ; // 1page
    assertEquals(10, rows.getRowCount()) ;
    assertEquals(1, rows.firstRow().getInt("no2")) ;
   
   
    Rows nextRows = rows.nextPageRows() ; // 2page
View Full Code Here

Examples of com.bleujin.framework.db.procedure.IUserCommand.execQuery()

 
  public void testPrePage() throws Exception {
    IUserCommand cmd = dc.createUserCommand(query1) ;
    cmd.setPage(Page.create(10, 2)) // 2page
   
    Rows rows = cmd.execQuery() ;
    assertEquals(10, rows.getRowCount()) ;
    assertEquals(11, rows.firstRow().getInt("no2")) ;
   
   
    Rows preRows = rows.prePageRows() // 1page
View Full Code Here

Examples of com.bleujin.framework.db.procedure.IUserCommand.execQuery()

public class TestModify extends DBTestCase{

  public void testCallMethod() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select * from copy_tblc") ;
   
    Rows rows = cmd.execQuery() ;
    Debug.debug(rows) ;
   
  }
}
View Full Code Here

Examples of com.bleujin.framework.db.procedure.IUserCommand.execQuery()

    Thread[] ts = new Thread[20] ;
    for (int i = 0; i < ts.length; i++) {
      ts[i] = new Thread(){
        public void run(){
          try {
            cmd.execQuery();
          } catch (SQLException e) {
            e.printStackTrace();
          }
        }
      } ;
View Full Code Here

Examples of com.bleujin.framework.db.procedure.IUserProcedure.execQuery()

 
  public void testProcedure() throws Exception {
    IUserProcedure upt = dc.createUserProcedure("framework_test_select()") ;
    upt.setPage(Page.create(5, 1)) ;
   
    Rows rows = upt.execQuery() ;
    while(rows.next()){
      Debug.debug(rows.getString(1)) ;
    }
      assertEquals(5, rows.getRowCount()) ;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.