Examples of ISqlJetBtreeSchemaTable


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

            throw new SqlJetException(SqlJetErrorCode.ERROR, "Virtual table \"" + tableName + "\" exists already");
        }

        checkNameConflict(SqlJetSchemaObjectType.VIRTUAL_TABLE, tableName);

        final ISqlJetBtreeSchemaTable schemaTable = openSchemaTable(true);
        final String createVirtualTableSQL = getCreateVirtualTableSql(parseTable);

        try {

            schemaTable.lock();

            try {

                db.getOptions().changeSchemaVersion();

                final long rowId = schemaTable.insertRecord(TABLE_TYPE, tableName, tableName, page,
                        createVirtualTableSQL);

                tableDef.setPage(page);
                tableDef.setRowId(rowId);
                virtualTableDefs.put(tableName, tableDef);
                return tableDef;

            } finally {
                schemaTable.unlock();
            }

        } finally {
            schemaTable.close();
        }

    }
View Full Code Here

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

                return viewDefs.get(viewName);
            }
            throw new SqlJetException(SqlJetErrorCode.ERROR, "View \"" + viewName + "\" exists already");
        }
        checkNameConflict(SqlJetSchemaObjectType.VIEW, viewName);
        final ISqlJetBtreeSchemaTable schemaTable = openSchemaTable(true);

        try {
            schemaTable.lock();
            try {
                db.getOptions().changeSchemaVersion();

                long rowId = schemaTable.insertRecord(VIEW_TYPE, viewName, viewName, 0, sql);
                viewDef.setRowId(rowId);
                viewDefs.put(viewName, viewDef);
                return viewDef;

            } finally {
                schemaTable.unlock();
            }

        } finally {
            schemaTable.close();
        }
    }
View Full Code Here

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

        final ISqlJetVirtualTableDef tableDef = getVirtualTable(virtualTableName);
        if (null == tableDef)
            throw new SqlJetException(SqlJetErrorCode.ERROR);

        final ISqlJetBtreeSchemaTable schemaTable = openSchemaTable(true);

        try {

            schemaTable.lock();

            try {

                db.getOptions().changeSchemaVersion();

                final ISqlJetIndexDef indexDef = createAutoIndex(schemaTable, tableDef.getTableName(), indexName);

                indexDefs.put(indexName, indexDef);

                return indexDef;

            } finally {
                schemaTable.unlock();
            }

        } finally {
            schemaTable.close();
        }
    }
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.