Package org.tmatesoft.sqljet.core.internal.vdbe

Examples of org.tmatesoft.sqljet.core.internal.vdbe.SqlJetBtreeRecord


        if (eof())
            return null;
        if (null == recordCache) {
            lock();
            try {
                recordCache = new SqlJetBtreeRecord(getCursor(), index, btree.getDb().getOptions().getFileFormat());
            } finally {
                unlock();
            }
            valueCache = new Object[recordCache.getFieldsCount()];
        }
View Full Code Here


        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

        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);
        final SqlJetBtreeRecord r2 = new SqlJetBtreeRecord(m);
        SqlJetKeyInfo keyInfo = new SqlJetKeyInfo();
        keyInfo.setEnc(SqlJetEncoding.UTF8);
        keyInfo.setNField(r1.getFieldsCount());
        final ISqlJetMemoryPointer raw1 = r1.getRawRecord();
        final SqlJetUnpackedRecord u = keyInfo.recordUnpack(raw1.remaining(), raw1);
        final ISqlJetMemoryPointer raw2 = r2.getRawRecord();
        final int c1 = u.recordCompare(raw2.remaining(), raw2);
        logger.info("compare " + c1);
        final int c2 = raw1.compareTo(raw2);
        logger.info("compare2 " + c2);
        Assert.assertTrue(c1 == c2);
View Full Code Here

TOP

Related Classes of org.tmatesoft.sqljet.core.internal.vdbe.SqlJetBtreeRecord

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.