Package com.bleujin.framework.db

Examples of com.bleujin.framework.db.Rows.firstRow()


   
    rows.next() ;
   
    long fileSize = k100File.length();
    assertEquals(true, fileSize == rows.getString("c").length()) ;
    assertEquals(true, fileSize == rows.firstRow().getString("c").length()) ;
   
    InputStream input = rows.getBinaryStream("d") ;
    int bcount = 0;
    while(input.read() != -1) bcount++ ;
    assertEquals(true, fileSize == bcount) ;
View Full Code Here


   
    int rowcount = (Integer)result.get("ins") ;
    Rows rows = (Rows)result.get("sel") ;
   
    assertEquals(1, rowcount) ;
    assertEquals("abc", rows.firstRow().getString("b")) ;
  }

 
  public void testSecond() throws Exception {
    IUserCommand ins = dc.createUserCommand("insert into update_sample values(?,?)") ;
View Full Code Here

    int inscount = (Integer)result.get("ins") ;
    Rows rows = (Rows)result.get("sel") ;
    int delcount = (Integer)result.get("del") ;
   
    assertEquals(1, inscount) ;
    assertEquals("abc", rows.firstRow().getString("b")) ;
    assertEquals(1, delcount) ;
   
   
    Rows crows = dc.createUserCommand("select * from update_sample where a = ?").addParam(1).execQuery() ;
    assertEquals(false, crows.next()) ;
View Full Code Here

    Rows rows = cmd.execQuery();
    assertEquals(10, rows.getRowCount()) ;
   
   
    Rows nextPageRows = rows.nextPageRows() ;
    assertEquals(11, nextPageRows.firstRow().getInt(2)) ;

    assertEquals(true, rows.firstRow().getInt(2) < nextPageRows.firstRow().getInt(2)) ;

    Rows prePageRows = rows.prePageRows() ;
    assertEquals(1, prePageRows.firstRow().getInt(2)) ;
View Full Code Here

   
   
    Rows nextPageRows = rows.nextPageRows() ;
    assertEquals(11, nextPageRows.firstRow().getInt(2)) ;

    assertEquals(true, rows.firstRow().getInt(2) < nextPageRows.firstRow().getInt(2)) ;

    Rows prePageRows = rows.prePageRows() ;
    assertEquals(1, prePageRows.firstRow().getInt(2)) ;
  }
View Full Code Here

    assertEquals(11, nextPageRows.firstRow().getInt(2)) ;

    assertEquals(true, rows.firstRow().getInt(2) < nextPageRows.firstRow().getInt(2)) ;

    Rows prePageRows = rows.prePageRows() ;
    assertEquals(1, prePageRows.firstRow().getInt(2)) ;
  }


  /**
   *
 
View Full Code Here

    } catch(SQLException ignore){
     
    }

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

   
    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

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

 

  public void testFirstRow() throws Exception {
    Rows rows = dc.getRows(query1) ;
   
    assertEquals(1, rows.firstRow().getInt("no1")) ;
   
    try {
      rows = dc.getRows("select * from copy_sample where 1 = 2") ;
      rows.firstRow() ;
      fail() ;
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.