Package com.bleujin.framework.db

Examples of com.bleujin.framework.db.Rows


      fail() ;
    } catch(SQLException ignore){
     
    }

    Rows rows = dc.getRows("select count(*) from update_sample") ;
    assertEquals(0, rows.firstRow().getInt(1)) ;
  }
View Full Code Here


public class TestServant extends DBTestCase{

  public void testCallServant() throws Exception {
    CountServant s = new CountServant() ;
    dc.changeServant(s) ;
    Rows rows = dc.getRows("select * from dual") ;
    Thread.sleep(500) ;
    assertEquals(1, s.getCount()) ;
   
  }
View Full Code Here

  public void testMultiController() throws Exception {
    String query = "select * from dual";

    DBController first = new DBController("first", dc.getDBManager(), new StdOutServant()) ;
    first.initSelf() ;
    Rows frows = first.getRows(query) ;
    assertEquals(1, frows.getRowCount()) ;
    first.destroySelf() ;
   
    Rows drows = dc.getRows(query) ;
    assertEquals(1, drows.getRowCount()) ;
   
    DBController second = new DBController("second", dc.getDBManager(), new StdOutServant()) ;
    Rows srows = second.getRows(query) ;
    assertEquals(1, drows.getRowCount()) ;
   
    dc.destroySelf() ;

    Rows srows2 = second.getRows(query) ;
    assertEquals(1, srows2.getRowCount()) ;
  }
View Full Code Here

    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 ;
    assertEquals(true, first.getRowCount() == 10) ;
   
    Rows second = first.getNextRows() ; // second query result ;
    assertEquals(3, second.firstRow().getInt(1)) ;
   
  }
View Full Code Here

public class TestFirstQuery extends DBTestCase{

 
  public void testQuery() throws Exception {
    Rows rows = dc.getRows("select * from dual") ;
    assertEquals(1, rows.getRowCount()) ;
  }
View Full Code Here

    Rows rows = dc.getRows("select * from dual") ;
    assertEquals(1, rows.getRowCount()) ;
  }
 
  public void testRow() throws Exception {
    Rows rows = dc.getRows("select * from dual") ;
    Row row = rows.firstRow() ;
   
    assertNotNull(row.getString(1)) ;
  }
View Full Code Here

   
    assertNotNull(row.getString(1)) ;
  }
 
  public void testProcedure() throws Exception {
    Rows rows = dc.createUserProcedure("common@testBy()").execQuery() ;
    assertEquals(true, rows.getRowCount() > 0) ;
  }
View Full Code Here

    Rows rows = dc.createUserProcedure("common@testBy()").execQuery() ;
    assertEquals(true, rows.getRowCount() > 0) ;
  }
 
  public void testProcedure2() throws Exception {
    Rows rows = dc.getRows("common@testBy()") ;
    assertEquals(true, rows.getRowCount() > 0) ;
  }
View Full Code Here

   * ���� java.sql.PrepareStatement���� ��ȯ�ϴ� ResultSet���� �޸� close�� ������ �ʾƵ� �������
   * Rows�� ��ȯ�޴� ���� Connection�� Pool�� �̹� ��ȯ�Ǿ� �ֱ� ������ �ٸ� ��ü�� �Ķ���ͷ� ����ص� �������. 
   */
 
  public void testDefault() throws Exception {
    Rows rows = dc.getRows(query1) ;
    assertEquals(31, rows.getRowCount()) ;
  }
View Full Code Here

    Rows rows = dc.getRows(query1) ;
    assertEquals(31, rows.getRowCount()) ;
  }
 
  public void testGetRows() throws Exception {
    Rows rows = dc.getRows(query2) ;
    assertEquals(62, rows.getRowCount()) ;
  }
View Full Code Here

TOP

Related Classes of com.bleujin.framework.db.Rows

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.