Package com.bleujin.framework.db.procedure

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


public class P3_BatchCommandQuery extends SampleTestBase{

  public void setUp() throws Exception {
    super.setUp() ;
    IUserCommand cmd = dc.createUserCommand("delete from update_sample") ;
    cmd.execUpdate() ;
  }
View Full Code Here


        upt.setPage(Page.create(getLimitedRows(), 1)) ;
        return upt ;
    }

    public IUserCommand createUserCommand(String procSQL) {
      IUserCommand upt = getService().createUserCommand(this, procSQL);
        upt.setPage(Page.create(getLimitedRows(), 1)) ;
        return upt ;
    }
View Full Code Here

public class P5_UserProceduresQuery extends SampleTestBase{
 
 
  public void setUp() throws Exception {
    super.setUp() ;
    IUserCommand cmd = dc.createUserCommand("delete from update_sample") ;
    cmd.execUpdate() ;
  }
View Full Code Here

   * ������ ������ �����°ͺ��� ������ �����ϴ�.
   */
 
 
  public void testUpdate() throws Exception {
    IUserCommand cmd1 = dc.createUserCommand("insert into update_sample values(?, ?)") ;
    cmd1.addParam(1).addParam("abc") ;
    IUserCommand cmd2 = dc.createUserCommand("delete from update_sample where a = ?") ;
    cmd2.addParam(1);
   
    UserProcedures upts = dc.createUserProcedures("Multi MDL") ;
    upts.add(cmd1).add(cmd2) ;
    int result = upts.execUpdate() ;
    assertEquals(2, result) ;
View Full Code Here

    int result = upts.execUpdate() ;
    assertEquals(2, result) ;
  }
 
  public void testMultiQuery() throws Exception {
    IUserCommand cmd1 = dc.createUserCommand("select * from copy_sample") ;
    cmd1.setPage(Page.create(10, 1)) ;
    IUserCommand cmd2 = dc.createUserCommand("select 3 from dept_sample") ;
   
    UserProcedures upts = dc.createUserProcedures("Multi Query") ;
    upts.add(cmd1).add(cmd2) ;
   
    Rows first = upts.execQuery() // first query result ;
View Full Code Here

import com.bleujin.framework.util.Debug;

public class TestUserCommand extends DBTestCase{

  public void testProcSQL() throws Exception {
    IUserCommand query = dc.createUserCommand("select * from copy_tblc where rownum < ?") ;
    query.addParam(10) ;
   
    Debug.debug(query.getProcFullSQL());
  }
View Full Code Here

    assertEquals(62, rows.getRowCount()) ;
  }
 
 
  public void testParameter() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select ? from copy_sample") ;
    cmd.addParam(0, "abc") ; // start index of param is 0 (zero)
    Rows rows = cmd.execQuery() ;
   
    rows.next() ;
    assertEquals("abc", rows.getString(1)) ;
  }
View Full Code Here

public class P2_UpdateQuery extends SampleTestBase{

 
  public void setUp() throws Exception {
    super.setUp() ;
    IUserCommand cmd = dc.createUserCommand("delete from update_sample") ;
    cmd.execUpdate() ;
  }
View Full Code Here

    int count = dc.execUpdate("insert into update_sample values(1, 'ad')") ;
    assertEquals(1, count) ;
  }

  public void testParameter() throws Exception {
    IUserCommand cmd = dc.createUserCommand("insert into update_sample values(?, ?)") ;
    cmd.addParam(1).addParam("abc") ;
   
    int count = cmd.execUpdate() ;
    assertEquals(1, count) ;
   
   
    IUserCommand cmd2 = dc.createUserCommand("insert into update_sample values(?, ?)") ;
    cmd2.addParam(0, 2) // start index is 0...
    cmd2.addParam(1, "bcd") ;
    count = cmd2.execUpdate() ;
    assertEquals(1, count) ;
  }
View Full Code Here

 
 
 
  public void setUp() throws Exception {
    super.setUp() ;
    IUserCommand cmd = dc.createUserCommand("delete from update_sample") ;
    cmd.execUpdate() ;
  }
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.