Examples of goToRow()


Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeDataTable.goToRow()

        final ISqlJetBtreeDataTable data = new SqlJetBtreeDataTable(btreeCopy, REP_CACHE_TABLE, false);
        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;
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeDataTable.goToRow()

            long lastKey = data.getRowId();
            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 {
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.goToRow()

            try {

                db.getOptions().changeSchemaVersion();

                if (!schemaTable.goToRow(viewDef.getRowId()) || !VIEW_TYPE.equals(schemaTable.getTypeField()))
                    throw new SqlJetException(SqlJetErrorCode.CORRUPT);
                final String n = schemaTable.getNameField();
                if (null == n || !viewName.equals(n))
                    throw new SqlJetException(SqlJetErrorCode.CORRUPT);
                schemaTable.delete();
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.goToRow()

            try {

                db.getOptions().changeSchemaVersion();

                if (!schemaTable.goToRow(triggerDef.getRowId()) || !TRIGGER_TYPE.equals(schemaTable.getTypeField()))
                    throw new SqlJetException(SqlJetErrorCode.CORRUPT);
                final String n = schemaTable.getNameField();
                if (null == n || !triggerName.equals(n))
                    throw new SqlJetException(SqlJetErrorCode.CORRUPT);
                schemaTable.delete();
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.goToRow()

            try {

                db.getOptions().changeSchemaVersion();

                if (!schemaTable.goToRow(tableDef.getRowId()) || !TABLE_TYPE.equals(schemaTable.getTypeField()))
                    throw new SqlJetException(SqlJetErrorCode.CORRUPT);
                final String n = schemaTable.getNameField();
                if (null == n || !tableName.equals(n))
                    throw new SqlJetException(SqlJetErrorCode.CORRUPT);
                schemaTable.delete();
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.goToRow()

            schemaTable.lock();

            try {

                if (!schemaTable.goToRow(indexDef.getRowId()) || !INDEX_TYPE.equals(schemaTable.getTypeField())) {
                    if (throwIfFial)
                        throw new SqlJetException(SqlJetErrorCode.INTERNAL);
                    return false;
                }
                final String n = schemaTable.getNameField();
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.goToRow()

        final ISqlJetBtreeSchemaTable schemaTable = openSchemaTable(true);
        try {
            schemaTable.lock();
            try {

                if (!schemaTable.goToRow(rowId)) {
                    throw new SqlJetException(SqlJetErrorCode.CORRUPT);
                }

                final String typeField = schemaTable.getTypeField();
                final String nameField = schemaTable.getNameField();
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeDataTable.goToRow()

        final ISqlJetBtreeDataTable data = new SqlJetBtreeDataTable(btreeCopy, REP_CACHE_TABLE, false);
        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;
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeDataTable.goToRow()

            long lastKey = data.getRowId();
            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 {
View Full Code Here

Examples of org.tmatesoft.sqljet.core.table.ISqlJetCursor.goToRow()

                        ISqlJetTable table = db.getTable("articles");
                        ISqlJetCursor cursor = table.order("published_article_index"/*table.getPrimaryKeyIndexName()*/);
                        long rowCount = cursor.getRowCount();
                        try
                        {
                            if( cursor.goToRow(index) == false )
                            {
                                return null;
                            }

                            // the front page name of this first article
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.