Package com.bleujin.framework.db.procedure

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


    assertEquals(3, rows.nextPageRows().getRowCount()) ;
  }

 
  public void testMSSQLViewPlan() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select * from copy_tblc") ;
    cmd.printPlan(System.out) ;
  }
View Full Code Here


import com.bleujin.framework.util.Debug;

public class TestModify extends DBTestCase{

  public void testCallMethod() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select * from copy_tblc") ;
   
    Rows rows = cmd.execQuery() ;
    Debug.debug(rows) ;
   
  }
View Full Code Here

    }
  }

 
  public void testPageSpeed() throws Exception {
    final IUserCommand cmd = dc.createUserCommand("select * from millon_tblt") ;
    cmd.setPage(Page.TEN) ;
   
    Thread[] ts = new Thread[20] ;
    for (int i = 0; i < ts.length; i++) {
      ts[i] = new Thread(){
        public void run(){
          try {
            cmd.execQuery();
          } catch (SQLException e) {
            e.printStackTrace();
          }
        }
      } ;
View Full Code Here

public class TestUserProcedures extends DBTestCase{

  public void testUserProceduresQuery() throws Exception {
    UserProcedures upts = dc.createUserProcedures("dual") ;
   
    IUserCommand cmd1 = dc.createUserCommand("select * from dual");
    IUserCommand cmd2 = dc.createUserCommand("select * from copy_tblc");
    upts.add(cmd1) ;
    upts.add(cmd2) ;
   
   
    Rows rows = upts.execQuery() ;
View Full Code Here

  public void testUserProceduresUpdate() throws Exception {
    dc.execUpdate("truncate table framework_test_tblc#") ;
   
    UserProcedures upts = dc.createUserProcedures("dual") ;
   
    IUserCommand cmd1 = dc.createUserCommand("insert into framework_test_tblc# values(1, 'BlaBla')");
    IUserCommand cmd2 = dc.createUserCommand("insert into framework_test_tblc# values(2, 'alBalB')");
    upts.add(cmd1) ;
    upts.add(cmd2) ;
   
    int result = upts.execUpdate() ;
    assertEquals(2, result) ;
View Full Code Here

  public void testTransaction() throws Exception {
    dc.execUpdate("truncate table framework_test_tblc#") ;
   
    UserProcedures upts = dc.createUserProcedures("dual") ;
   
    IUserCommand cmd1 = dc.createUserCommand("insert into framework_test_tblc# values(1, 'BlaBla')");
    IUserCommand cmd2 = dc.createUserCommand("insert into framework_test_tblc# values(2, '012345678901234567890123456789')"); // over length
    upts.add(cmd1) ;
    upts.add(cmd2) ;
   
    try {
      int result = upts.execUpdate() ;
View Full Code Here

    Rows rows = (Rows)result.get("plan");
  }
 
 
  public void testViewPlan() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select * from copy_tblc where no1 < 10") ;
    cmd.printPlan(System.out) ;
  }
View Full Code Here

TOP

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

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.