Menu

Home

lenysoft

Compressed Rowset

Compressed Rowset is a Java implementation of Cached Rowset that can read and store more than 500k records in memory with less memory requeriments.
In addition, it have memory and row listeners so you have data population control.
Compressed Rowset also have a support file property. So when you query a very large data set it use file system to cache compressed data and columns domain.

Functions supported

  • Share rowset, share data and domain. Only one copy of data is in memory
  • Copy Compressed Rowset, get a new one from de original compressed rowset.
  • Sort data, multiple rows and direction data sort
  • Filter data with many criterias
  • Group data, multiple field data grouping
  • Join with other Compressed rowset, multiple fields inner join with other compressed rowset
  • Column domain data, when populate compressed rowset, you can query column
    domain data like a rowset (distinc values stored in the column )

Example

More examples here

    ....

    // create a Statement object to execute the query with
    Statement stmt = conn.createStatement();

    // Select the ID and NAME columns from sample data
    ResultSet results = stmt.executeQuery("SELECT  GROUP, GROUP_1,ID ,NAME ,
        QTY ,AMOUNT, DATE, TIME, TIMESTAMP,BOOL FROM test");

    // Create Compressed Rowset
    CompressedRowSet rs = new CompressedRowSet();
    rs.setMaxDomainBytes(10000);     //if domain exceds 10kb its data go to file 
    rs.setFileSupport(true);         //if whant to store compressed data in a file
    rs.setPath("c:/temp");           //File path
    rs.populate(results);            //Data population