Examples of IUserCommand


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

        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

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

    StringBuffer str = new StringBuffer("0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789") ;
    for (int i = 0, last = 100; i < last; i++) {
      tenKtext.append(str) ;
        }
   
    IUserCommand cmd = dc.createUserCommand("insert into framework_test_lob(a, b) values(?,?)") ;
    cmd.addParam(1).addClob(tenKtext.toString()) ;
   
    int rowcount = cmd.execUpdate() ;
    assertEquals(1, rowcount) ;
  }
View Full Code Here

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

import com.bleujin.framework.db.procedure.IUserCommand;

public class TestPlan extends MySQLMother{

  public void testPlan() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select * from millon_tblt") ;
    MySQLUserCommandPlan plan = new MySQLUserCommandPlan(dc, cmd) ;
   
    plan.printPlan(System.out) ;
  }
View Full Code Here

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

   
    plan.printPlan(System.out) ;
  }
 
  public void testLimit() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select * from millon_tblt limit ?,?") ;
    cmd.addParam(10).addParam(2) ;
    MySQLUserCommandPlan plan = new MySQLUserCommandPlan(dc, cmd) ;
   
    plan.printPlan(System.out) ;
  }
View Full Code Here

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

import com.bleujin.framework.db.procedure.IUserCommand;

public class TestPage extends MySQLMother{

  public void testPage() throws Exception {
    final IUserCommand cmd = dc.createUserCommand("select * from millon_tblt") ;
    cmd.setPage(Page.TEN) ;
    Rows rows = cmd.execQuery();
   
    assertEquals(10, rows.getRowCount()) ;
  }
View Full Code Here

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

   
    assertEquals(10, rows.getRowCount()) ;
  }
 
  public void testLimit() throws Exception {
    final IUserCommand cmd = dc.createUserCommand("select * from millon_tblt limit ?,?") ;
    cmd.addParam(10).addParam(10) ;
    Rows rows = cmd.execQuery();
   
    assertEquals(10, rows.getRowCount()) ;
  }
View Full Code Here

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

import com.bleujin.framework.util.Debug;

public class TestUserCommand extends MySQLMother {

  public void testParameter() throws Exception {
    IUserCommand cmd = dc.createUserCommand("select * from millon_tblt limit ?");
    cmd.addParam(10) ;

    Debug.debug(cmd) ;
    Debug.debug(cmd.execQuery().firstRow());
  }
View Full Code Here

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

public class CombinedQuery extends SampleTestBase{

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

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

   * ���� IQueryable�� ���������� Queryable�� ��ӹ��� ���� Ŭ������
   * EmptyQueryable, TimeOutQuery, XAUserProcedure�� �̰͵��� �ٸ� Queryable�� ���� �ϳ��� Ʈ��������� ó���ɼ� ���� ������
   */
 
  public void testFirst() throws Exception {
    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) ;
View Full Code Here

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

    assertEquals("abc", rows.firstRow().getString("b")) ;
  }

 
  public void testSecond() throws Exception {
    IUserCommand ins = dc.createUserCommand("insert into update_sample values(?,?)") ;
    ins.addParam(1).addParam("abc") ;
   
    IUserCommand sel = dc.createUserCommand("select * from update_sample") ;


    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)
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.