Package org.tmatesoft.sqljet.core.internal.table

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeRecord


        final ISqlJetBtreeCursor c = btreeCopy.getCursor(ISqlJetDbHandle.MASTER_ROOT, false, null);
        c.enterCursor();
        try {
            if (!c.first())
                do {
                    ISqlJetBtreeRecord r = new SqlJetBtreeRecord(c, false, ISqlJetLimits.SQLJET_MIN_FILE_FORMAT);
                    Assert.assertNotNull(r.getFields());
                    Assert.assertTrue(!r.getFields().isEmpty());
                    for (ISqlJetVdbeMem field : r.getFields()) {
                        if (!field.isNull()) {
                            final ISqlJetMemoryPointer value = field.valueText(SqlJetEncoding.UTF8);
                            Assert.assertNotNull(value);
                            String s = SqlJetUtility.toString(value);
                            logger.info(s);
View Full Code Here


    @Test
    public void testRecordCompare() throws SqlJetException {
        final SqlJetSchema s = new SqlJetSchema(db, btreeCopy);
        btreeCopy.setSchema(s);
        final ISqlJetBtreeDataTable d = new SqlJetBtreeDataTable(btreeCopy, REP_CACHE_TABLE, false);
        final ISqlJetBtreeRecord r = d.getRecord();
        final ISqlJetVdbeMem f = r.getFields().get(0);
        final ISqlJetMemoryPointer v = f.valueText(SqlJetEncoding.UTF8);
        final String h = SqlJetUtility.toString(v);
        final SqlJetBtreeRecord r1 = new SqlJetBtreeRecord(f);
        final SqlJetVdbeMem m = new SqlJetVdbeMem();
        m.setStr(SqlJetUtility.wrapPtr(SqlJetUtility.getBytes(h)), SqlJetEncoding.UTF8);
View Full Code Here

        try {
            final long row = locateHash(schema, hash);
            if (0 == row)
                return false;
            data.goToRow((int) row);
            final ISqlJetBtreeRecord record = data.getRecord();
            final ISqlJetVdbeMem field = record.getFields().get(0);
            final String foundHash = SqlJetUtility.toString(field.valueText(SqlJetEncoding.UTF8));
            Assert.assertEquals(hash, foundHash);
            return true;
        } finally {
            data.close();
View Full Code Here

            if (lastKey <= 0)
                return null;
            Random random = new Random();
            final int key = random.nextInt((int) lastKey);
            data.goToRow(key);
            final ISqlJetBtreeRecord record = data.getRecord();
            final ISqlJetVdbeMem field = record.getFields().get(0);
            final String hash = SqlJetUtility.toString(field.valueText(SqlJetEncoding.UTF8));
            return hash;
        } finally {
            data.close();
        }
View Full Code Here

TOP

Related Classes of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeRecord

Copyright © 2018 www.massapicom. 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.