} catch (HsqlException e) {
return Result.newErrorResult(e, sql);
}
}
case StatementTypes.SET_USER_LOCAL : {
User user = (User) parameters[0];
boolean mode = ((Boolean) parameters[1]).booleanValue();
session.checkAdmin();
session.checkDDLWrite();
user.isLocalOnly = mode;
session.database.schemaManager.setSchemaChangeTimestamp();
return Result.updateZeroResult;
}
case StatementTypes.SET_USER_INITIAL_SCHEMA : {
try {
User user = (User) parameters[0];
HsqlName schema = (HsqlName) parameters[1];
session.checkDDLWrite();
if (user == null) {
user = session.getUser();
} else {
session.checkAdmin();
session.checkDDLWrite();
user = session.database.userManager.get(
user.getName().getNameString());
}
if (schema != null) {
schema =
session.database.schemaManager.getSchemaHsqlName(
schema.name);
}
//
user.setInitialSchema(schema);
session.database.schemaManager.setSchemaChangeTimestamp();
//
return Result.updateZeroResult;
} catch (HsqlException e) {
return Result.newErrorResult(e, sql);
}
}
case StatementTypes.SET_USER_PASSWORD : {
try {
User user = parameters[0] == null ? session.getUser()
: (User) parameters[0];
String password = (String) parameters[1];
boolean isDigest = (Boolean) parameters[2];
session.checkDDLWrite();