本文整理汇总了Java中org.hsqldb.HsqlNameManager.HsqlName类的典型用法代码示例。如果您正苦于以下问题:Java HsqlName类的具体用法?Java HsqlName怎么用?Java HsqlName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HsqlName类属于org.hsqldb.HsqlNameManager包,在下文中一共展示了HsqlName类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: checkSchemaUpdateAuthorisation
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
void checkSchemaUpdateAuthorisation(HsqlName schema) {
if (session.isProcessingLog) {
return;
}
SqlInvariants.checkSchemaNameNotSystem(schema.name);
if (isSchemaDefinition) {
if (schema != session.getCurrentSchemaHsqlName()) {
throw Error.error(ErrorCode.X_42505);
}
} else {
session.getGrantee().checkSchemaUpdateOrGrantRights(schema.name);
}
session.checkDDLWrite();
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:19,代码来源:ParserDDL.java
示例2: compileCreateSequence
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
StatementSchema compileCreateSequence() {
read();
/*
* CREATE SEQUENCE <name> [AS {INTEGER | BIGINT}] [START WITH <value>]
* [INCREMENT BY <value>]
*/
HsqlName name = readNewSchemaObjectNameNoCheck(SchemaObject.SEQUENCE);
NumberSequence sequence = new NumberSequence(name, Type.SQL_INTEGER);
readSequenceOptions(sequence, true, false);
String sql = getLastPart();
Object[] args = new Object[] { sequence };
return new StatementSchema(sql, StatementTypes.CREATE_SEQUENCE, args, null, null);
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:19,代码来源:ParserDDL.java
示例3: dropUser
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
private static void dropUser(Session session, HsqlName name,
boolean cascade) {
Grantee grantee = session.database.getUserManager().get(name.name);
if (session.database.getSessionManager().isUserActive(name.name)) {
throw Error.error(ErrorCode.X_42539);
}
if (!cascade && session.database.schemaManager.hasSchemas(grantee)) {
HsqlArrayList list =
session.database.schemaManager.getSchemas(grantee);
Schema schema = (Schema) list.get(0);
throw Error.error(ErrorCode.X_42502,
schema.getName().statementName);
}
session.database.schemaManager.dropSchemas(grantee, cascade);
session.database.getUserManager().dropUser(name.name);
}
开发者ID:s-store,项目名称:s-store,代码行数:22,代码来源:StatementSchema.java
示例4: getReferencesToSchema
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
public MultiValueHashMap getReferencesToSchema(String schemaName) {
MultiValueHashMap map = new MultiValueHashMap();
Iterator mainIterator = referenceMap.keySet().iterator();
while (mainIterator.hasNext()) {
HsqlName name = (HsqlName) mainIterator.next();
if (!name.schema.name.equals(schemaName)) {
continue;
}
Iterator it = referenceMap.get(name);
while (it.hasNext()) {
map.put(name, it.next());
}
}
return map;
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:22,代码来源:SchemaManager.java
示例5: getReferencesTo
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
public OrderedHashSet getReferencesTo(HsqlName object) {
readLock.lock();
try {
OrderedHashSet set = new OrderedHashSet();
Iterator it = referenceMap.get(object);
while (it.hasNext()) {
HsqlName name = (HsqlName) it.next();
set.add(name);
}
return set;
} finally {
readLock.unlock();
}
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:20,代码来源:SchemaManager.java
示例6: readRoutineParameter
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
ColumnSchema readRoutineParameter(Routine routine, boolean isParam) {
HsqlName hsqlName = null;
int parameterMode = readRoutineParameterMode(routine.routineType,
routine.isAggregate);
if (!isReservedKey()) {
hsqlName = readNewDependentSchemaObjectName(routine.getName(),
SchemaObject.PARAMETER);
}
Type typeObject = readTypeDefinition(false, true);
ColumnSchema column = new ColumnSchema(hsqlName, typeObject, true,
false, null);
if (isParam) {
column.setParameterMode((byte) parameterMode);
}
return column;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:22,代码来源:ParserRoutine.java
示例7: removeParent
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
void removeParent(HsqlName parent) {
Iterator it = map.values().iterator();
while (it.hasNext()) {
if (type == SchemaObject.TRIGGER
|| type == SchemaObject.SPECIFIC_ROUTINE) {
SchemaObject object = (SchemaObject) it.next();
if (object.getName().parent == parent) {
it.remove();
}
} else {
HsqlName name = (HsqlName) it.next();
if (name.parent == parent) {
it.remove();
}
}
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:22,代码来源:SchemaObjectSet.java
示例8: CompiledStatement
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
/**
* Instantiate this as a SELECT statement.
*
* @param select
* @param params
*/
CompiledStatement(Session session, Database database, HsqlName schema,
Select select, SubQuery[] subqueries,
Expression[] params) throws HsqlException {
schemaHsqlName = schema;
this.select = select;
// resolve any parameters in SELECT as VARCHAR
for (int i = 0; i < select.iResultLen; i++) {
Expression colexpr = select.exprColumns[i];
if (colexpr.getDataType() == Types.NULL) {
colexpr.setDataType(Types.VARCHAR);
}
}
// set select result metadata etc.
select.prepareResult(session);
setParameters(params);
setSubqueries(subqueries);
type = SELECT;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:CompiledStatement.java
示例9: compileAlterColumnRename
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
/**
* Responsible for handling tail of ALTER COLUMN ... RENAME ...
*/
private Statement compileAlterColumnRename(Table table,
ColumnSchema column) {
checkIsSimpleName();
HsqlName name = readNewSchemaObjectName(SchemaObject.COLUMN, true);
if (table.findColumn(name.name) > -1) {
throw Error.error(ErrorCode.X_42504, name.name);
}
database.schemaManager.checkColumnIsReferenced(table.getName(),
column.getName());
String sql = getLastPart();
Object[] args = new Object[] {
column.getName(), name
};
HsqlName[] writeLockNames = new HsqlName[] {
database.getCatalogName(), table.getName()
};
return new StatementSchema(sql, StatementTypes.RENAME_OBJECT, args,
null, writeLockNames);
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:29,代码来源:ParserDDL.java
示例10: CompiledStatement
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
/**
* Initializes this as a DELETE statement
*
* @param targetFilter
* @param deleteCondition
* @param parameters
*/
CompiledStatement(Session session, Database database, HsqlName schema,
TableFilter targetFilter, Expression deleteCondition,
SubQuery[] subqueries,
Expression[] params) throws HsqlException {
schemaHsqlName = schema;
this.targetFilter = targetFilter;
targetTable = targetFilter.filterTable;
if (deleteCondition != null) {
condition = new Expression(deleteCondition);
condition.resolveTables(targetFilter);
condition.resolveTypes(session);
targetFilter.setConditions(session, condition);
}
setParameters(params);
setSubqueries(subqueries);
type = DELETE;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:CompiledStatement.java
示例11: dropRole
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
private static void dropRole(Session session, HsqlName name,
boolean cascade) {
Grantee role = session.database.getGranteeManager().getRole(name.name);
if (!cascade && session.database.schemaManager.hasSchemas(role)) {
HsqlArrayList list =
session.database.schemaManager.getSchemas(role);
Schema schema = (Schema) list.get(0);
throw Error.error(ErrorCode.X_42502,
schema.getName().statementName);
}
session.database.schemaManager.dropSchemas(session, role, cascade);
session.database.getGranteeManager().dropRole(name.name);
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:StatementSchema.java
示例12: findUserTableForIndex
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
/**
* Returns the table that has an index with the given name and schema.
*/
Table findUserTableForIndex(Session session, String name,
String schemaName) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(schemaName);
HsqlName indexName = schema.indexLookup.getName(name);
if (indexName == null) {
return null;
}
return findUserTable(session, indexName.parent.name, schemaName);
} finally {
readLock.unlock();
}
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:22,代码来源:SchemaManager.java
示例13: getReferences
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
public OrderedHashSet getReferences() {
OrderedHashSet set = new OrderedHashSet();
if (colTypes == null)
return set;
for (int i = 0; i < colTypes.length; i++) {
if (colTypes[i].isDomainType() || colTypes[i].isDistinctType()) {
HsqlName name = ((SchemaObject) colTypes[i]).getName();
set.add(name);
}
}
return set;
}
开发者ID:s-store,项目名称:s-store,代码行数:18,代码来源:Table.java
示例14: isAccessible
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
/**
* Returns true if any of the rights represented by the
* rights argument has been granted on the database object identified
* by the dbobject argument. <p>
*
* This is done by checking that a mapping exists in the rights map
* from the dbobject argument for at least one of the rights
* contained in the rights argument.
*
* Only does one level of recursion to check the PUBLIC role.
*/
boolean isAccessible(HsqlName dbObject, int rights) throws HsqlException {
if (isAdmin) {
return true;
}
if (pubGrantee != null && pubGrantee.isAccessible(dbObject, rights)) {
return true;
}
int n = fullRightsMap.get(dbObject, 0);
if (n != 0) {
return (n & rights) != 0;
}
return false;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:Grantee.java
示例15: UDT_PRIVILEGES
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
Table UDT_PRIVILEGES() {
Table t = sysTables[UDT_PRIVILEGES];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[UDT_PRIVILEGES]);
addColumn(t, "UDT_CATALOG", SQL_IDENTIFIER);
addColumn(t, "UDT_SCHEMA", SQL_IDENTIFIER);
addColumn(t, "UDT_NAME", SQL_IDENTIFIER);
addColumn(t, "PRIVILEGE_TYPE", CHARACTER_DATA);
addColumn(t, "IS_GRANTABLE", YES_OR_NO);
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[UDT_PRIVILEGES].name, false,
SchemaObject.INDEX);
t.createPrimaryKey(name, new int[] {
0, 1, 2, 3, 4
}, false);
return t;
}
return t;
}
开发者ID:s-store,项目名称:s-store,代码行数:27,代码来源:DatabaseInformationFull.java
示例16: getUserSchemaHsqlName
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
public HsqlName getUserSchemaHsqlName(String name) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(name);
if (schema == null) {
throw Error.error(ErrorCode.X_3F000, name);
}
if (schema.getName()
== SqlInvariants.INFORMATION_SCHEMA_HSQLNAME) {
throw Error.error(ErrorCode.X_3F000, name);
}
return schema.getName();
} finally {
readLock.unlock();
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:22,代码来源:SchemaManager.java
示例17: addReferencesFrom
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
private void addReferencesFrom(SchemaObject object) {
OrderedHashSet set = object.getReferences();
HsqlName name = object.getName();
if (set == null) {
return;
}
for (int i = 0; i < set.size(); i++) {
HsqlName referenced = (HsqlName) set.get(i);
if (object instanceof Routine) {
name = ((Routine) object).getSpecificName();
}
referenceMap.put(referenced, name);
}
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:20,代码来源:SchemaManager.java
示例18: findSchemaHsqlName
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
public HsqlName findSchemaHsqlName(String name) {
readLock.lock();
try {
Schema schema = ((Schema) schemaMap.get(name));
if (schema == null) {
return null;
}
return schema.getName();
} finally {
readLock.unlock();
}
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:17,代码来源:SchemaManager.java
示例19: compileCheckpoint
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
private Statement compileCheckpoint() {
boolean defrag = false;
read();
if (token.tokenType == Tokens.DEFRAG) {
defrag = true;
read();
} else if (token.tokenType == Tokens.SEMICOLON) {
read();
// only semicolon is accepted here
}
if (token.tokenType != Tokens.X_ENDPARSE) {
throw unexpectedToken();
}
HsqlName[] names =
database.schemaManager.getCatalogAndBaseTableNames();
Object[] args = new Object[]{ Boolean.valueOf(defrag) };
Statement cs = new StatementCommand(StatementTypes.DATABASE_CHECKPOINT,
args, null, names);
return cs;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:29,代码来源:ParserCommand.java
示例20: readFor
import org.hsqldb.HsqlNameManager.HsqlName; //导入依赖的package包/类
private Statement readFor(Routine routine, StatementCompound context,
HsqlName label) {
readThis(Tokens.FOR);
Statement cursorStatement = compileCursorSpecification();
readThis(Tokens.DO);
Statement[] statements = readSQLProcedureStatementList(routine,
context);
readThis(Tokens.END);
readThis(Tokens.FOR);
if (isSimpleName() && !isReservedKey()) {
if (label == null) {
throw unexpectedToken();
}
if (!label.name.equals(token.tokenString)) {
throw Error.error(ErrorCode.X_42508, token.tokenString);
}
read();
}
StatementCompound result = new StatementCompound(StatementTypes.FOR,
label);
result.setLoopStatement(cursorStatement);
result.setStatements(statements);
return result;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:36,代码来源:ParserRoutine.java
注:本文中的org.hsqldb.HsqlNameManager.HsqlName类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论