Package jdbm

Examples of jdbm.RecordManager.fetch()


        long rowid = recman.insert(data);

        assertTrue("check data1",

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




View Full Code Here


        assertEquals("old and new rowid", rowid, rowid2);

        assertTrue("check data2",

               TestUtil.checkRecord( (byte[]) recman.fetch(rowid2), 0, (byte) 2) );



        // now make the record a bit bigger
View Full Code Here

        recman.update(rowid, data);

        assertTrue("check data3",

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



        // .. and again
View Full Code Here

        recman.update(rowid, data);

        assertTrue("check data3",

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



        // close the file
View Full Code Here

        long rowid1 = recman.insert(data1);

        assertTrue("check data1",

               TestUtil.checkRecord( (byte[]) recman.fetch(rowid1), 150000, (byte) 1) );



        // rollback transaction, should revert to previous state
View Full Code Here

        long rowid2 = recman.insert(data2);

        assertTrue("check data2",

               TestUtil.checkRecord( (byte[]) recman.fetch(rowid2), 150000, (byte) 1) );



        assertEquals("old and new rowid", rowid1, rowid2);
View Full Code Here

        rowid1 = recman.insert(data1);

        assertTrue("check data1",

               TestUtil.checkRecord( (byte[]) recman.fetch(rowid1), 150000, (byte) 2) );



        // rollback transaction, should revert to previous state
View Full Code Here

        rowid2 = recman.insert(data2);

        assertTrue("check data2",

               TestUtil.checkRecord( (byte[]) recman.fetch(rowid2), 150000, (byte) 2) );



        assertEquals("old and new rowid", rowid1, rowid2);
View Full Code Here



                    slot = getRandomAllocatedSlot(d);

                    byte[] data = (byte[]) recman.fetch(d[slot].rowid, ByteArraySerializer.INSTANCE );

                    assertTrue("fetch round=" + i + ", slot=" + slot

                    + ", " + d[slot],
View Full Code Here

            long stop = 0;

            while (true) {

                recman.fetch( rowids[ rnd.nextInt( RECORDS ) ] );

                fetches++;

                if ((fetches % 25) == 0) {
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.