Package com.bleujin.framework.db.procedure

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


    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

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

   
    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

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

   
    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

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

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

   * ���� 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

    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

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.