Search in sources :

Example 16 with CachedRowSet

use of javax.sql.rowset.CachedRowSet in project jdk8u_jdk by JetBrains.

the class JoinRowSetTests method joinRowSetTests0002.

/*
     * Join two CachedRowSets specifying a column name to join against
     */
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0002(CachedRowSet crs, CachedRowSet crs1) throws Exception {
    try (JoinRowSet jrs = newInstance()) {
        RowSet[] rowsets = { crs, crs1 };
        String[] joinCols = { JOIN_COLNAME, JOIN_COLNAME };
        jrs.addRowSet(rowsets, joinCols);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
Also used : JoinRowSet(javax.sql.rowset.JoinRowSet) JoinRowSet(javax.sql.rowset.JoinRowSet) WebRowSet(javax.sql.rowset.WebRowSet) CachedRowSet(javax.sql.rowset.CachedRowSet) RowSet(javax.sql.RowSet) Test(org.testng.annotations.Test)

Aggregations

CachedRowSet (javax.sql.rowset.CachedRowSet)16 Test (org.testng.annotations.Test)11 OracleCachedRowSet (oracle.jdbc.rowset.OracleCachedRowSet)3 TestRowSetListener (util.TestRowSetListener)3 SQLException (java.sql.SQLException)2 RowSet (javax.sql.RowSet)2 JoinRowSet (javax.sql.rowset.JoinRowSet)2 WebRowSet (javax.sql.rowset.WebRowSet)2 ResultSet (java.sql.ResultSet)1 Statement (java.sql.Statement)1 ResultSetWrappingSqlRowSet (org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSet)1 DataProvider (org.testng.annotations.DataProvider)1