Package com.bleujin.framework.db.procedure

Examples of com.bleujin.framework.db.procedure.CombinedUserProcedures


    public UserProcedures createUserProcedures(String name) {
      return getService().createUserProcedures(this, name);
    }
   
    public CombinedUserProcedures createCombinedUserProcedures(String name) {
      return new CombinedUserProcedures(this, name) ;
    }
View Full Code Here



    IUserCommand del = dc.createUserCommand("delete from update_sample where a = ?") ;
    del.addParam(1) ;
   
    CombinedUserProcedures upts = dc.createCombinedUserProcedures("combined") ;
   
    upts.add(ins, "ins", IQueryable.UPDATE_COMMAND)
      .add(sel, "sel", IQueryable.QUERY_COMMAND)
      .add(del, "del", IQueryable.UPDATE_COMMAND);
   
    upts.execUpdate() ;
   
    Map result = upts.getResultMap() ; // for access sel'result
   
    int inscount = (Integer)result.get("ins") ;
    Rows rows = (Rows)result.get("sel") ;
    int delcount = (Integer)result.get("del") ;
   
View Full Code Here

    IUserCommand ins = dc.createUserCommand("insert into update_sample values(?,?)") ;
    ins.addParam(1).addParam("abc") ;
   
    IUserCommand sel = dc.createUserCommand("select * from update_sample") ;
   
    CombinedUserProcedures upts = dc.createCombinedUserProcedures("combined") ;
   
    upts.add(ins, "ins", IQueryable.UPDATE_COMMAND)
      .add(sel, "sel", IQueryable.QUERY_COMMAND) ;
   
    upts.execUpdate() ;
   
    Map result = upts.getResultMap() ; // for access sel'result
   
    int rowcount = (Integer)result.get("ins") ;
    Rows rows = (Rows)result.get("sel") ;
   
    assertEquals(1, rowcount) ;
View Full Code Here

    public UserProcedures createUserProcedures(String name) {
      return getService().createUserProcedures(this, name);
    }
   
    public CombinedUserProcedures createCombinedUserProcedures(String name) {
      return new CombinedUserProcedures(this, name) ;
    }
View Full Code Here

import com.bleujin.framework.util.Debug;

public class TestSQL2005 extends MSSQLTestMother{

  public void testPlan() throws Exception {
    CombinedUserProcedures upts  = new CombinedUserProcedures(dc, "plan_view") ;
   
   
    Rows rows = dc.getRows("sp_who") ;
    Debug.debug(rows) ;
  }
View Full Code Here

 
  public void testComsite() throws Exception {

    dc.execUpdate("truncate table framework_test_tblc#");
   
    CombinedUserProcedures upts = new CombinedUserProcedures(dc, "composite") ;
    UserCommand cmd1 = (UserCommand) dc.createUserCommand("insert into framework_test_tblc# values(1, 'BlaBla')");
    UserCommand cmd2 = (UserCommand) dc.createUserCommand("select * from framework_test_tblc#");
    upts.add(cmd1, "insert", IQueryable.UPDATE_COMMAND).add(cmd2, "select", IQueryable.QUERY_COMMAND) ;

    upts.execUpdate() ;
   
    Map result = upts.getResultMap() ;
    assertEquals(new Integer(1), result.get("insert")) ;
   
    assertEquals(1, ((Rows)result.get("select")).getRowCount()) ;
   
  }
View Full Code Here

  public void testPlanView() throws Exception {
    Queryable q1 = (Queryable)dc.createUserCommand("explain plan for select * from copy_tblc") ;
    Queryable q2 = (Queryable)dc.createUserCommand("select substr (lpad(' ', level-1) || operation || ' (' || options || ')',1,30 ) Operation, object_name Object " +
        " from plan_table start with id = 0 connect by prior id=parent_id") ;
   
    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

TOP

Related Classes of com.bleujin.framework.db.procedure.CombinedUserProcedures

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.