Package com.bleujin.framework.db.procedure

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


 
  public void testProcedure() throws Exception {
    IUserProcedure cmd = dc.createUserProcedure("common@testBy()") ;
    cmd.setPage(Page.TEN) ;
   
    Rows rows = cmd.execQuery();
    assertEquals(10, rows.getRowCount()) ;
  }
 
  public void testHandleBean() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select * from copy_tblc") ;
View Full Code Here

 
  public void testHandleBeanProcedure() throws Exception {
    IUserProcedure cmd = dc.createUserProcedure("common@testBy()") ;
    cmd.setPage(Page.TEN) ;
   
    List<TestBean> beans =  (List<TestBean>)(cmd.execQuery().toHandle(new BeanListHandler(TestBean.class))) ;
    assertEquals(10, beans.size()) ;
  }
 
  public void test2Page() throws Exception {
    IUserProcedure cmd = dc.createUserProcedure("common@testBy()") ;
View Full Code Here

 
  public void test2Page() throws Exception {
    IUserProcedure cmd = dc.createUserProcedure("common@testBy()") ;
    cmd.setPage(Page.create(10, 2)) ;
   
    Rows rows = cmd.execQuery();
    assertEquals(10, rows.getRowCount()) ;
    Debug.debug(rows) ;
  }
 
  public void testUserProcedures() throws Exception {
View Full Code Here

    testProcedureUpdate() ;
   
    IUserProcedure upt = dc.createUserProcedure("Sample@selectBy(?)") ;
    upt.addParam(1);
   
    Rows rows = upt.execQuery() ;
   
    assertEquals(1, rows.getRowCount()) ;
    assertEquals("abc", rows.firstRow().getString("b")) ;
  }
 
View Full Code Here

    u1.addParam(110).addParam("bleujin") ;
    u1.execUpdate() ;

    // example
    IUserProcedure u2 = dc.createUserProcedure("emp@list()") ;
    Rows rows = u2.execQuery() ;
    while(rows.next()){
      rows.getString("name") ;
    }
  }
 
View Full Code Here

    testSetClob() ;

    IUserProcedure upt = dc.createUserProcedure("Sample@selectLobBy(:a)") ;
    upt.addParam("a", 1);
   
    Rows rows = upt.execQuery();
    assertEquals(true, rows.firstRow().getString("c").length() > 9000) ;

    dc.execUpdate("delete from lob_sample") ;
  }
}
View Full Code Here

  public void testSleep() throws Exception {
    IUserProcedure cmd = dc.createUserProcedure("common@sleepBy()");
    cmd.setPage(Page.create(10, 2));

    Rows rows = cmd.execQuery();
    assertEquals(10, rows.getRowCount());
    Debug.debug(rows);
  }

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

          try {
            Debug.debug("start date :", new Date());
            IUserProcedure cmd = dc.createUserProcedure("common@sleepBy()");
            cmd.setPage(Page.create(10, 2));

            Rows rows = cmd.execQuery();
            Debug.debug("end date :", new Date());
          } catch (SQLException ignore) {

          }
        }
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.