Package com.bleujin.framework.db

Examples of com.bleujin.framework.db.Rows


    this.commandType = ctype ;
  }
 
  public JSONObject execute() throws SQLException{
    if (commandType == IQueryable.QUERY_COMMAND){
      Rows rows = query.execQuery() ;
      return (JSONObject) rows.toHandle(new JSONHandler());
    } else {
      int rowcount = query.execUpdate() ;
      JSONObject body = new JSONObject() ;
      body.put("ROWCOUNT", rowcount) ;
     
View Full Code Here


public class TestHandler extends DBTestCase{


  public void testClassBean() throws Exception {
    Rows rows = dc.getRows("select * from copy_tblc", 10, 1) ;
   
    List<TestBean> list = (List<TestBean>)rows.toHandle(new BeanListHandler(TestBean.class)) ;
    for(TestBean bean : list){
      Debug.debug(bean) ;
    }
  }
View Full Code Here

    IUserCommand cmd2 = dc.createUserCommand("select * from copy_tblc");
    upts.add(cmd1) ;
    upts.add(cmd2) ;
   
   
    Rows rows = upts.execQuery() ;
   
    assertEquals(1, rows.getRowCount()) ;
    assertEquals(true, 1 < rows.getNextRows().getRowCount()) ;
  }
View Full Code Here

    CombinedUserProcedures upts = new CombinedUserProcedures(dc, "plan_view") ;
    upts.add(q1, "query", IQueryable.UPDATE_COMMAND).add(q2, "plan", IQueryable.QUERY_COMMAND) ;
   
    upts.execUpdate() ;
    Map result = upts.getResultMap() ;
    Rows rows = (Rows)result.get("plan");
  }
View Full Code Here

    assertEquals(100001, Page.ALL.getMaxCount()) ;
  }
 
  public void testChecked() throws Exception  {
   
    Rows rows = dc.createUserCommand("select * from dual").execQuery() ;
    Rows nr = (Rows)Proxy.newProxyInstance(new SimpleClassLoader(""), rows.getClass().getInterfaces(), new InvokeRows(rows, new RuntimeException("Exception occured. Confirm cause[ex.getCause()]"))) ;
   
    while(nr.next()){
      nr.getString(1) ;
    }
  }
View Full Code Here

      nr.getString(1) ;
    }
  }
 
  public void testException() throws Exception {
    Rows rows = dc.createUserCommand("select * from dual").execQuery() ;
    NRows nr = new NRows(rows, new RuntimeException("Exception occured. Confirm cause[ex.getCause()]")) ;
   
    nr.next() ;
    try {
      nr.getString("abc") ;
View Full Code Here

    assertEquals(0, page.getStartLoc()) ;
  }
 
  public void testDefault() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select * from copy_tblc") ;
    Rows rows = cmd.execQuery();

    assertEquals(true, rows.getRowCount() > 10) ;
  }
View Full Code Here

TOP

Related Classes of com.bleujin.framework.db.Rows

Copyright © 2018 www.massapicom. 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.