Package jdbm

Examples of jdbm.RecordManager.fetch()


        long rowid = recman.insert(data);

        assertTrue("check data1",

               TestUtil.checkRecord( (byte[]) recman.fetch(rowid), 10000, (byte) 1) );



        // update it as a 20,000 byte record.
View Full Code Here


        recman.update(rowid, data);

        assertTrue("check data2",

               TestUtil.checkRecord( (byte[])recman.fetch(rowid), 20000, (byte) 2) );



        // insert a third record.
View Full Code Here

        long rowid2 = recman.insert(data);

        assertTrue("check data3",

               TestUtil.checkRecord( (byte[]) recman.fetch(rowid2), 20, (byte) 3) );



        // now, grow the first record again
View Full Code Here

        recman.update(rowid, data);

        assertTrue("check data4",

               TestUtil.checkRecord( (byte[]) recman.fetch(rowid), 30000, (byte) 4) );




View Full Code Here

        // insert a 10,000 byte record.
        byte[] data = UtilTT.makeRecord(10000, (byte) 1);
        long rowid = recman.insert(data);
        assertTrue("check data1",
               UtilTT.checkRecord((byte[]) recman.fetch(rowid), 10000, (byte) 1) );

        // update it as a 20,000 byte record.
        data = UtilTT.makeRecord(20000, (byte) 2);
        recman.update(rowid, data);
        assertTrue("check data2",
View Full Code Here

        // update it as a 20,000 byte record.
        data = UtilTT.makeRecord(20000, (byte) 2);
        recman.update(rowid, data);
        assertTrue("check data2",
               UtilTT.checkRecord((byte[]) recman.fetch(rowid), 20000, (byte) 2) );

        // insert a third record.
        data = UtilTT.makeRecord(20, (byte) 3);
        long rowid2 = recman.insert(data);
        assertTrue("check data3",
View Full Code Here

        // insert a third record.
        data = UtilTT.makeRecord(20, (byte) 3);
        long rowid2 = recman.insert(data);
        assertTrue("check data3",
               UtilTT.checkRecord((byte[]) recman.fetch(rowid2), 20, (byte) 3) );

        // now, grow the first record again
        data = UtilTT.makeRecord(30000, (byte) 4);
        recman.update(rowid, data);
        assertTrue("check data4",
View Full Code Here

        // now, grow the first record again
        data = UtilTT.makeRecord(30000, (byte) 4);
        recman.update(rowid, data);
        assertTrue("check data4",
               UtilTT.checkRecord((byte[]) recman.fetch(rowid), 30000, (byte) 4) );


        // delete the record
        recman.delete(rowid);
View Full Code Here

        ArrayList l1 = new ArrayList();
        for(int i = 0;i<100000;i++) l1.add(i);
       
        long id = recman.insert(l1);
        recman.commit();
        ArrayList l2 = (ArrayList) recman.fetch(id);
        assertEquals(l1,l2);

       
        recman.update(id, l2);
        recman.commit();
View Full Code Here

        assertEquals(l1,l2);

       
        recman.update(id, l2);
        recman.commit();
        ArrayList l3 = (ArrayList) recman.fetch(id);
        assertEquals(l1,l3);

    }

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.