token = tokenizer.getSimpleToken();
switch (Token.get(token)) {
case Token.PROPERTY : {
HsqlDatabaseProperties p;
session.checkAdmin();
token = tokenizer.getSimpleName();
if (!tokenizer.wasQuotedIdentifier()) {
throw Trace.error(Trace.QUOTED_IDENTIFIER_REQUIRED);
}
p = database.getProperties();
boolean isboolean = p.isBoolean(token);
boolean isintegral = p.isIntegral(token);
boolean isstring = p.isString(token);
Trace.check(isboolean || isintegral || isstring,
Trace.ACCESS_IS_DENIED, token);
int type = isboolean ? Types.BOOLEAN
: isintegral ? Types.INTEGER
: Types.VARCHAR;
Object value = tokenizer.getInType(type);
if (HsqlDatabaseProperties.hsqldb_cache_file_scale.equals(
token)) {
if (database.logger.hasCache()
|| ((Integer) value).intValue() != 8) {
Trace.throwerror(Trace.ACCESS_IS_DENIED, token);
}
}
p.setDatabaseProperty(token, value.toString().toLowerCase());
p.setDatabaseVariables();
break;
}
case Token.SCHEMA : {
session.setScripting(false);