Package org.tmatesoft.sqljet.core.schema

Examples of org.tmatesoft.sqljet.core.schema.ISqlJetIndexDef


                }
                root.addChild(node);
            }
            Set<String> indexNames = schema.getIndexNames();
            for (String indexName : indexNames) {
                ISqlJetIndexDef index = schema.getIndex(indexName);
                root.addChild(new SchemaTreeNode(index));
            }
        } catch (SqlJetException e) {
            root = new SchemaTreeNode();
            throw e;
View Full Code Here


        final String tableName = tableDef.getName();
        final Iterator<Map.Entry<String, ISqlJetIndexDef>> iterator = indexDefs.entrySet().iterator();
        while (iterator.hasNext()) {
            final Map.Entry<String, ISqlJetIndexDef> indexDefEntry = iterator.next();
            final String indexName = indexDefEntry.getKey();
            final ISqlJetIndexDef indexDef = indexDefEntry.getValue();
            if (indexDef.getTableName().equals(tableName)) {
                if (doDropIndex(indexName, true, false)) {
                    iterator.remove();
                }
            }
        }
View Full Code Here

                    final long pageField = schemaTable.getPageField();
                    if (pageField == moved) {
                        final String nameField = schemaTable.getNameField();
                        schemaTable.updateRecord(schemaTable.getRowId(), schemaTable.getTypeField(), nameField,
                                schemaTable.getTableField(), page, schemaTable.getSqlField());
                        final ISqlJetIndexDef index = getIndex(nameField);
                        if (index != null) {
                            if (index instanceof SqlJetBaseIndexDef) {
                                ((SqlJetBaseIndexDef) index).setPage(page);
                            }
                        } else {
View Full Code Here

            try {

                db.getOptions().changeSchemaVersion();

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

                indexDefs.put(indexName, indexDef);

                return indexDef;
View Full Code Here

                if (rowIdForRow > 0) {
                    return rowIdForRow;
                }
            }
        } else {
            ISqlJetIndexDef indexDef = getIndexDefinitions().get(pkIndex);
            Object[] keyForIndex = getKeyForIndex(getAsNamedFields(values), indexDef);
            if (locate(pkIndex, false, keyForIndex)) {
                return getRowId();
            }
        }
        for(ISqlJetIndexDef indexDef : getIndexDefinitions().values()){
            if(indexDef.isUnique()) {
                Object[] keyForIndex = getKeyForIndex(getAsNamedFields(values), indexDef);
                if (locate(indexDef.getName(), false, keyForIndex)) {
                    return getRowId();
                }
            }
        }
        return rowId;
View Full Code Here

TOP

Related Classes of org.tmatesoft.sqljet.core.schema.ISqlJetIndexDef

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.