Examples of IUserProcedure


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

      threads[i] = new Thread() {

        public void run() {
          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

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

    Rows rows = dc.getRows("sp_who") ;
    Debug.debug(rows) ;
  }
 
  public void testProcedure() throws Exception {
    IUserProcedure upt = dc.createUserProcedure("framework@viewPlan(?)") ;
    upt.setPage(Page.create(3, 1)) ;
    upt.addParam("select") ;
   
   
    Rows rows = dc.getRows(upt) ;
    Debug.debug(rows) ;
  }
View Full Code Here

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

    return upt;
  }

  private IQueryable parseUserProcedure(JSONObject jo) {
    String query = jo.getJSONObject(QUERY).getString(COMMAND); // mandatory
    IUserProcedure upt = dc.createUserProcedure(query) ;
    setParam(upt, jo.getJSONObject(QUERY).getJSONObject(PARAM)) ;
    upt.setPage(parsePage(jo.getJSONObject(QUERY).getJSONObject(PAGE)));
    return upt;
  }
View Full Code Here

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

    String query = "Types@test(?,?,?,?,?, ?,?,?,?)" ;

    UserProcedures upts = dc.createUserProcedures("procedure batch") ;
    int max = 1000 ;
    for (int i = 0; i < max; i++) {
      IUserProcedure upt = dc.createUserProcedure(query) ;
      upt.addParam(0, RandomUtil.nextRandomString(25, RandomUtil.DOWNCASE_CHAR_TYPE)) ;
      upt.addParam(1, RandomUtil.nextRandomString(10, RandomUtil.DOWNCASE_CHAR_TYPE)) ;
      upt.addParam(2, RandomUtil.nextRandomString(10, RandomUtil.DOWNCASE_CHAR_TYPE)) ;
      upt.addParam(3, RandomUtil.nextRandomString(20, RandomUtil.DOWNCASE_CHAR_TYPE)) ;
      upt.addParam(4, "NORMAL") ;
      upt.addParam(5, RandomUtil.nextInt()) ;
      upt.addParam(6, RandomUtil.nextRandomString(12, RandomUtil.DOWNCASE_CHAR_TYPE)) ;
      upt.addParam(7, RandomUtil.nextRandomString(10, RandomUtil.DOWNCASE_CHAR_TYPE)) ;
      upt.addParam(8, RandomUtil.nextInt()) ;
      upts.add(upt) ;
    }
    upts.execUpdate() ;
    dc.destroySelf() ;
  }
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.