当前位置: 首页>>代码示例>>Java>>正文


Java DbException.getUnsupportedException方法代码示例

本文整理汇总了Java中org.h2.message.DbException.getUnsupportedException方法的典型用法代码示例。如果您正苦于以下问题:Java DbException.getUnsupportedException方法的具体用法?Java DbException.getUnsupportedException怎么用?Java DbException.getUnsupportedException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.h2.message.DbException的用法示例。


在下文中一共展示了DbException.getUnsupportedException方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkRename

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void checkRename() {
    throw DbException.getUnsupportedException("ALIAS");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:FunctionIndex.java

示例2: truncate

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void truncate(Session session) {
    throw DbException.getUnsupportedException("ALIAS");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:FunctionIndex.java

示例3: findFirstOrLast

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public Cursor findFirstOrLast(Session session, boolean first) {
    throw DbException.getUnsupportedException("ALIAS");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:FunctionIndex.java

示例4: update

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public int update() {
    session.commit(true);
    session.getUser().checkAdmin();
    Database db = session.getDatabase();
    TableView view = null;
    Table old = getSchema().findTableOrView(session, viewName);
    if (old != null) {
        if (ifNotExists) {
            return 0;
        }
        if (!orReplace || !Table.VIEW.equals(old.getTableType())) {
            throw DbException.get(ErrorCode.VIEW_ALREADY_EXISTS_1, viewName);
        }
        view = (TableView) old;
    }
    int id = getObjectId();
    String querySQL;
    if (select == null) {
        querySQL = selectSQL;
    } else {
        ArrayList<Parameter> params = select.getParameters();
        if (params != null && params.size() > 0) {
            throw DbException.getUnsupportedException("parameters in views");
        }
        querySQL = select.getPlanSQL();
    }
    // The view creates a Prepared command object, which belongs to a
    // session, so we pass the system session down.
    Session sysSession = db.getSystemSession();
    try {
        if (view == null) {
            Schema schema = session.getDatabase().getSchema(session.getCurrentSchemaName());
            sysSession.setCurrentSchema(schema);
            view = new TableView(getSchema(), id, viewName, querySQL, null,
                    columnNames, sysSession, false);
        } else {
            view.replace(querySQL, columnNames, sysSession, false, force);
            view.setModified();
        }
    } finally {
        sysSession.setCurrentSchema(db.getSchema(Constants.SCHEMA_MAIN));
    }
    if (comment != null) {
        view.setComment(comment);
    }
    if (old == null) {
        db.addSchemaObject(session, view);
    } else {
        db.updateMeta(session, view);
    }
    return 0;
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:54,代码来源:CreateView.java

示例5: truncate

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void truncate(Session session) {
    throw DbException.getUnsupportedException("META");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:MetaIndex.java

示例6: remove

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void remove(Session session, Row row) {
    throw DbException.getUnsupportedException("META");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:MetaIndex.java

示例7: checkRename

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void checkRename() {
    throw DbException.getUnsupportedException("AGGREGATE");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:UserAggregate.java

示例8: checkRename

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void checkRename() {
    throw DbException.getUnsupportedException("RENAME");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:FunctionAlias.java

示例9: setPowerOffCount

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void setPowerOffCount(int count) {
    throw DbException.getUnsupportedException("remote");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:SessionRemote.java

示例10: remove

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void remove(Session session) {
    throw DbException.getUnsupportedException("ALIAS");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:FunctionIndex.java

示例11: removeRow

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void removeRow(Session session, Row row) {
    throw DbException.getUnsupportedException("VIEW");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:TableView.java

示例12: removeChildrenAndResources

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void removeChildrenAndResources(Session session) {
    throw DbException.getUnsupportedException("META");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:MetaTable.java

示例13: addIndex

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public Index addIndex(Session session, String indexName, int indexId,
        IndexColumn[] cols, IndexType indexType, boolean create,
        String indexComment) {
    throw DbException.getUnsupportedException("LINK");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:7,代码来源:TableLink.java

示例14: SpatialTreeIndex

import org.h2.message.DbException; //导入方法依赖的package包/类
/**
 * Constructor.
 *
 * @param table the table instance
 * @param id the index id
 * @param indexName the index name
 * @param columns the indexed columns (only one geometry column allowed)
 * @param persistent whether the index should be persisted
 * @param indexType the index type (only spatial index)
 * @param create whether to create a new index
 * @param session the session.
 */
public SpatialTreeIndex(Table table, int id, String indexName,
        IndexColumn[] columns, IndexType indexType, boolean persistent,
        boolean create, Session session) {
    if (indexType.isUnique()) {
        throw DbException.getUnsupportedException("not unique");
    }
    if (!persistent && !create) {
        throw DbException.getUnsupportedException(
                "Non persistent index called with create==false");
    }
    if (columns.length > 1) {
        throw DbException.getUnsupportedException(
                "can only do one column");
    }
    if ((columns[0].sortType & SortOrder.DESCENDING) != 0) {
        throw DbException.getUnsupportedException(
                "cannot do descending");
    }
    if ((columns[0].sortType & SortOrder.NULLS_FIRST) != 0) {
        throw DbException.getUnsupportedException(
                "cannot do nulls first");
    }
    if ((columns[0].sortType & SortOrder.NULLS_LAST) != 0) {
        throw DbException.getUnsupportedException(
                "cannot do nulls last");
    }
    initBaseIndex(table, id, indexName, columns, indexType);
    this.needRebuild = create;
    this.table = table;
    if (!database.isStarting()) {
        if (columns[0].column.getType() != Value.GEOMETRY) {
            throw DbException.getUnsupportedException(
                    "spatial index on non-geometry column, " +
                    columns[0].column.getCreateSQL());
        }
    }
    if (!persistent) {
        // Index in memory
        store = MVStore.open(null);
        treeMap =  store.openMap("spatialIndex",
                new MVRTreeMap.Builder<Long>());
    } else {
        if (id < 0) {
            throw DbException.getUnsupportedException(
                    "Persistent index with id<0");
        }
        MVTableEngine.init(session.getDatabase());
        store = session.getDatabase().getMvStore().getStore();
        // Called after CREATE SPATIAL INDEX or
        // by PageStore.addMeta
        treeMap =  store.openMap(MAP_PREFIX + getId(),
                new MVRTreeMap.Builder<Long>());
        if (treeMap.isEmpty()) {
            needRebuild = true;
        }
    }
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:70,代码来源:SpatialTreeIndex.java

示例15: checkSupportAlter

import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void checkSupportAlter() {
    throw DbException.getUnsupportedException("META");
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:5,代码来源:MetaTable.java


注:本文中的org.h2.message.DbException.getUnsupportedException方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。