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

Examples of org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeTable$State


    }

    @Test
    public void testTableReadIndex() throws SqlJetException, UnsupportedEncodingException {
        boolean passed = false;
        final ISqlJetBtreeTable master = new SqlJetBtreeTable(btreeCopy, ISqlJetDbHandle.MASTER_ROOT, false, false);
        try {
            Assert.assertTrue(!master.eof());
            for (ISqlJetBtreeRecord r1 = master.getRecord(); !master.eof(); master.next(), r1 = master.getRecord()) {
                Assert.assertNotNull(r1.getFields());
                Assert.assertTrue(!r1.getFields().isEmpty());
                final String type = SqlJetUtility.toString(r1.getFields().get(0).valueText(SqlJetEncoding.UTF8));
                Assert.assertNotNull(type);
                final String name = SqlJetUtility.toString(r1.getFields().get(1).valueText(SqlJetEncoding.UTF8));
                Assert.assertNotNull(name);
                final long page = r1.getFields().get(3).intValue();
                if ("index".equals(type.trim())) {
                    Assert.assertTrue(page > 0);
                    final ISqlJetBtreeTable data = new SqlJetBtreeTable(btreeCopy, (int) page, false, true);
                    Assert.assertTrue(!data.eof());
                    for (ISqlJetBtreeRecord r2 = data.getRecord(); !data.eof(); data.next(), r2 = data.getRecord()) {
                        Assert.assertNotNull(r2.getFields());
                        Assert.assertTrue(!r2.getFields().isEmpty());
                        for (ISqlJetVdbeMem field : r2.getFields()) {
                            final ISqlJetMemoryPointer value = field.valueText(SqlJetEncoding.UTF8);
                            Assert.assertNotNull(value);
View Full Code Here

TOP

Related Classes of org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeTable$State

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.