use of org.hsqldb_voltpatches.lib.HsqlArrayList in project voltdb by VoltDB.
the class GranteeManager method getRightstSQL.
public String[] getRightstSQL() {
HsqlArrayList list = new HsqlArrayList();
Iterator grantees = getGrantees().iterator();
while (grantees.hasNext()) {
Grantee grantee = (Grantee) grantees.next();
String name = grantee.getNameString();
// _SYSTEM user, DBA Role grants not persisted
if (GranteeManager.isImmutable(name)) {
continue;
}
HsqlArrayList subList = grantee.getRightsSQL();
list.addAll(subList);
}
String[] array = new String[list.size()];
list.toArray(array);
return array;
}
use of org.hsqldb_voltpatches.lib.HsqlArrayList in project voltdb by VoltDB.
the class GranteeManager method getSQL.
public String[] getSQL() {
HsqlArrayList list = new HsqlArrayList();
// roles
Iterator it = getRoles().iterator();
while (it.hasNext()) {
Grantee grantee = (Grantee) it.next();
// ADMIN_ROLE_NAME is not persisted
if (!GranteeManager.isReserved(grantee.getNameString())) {
list.add(grantee.getSQL());
}
}
// users
it = getGrantees().iterator();
for (; it.hasNext(); ) {
Grantee grantee = (Grantee) it.next();
if (grantee instanceof User) {
list.add(grantee.getSQL());
}
}
String[] array = new String[list.size()];
list.toArray(array);
return array;
}
use of org.hsqldb_voltpatches.lib.HsqlArrayList in project voltdb by VoltDB.
the class Expression method checkValidCheckConstraint.
/**
* checkValidCheckConstraint
*/
public void checkValidCheckConstraint() {
HsqlArrayList set = new HsqlArrayList();
Expression.collectAllExpressions(set, this, subqueryExpressionSet, emptyExpressionSet);
if (!set.isEmpty()) {
throw Error.error(ErrorCode.X_0A000, "subquery in check constraint");
}
}
use of org.hsqldb_voltpatches.lib.HsqlArrayList in project voltdb by VoltDB.
the class Database method getSettingsSQL.
public String[] getSettingsSQL() {
HsqlArrayList list = new HsqlArrayList();
if (!getCatalogName().name.equals(HsqlNameManager.DEFAULT_CATALOG_NAME)) {
String name = getCatalogName().statementName;
list.add("ALTER CATALOG PUBLIC RENAME TO " + name);
}
if (collation.name != null) {
String name = collation.getName().statementName;
list.add("SET DATABASE COLLATION " + name);
}
String[] array = new String[list.size()];
list.toArray(array);
return array;
}
Aggregations