return Result.newErrorResult(e, sql);
}
}
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.getNameString());
}
if (schema != null) {
schema =
session.database.schemaManager.getSchemaHsqlName(
schema.name);
}
//
user.setInitialSchema(schema);
session.database.setMetaDirty(false);
//
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];
session.checkDDLWrite();
session.setScripting(true);
user.setPassword(password);
return Result.updateZeroResult;
} catch (HsqlException e) {
return Result.newErrorResult(e, sql);
}