本文整理汇总了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");
}
示例2: truncate
import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void truncate(Session session) {
throw DbException.getUnsupportedException("ALIAS");
}
示例3: findFirstOrLast
import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public Cursor findFirstOrLast(Session session, boolean first) {
throw DbException.getUnsupportedException("ALIAS");
}
示例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;
}
示例5: truncate
import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void truncate(Session session) {
throw DbException.getUnsupportedException("META");
}
示例6: remove
import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void remove(Session session, Row row) {
throw DbException.getUnsupportedException("META");
}
示例7: checkRename
import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void checkRename() {
throw DbException.getUnsupportedException("AGGREGATE");
}
示例8: checkRename
import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void checkRename() {
throw DbException.getUnsupportedException("RENAME");
}
示例9: setPowerOffCount
import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void setPowerOffCount(int count) {
throw DbException.getUnsupportedException("remote");
}
示例10: remove
import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void remove(Session session) {
throw DbException.getUnsupportedException("ALIAS");
}
示例11: removeRow
import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void removeRow(Session session, Row row) {
throw DbException.getUnsupportedException("VIEW");
}
示例12: removeChildrenAndResources
import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void removeChildrenAndResources(Session session) {
throw DbException.getUnsupportedException("META");
}
示例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");
}
示例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;
}
}
}
示例15: checkSupportAlter
import org.h2.message.DbException; //导入方法依赖的package包/类
@Override
public void checkSupportAlter() {
throw DbException.getUnsupportedException("META");
}