Package com.bleujin.framework.db.procedure

Examples of com.bleujin.framework.db.procedure.IUserCommandBatch.execUpdate()


    for(int i = 1 ; i <= 99 ; i++){
      b.addBatchParam(0, StringUtil.leftPad(i + "", 2, '0')) ;
      b.addBatchParam(1, i) ;
    }
   
    int result = b.execUpdate() ;
    Debug.debug(result);
  }
 
 
  public void createTestTable() throws Exception {
View Full Code Here


      cmd.addBatchParam(0, i) ;
      cmd.addBatchParam(1, "No." + i + ".....") ;
      cmd.addBatchParam(2, RandomUtil.nextRandomString(RandomUtil.nextRandomInt(10, 50), RandomUtil.NUMBER_CHAR_TYPE)) ;
    }
 
    cmd.execUpdate() ;
  }
 
  public void testNamedBatch() throws Exception {
   
    IUserCommandBatch cmd = dc.createUserCommandBatch("insert into performance_sample(a, b, c) values(:a, :b, :c)") ;
View Full Code Here

      cmd.addBatchParam("a", i) ;
      cmd.addBatchParam("b", "No." + i + ".....") ;
      cmd.addBatchParam("c", RandomUtil.nextRandomString(RandomUtil.nextRandomInt(10, 50), RandomUtil.NUMBER_CHAR_TYPE)) ;
    }
   
    cmd.execUpdate() ;
  }


}
View Full Code Here

    for (int i = 0; i < max; i++) {
      cmd.addBatchParam(0, i) ;
      cmd.addBatchParam(1, i + "th ..") ;
    }
   
    int count = cmd.execUpdate() ;
    assertEquals(max, count) ;
    cmd.clearParam() ; // param ojbect resource ��ȯ
  }
 
View Full Code Here

    for (int i = 0; i < max; i++) {
      a[i] = i ;
      b[i] = i + "th .." ;
    }
    cmd.addParam(a).addParam(b) ;
    int count = cmd.execUpdate() ;
    assertEquals(max, count) ;
  }
 

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

      b[i] = i + "th .." ;
    }
   
    cmd.addParam(0, a) ;
    cmd.addParam(1, b) ;
    int count = cmd.execUpdate() ;
    assertEquals(max, count) ;
  }

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

      a[i] = i ;
    }
   
    cmd.addParam(0, a) ;
    cmd.addParamSize(1, "SameValue", max) // SameValue * max
    int count = cmd.execUpdate() ;
    assertEquals(max, count) ;
  }

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

   
   
    cmd.addParam(a).addParam(b) ;
   
    try {
      cmd.execUpdate() ;
      fail() ;
    } catch(SQLException ignore){
     
    }
View Full Code Here

        }
        IUserCommandBatch case2 = dc.createUserCommandBatch("insert into BLEU## values(?,?,?)") ;
        case2.addParam(0, a); ;
        case2.addParam(1, b); ;
        case2.addClob(2, c); ;
        case2.execUpdate() ;

        long end = System.currentTimeMillis() ;
        return end - start ;

    }
View Full Code Here

        IUserCommandBatch command = dc.createUserCommandBatch("insert into BLEU## values(?,?,?)") ;
        command.addParam(0, new int[]{1,2,3}); ;
        command.addParamSize(1, "abcdefg", 3); ;
        command.addClobSize(2, getLongString(), 3); ;

        command.execUpdate() ;
    }

    public void xtestClobProcedureBatch() throws Exception {
        IUserProcedureBatch batch = dc.createUserProcedureBatch("bleujin@lobTest3(?,?,?)") ;
        batch.addParam(0, new int[]{1,2,3}); ;
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.