Top Description Fields Constructors Methods
org.hsqldb

public Class ParserDDL

extends ParserRoutine
Class Inheritance
Known Direct Subclasses
org.hsqldb.ParserCommand
Imports
java.lang.reflect.Method, org.hsqldb.HsqlNameManager.HsqlName, org.hsqldb.error.Error, .ErrorCode, org.hsqldb.index.Index, org.hsqldb.lib.ArrayUtil, .HsqlArrayList, .List, .OrderedHashSet, .OrderedIntHashSet, org.hsqldb.map.ValuePool, org.hsqldb.rights.GrantConstants, .Grantee, .GranteeManager, .Right, .User, org.hsqldb.types.Charset, .Collation, .Type, .UserTypeModifier

Parser for DDL statements
Author
Fred Toussi (fredt@users dot sourceforge.net)
Since
1.9.0
Version
2.7.3

Field Summary

Modifier and TypeField and Description
pack-priv static final int[]
pack-priv static final short[]
pack-priv static final short[]
Inherited from org.hsqldb.ParserRoutine:
featureStrings

Constructor Summary

AccessConstructor and Description
pack-priv
ParserDDL(Session session, Scanner scanner)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
pack-priv Statement
pack-priv Statement
compileAlterColumn(Table table, ColumnSchema column, int columnIndex)

pack-priv StatementSchema
compileAlterColumnAddSequence(Table table, ColumnSchema column, int colIndex)

private Statement
private Statement
compileAlterColumnDataTypeIdentity(Table table, ColumnSchema column)

Allows changes to type of column or addition / removal of an IDENTITY generator.

private Statement
compileAlterColumnDefault(Table table, ColumnSchema column, int columnIndex)

private Statement
compileAlterColumnRename(Table table, ColumnSchema column)

Responsible for handling tail of ALTER COLUMN ...

pack-priv StatementSchema
compileAlterColumnSequenceOptions(Table table, ColumnSchema column, int columnIndex)

private Statement
compileAlterColumnSetNullability(Table table, ColumnSchema column, boolean nullable)

pack-priv Statement
pack-priv Statement
pack-priv Statement
pack-priv Statement
pack-priv Statement
pack-priv Statement
pack-priv Statement
pack-priv Statement
pack-priv Statement
pack-priv Statement
pack-priv Statement
pack-priv StatementSchema
pack-priv Statement
pack-priv Statement
pack-priv Statement
private Statement
private Statement
pack-priv Statement
private Statement
pack-priv StatementSchema
pack-priv StatementSchema
pack-priv StatementSchema
pack-priv StatementSchema
pack-priv StatementSchema
pack-priv StatementSchema
pack-priv StatementSchema
compileCreateIndex(boolean unique)

pack-priv StatementSchema
pack-priv StatementSchema
pack-priv StatementSchema
pack-priv StatementSchema
compileCreateSynonym(boolean isOrReplace)

pack-priv StatementSchema
compileCreateType(boolean orReplace)

pack-priv StatementSchema
pack-priv StatementSchema
compileCreateView(boolean alter, boolean orReplace)

pack-priv StatementSession
pack-priv Statement
pack-priv StatementSchema
pack-priv Statement
compileModifyColumn(Table table, ColumnSchema column, int columnIndex)

pack-priv Statement
compileRenameObject(HsqlNameManager.HsqlName name, int type, boolean ifExists)

pack-priv Statement
private StatementSchema
private StatementSchema
compileRoleGrantOrRevoke(boolean grant)

pack-priv void
private boolean
pack-priv boolean

Returns:

true if next token is "TRUE"; false if next token is "FALSE"
processTrueOrFalse
()

Retrieves boolean value corresponding to the next token.

pack-priv Boolean
pack-priv HsqlNameManager.HsqlName
pack-priv String
pack-priv NumberSequence
readSequence(Table table, ColumnSchema column, boolean withType)

pack-priv void
reset(Session session, String sql)

Overrides org.hsqldb.ParserDQL.reset.

Resets this parse context with the given SQL character sequence.

Inherited from org.hsqldb.ParserRoutine:
checkSchemaUpdateAuthorisationcompileAlterSpecificRoutinecompileCasecompileCompoundStatementcompileCreateProcedureOrFunctioncompileCreateTriggercompileForcompileGetStatementcompileIfcompileIteratecompileLeavecompileLoopcompileOpenCursorStatementcompileRepeatcompileReturnValuecompileSelectSingleRowStatementcompileSetStatementcompileSignalcompileSQLProcedureStatementListcompileSQLProcedureStatementOrNullcompileTriggerRoutinecompileTriggerSetStatementcompileWhilecreateLabelIfNullgetTypesArrayparseSQLFeatureValueparseSQLStateValuereadCaseWhenreadCreateDatabaseAuthenticationFunctionreadCreatePasswordCheckFunctionreadCreateProcedureOrFunctionreadLabelreadLocalDeclarationListreadLocalTableVariableDeclarationOrNullreadLocalVariableDeclarationOrNullreadProcedureOrFunctionDeclarationreadRoutineArgumentsreadRoutineBodyreadRoutineJavaBodyreadRoutineParameterreadRoutineParameterModereadRoutineSQLBodyreadSimpleCaseWhenresolveOuterReferencesAndTypes

Field Detail

schemaCommandsback to summary
pack-priv static final int[] schemaCommands
startStatementTokensback to summary
pack-priv static final short[] startStatementTokens
startStatementTokensSchemaback to summary
pack-priv static final short[] startStatementTokensSchema

Constructor Detail

ParserDDLback to summary
pack-priv ParserDDL(Session session, Scanner scanner)

Method Detail

checkDatabaseUpdateAuthorisationback to summary
pack-priv void checkDatabaseUpdateAuthorisation()
checkSchemaUpdateAuthorisationback to summary
pack-priv void checkSchemaUpdateAuthorisation(Session session, HsqlNameManager.HsqlName schema)
compileAlterback to summary
pack-priv Statement compileAlter()
compileAlterColumnback to summary
pack-priv Statement compileAlterColumn(Table table, ColumnSchema column, int columnIndex)
compileAlterColumnAddSequenceback to summary
pack-priv StatementSchema compileAlterColumnAddSequence(Table table, ColumnSchema column, int colIndex)
compileAlterColumnDataTypeback to summary
private Statement compileAlterColumnDataType(Table table, ColumnSchema column)
compileAlterColumnDataTypeIdentityback to summary
private Statement compileAlterColumnDataTypeIdentity(Table table, ColumnSchema column)

Allows changes to type of column or addition / removal of an IDENTITY generator. IDENTITY is removed if it does not appear in new column definition Constraint definitions are not allowed

compileAlterColumnDefaultback to summary
private Statement compileAlterColumnDefault(Table table, ColumnSchema column, int columnIndex)
compileAlterColumnRenameback to summary
private Statement compileAlterColumnRename(Table table, ColumnSchema column)

Responsible for handling tail of ALTER COLUMN ... RENAME ...

compileAlterColumnSequenceOptionsback to summary
pack-priv StatementSchema compileAlterColumnSequenceOptions(Table table, ColumnSchema column, int columnIndex)
compileAlterColumnSetNullabilityback to summary
private Statement compileAlterColumnSetNullability(Table table, ColumnSchema column, boolean nullable)
compileAlterDomainback to summary
pack-priv Statement compileAlterDomain()
compileAlterFKIndexback to summary
pack-priv Statement compileAlterFKIndex(Constraint constraint)
compileAlterIndexback to summary
pack-priv Statement compileAlterIndex()
compileAlterRoutineback to summary
pack-priv Statement compileAlterRoutine()
compileAlterSequenceback to summary
pack-priv Statement compileAlterSequence()
compileAlterSessionback to summary
pack-priv Statement compileAlterSession()
compileAlterSpecificRoutineback to summary
pack-priv Statement compileAlterSpecificRoutine()
compileAlterTableback to summary
pack-priv Statement compileAlterTable()
compileAlterTableAddCheckConstraintback to summary
pack-priv Statement compileAlterTableAddCheckConstraint(Table table, HsqlNameManager.HsqlName name, Boolean ifNotExists)
compileAlterTableAddColumnback to summary
pack-priv Statement compileAlterTableAddColumn(Table table)
compileAlterTableAddForeignKeyConstraintback to summary
pack-priv Statement compileAlterTableAddForeignKeyConstraint(Table table, HsqlNameManager.HsqlName name, Boolean ifNotExists)
compileAlterTableAddIndexback to summary
pack-priv StatementSchema compileAlterTableAddIndex(Table table)
compileAlterTableAddPrimaryKeyback to summary
pack-priv Statement compileAlterTableAddPrimaryKey(Table table, HsqlNameManager.HsqlName name, Boolean ifNotExists)
compileAlterTableAddUniqueConstraintback to summary
pack-priv Statement compileAlterTableAddUniqueConstraint(Table table, HsqlNameManager.HsqlName name, Boolean ifNotExists)
compileAlterTableDropColumnback to summary
pack-priv Statement compileAlterTableDropColumn(Table table)
compileAlterTableDropConstraintback to summary
private Statement compileAlterTableDropConstraint(Table table)
compileAlterTableDropPrimaryKeyback to summary
private Statement compileAlterTableDropPrimaryKey(Table table)
compileAlterUserback to summary
pack-priv Statement compileAlterUser()
compileAlterViewback to summary
private Statement compileAlterView()
compileCommentback to summary
pack-priv StatementSchema compileComment()
compileCreateback to summary
pack-priv StatementSchema compileCreate()
compileCreateAliasback to summary
pack-priv StatementSchema compileCreateAlias()
compileCreateCharacterSetback to summary
pack-priv StatementSchema compileCreateCharacterSet()
compileCreateCollationback to summary
pack-priv StatementSchema compileCreateCollation()
compileCreateDomainback to summary
pack-priv StatementSchema compileCreateDomain()
compileCreateIndexback to summary
pack-priv StatementSchema compileCreateIndex(boolean unique)
compileCreateRoleback to summary
pack-priv StatementSchema compileCreateRole()
compileCreateSchemaback to summary
pack-priv StatementSchema compileCreateSchema()
compileCreateSequenceback to summary
pack-priv StatementSchema compileCreateSequence()
compileCreateSynonymback to summary
pack-priv StatementSchema compileCreateSynonym(boolean isOrReplace)
compileCreateTypeback to summary
pack-priv StatementSchema compileCreateType(boolean orReplace)
compileCreateUserback to summary
pack-priv StatementSchema compileCreateUser()
compileCreateViewback to summary
pack-priv StatementSchema compileCreateView(boolean alter, boolean orReplace)
compileDeclareLocalTableOrNullback to summary
pack-priv StatementSession compileDeclareLocalTableOrNull()
compileDropback to summary
pack-priv Statement compileDrop()
compileGrantOrRevokeback to summary
pack-priv StatementSchema compileGrantOrRevoke()
compileModifyColumnback to summary
pack-priv Statement compileModifyColumn(Table table, ColumnSchema column, int columnIndex)
compileRenameObjectback to summary
pack-priv Statement compileRenameObject(HsqlNameManager.HsqlName name, int type, boolean ifExists)
compileRenameSchemaback to summary
pack-priv Statement compileRenameSchema(HsqlNameManager.HsqlName name, int type)
compileRightGrantOrRevokeback to summary
private StatementSchema compileRightGrantOrRevoke(boolean grant)
compileRoleGrantOrRevokeback to summary
private StatementSchema compileRoleGrantOrRevoke(boolean grant)
getCompiledStatementBodyback to summary
pack-priv void getCompiledStatementBody(List<StatementSchema> list)
isGrantTokenback to summary
private boolean isGrantToken()
processTrueOrFalseback to summary
pack-priv boolean processTrueOrFalse()

Retrieves boolean value corresponding to the next token.

Returns:boolean

true if next token is "TRUE"; false if next token is "FALSE"

Exceptions
HsqlException:
if the next token is neither "TRUE" nor "FALSE"
processTrueOrFalseObjectback to summary
pack-priv Boolean processTrueOrFalseObject()
readNewUserIdentifierback to summary
pack-priv HsqlNameManager.HsqlName readNewUserIdentifier()
readPasswordback to summary
pack-priv String readPassword()
readSequenceback to summary
pack-priv NumberSequence readSequence(Table table, ColumnSchema column, boolean withType)
resetback to summary
pack-priv void reset(Session session, String sql)

Overrides org.hsqldb.ParserDQL.reset.

Doc from org.hsqldb.ParserDQL.reset.

Resets this parse context with the given SQL character sequence.