public class AlterTableQuery extends Query<AlterTableQuery>
ALTER TABLE
statement.Modifier and Type | Class and Description |
---|---|
static class |
AlterTableQuery.AddColumnAction
"Action" for adding a column to a table.,
e.g.
|
static class |
AlterTableQuery.AddConstraintAction
Base "Action" for adding a constraint to a table.,
e.g.
|
static class |
AlterTableQuery.AddForeignConstraintAction
Deprecated.
use AddConstraintAction instead
|
static class |
AlterTableQuery.AddPrimaryConstraintAction
Deprecated.
use AddConstraintAction instead
|
static class |
AlterTableQuery.AddUniqueConstraintAction
Deprecated.
use AddConstraintAction instead
|
ALL_SYMBOL, NULL_VALUE, QUESTION_MARK
Constructor and Description |
---|
AlterTableQuery(Object tableStr)
|
AlterTableQuery(Table table) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendTo(AppendableExt app,
SqlContext newContext)
Appends the sql query to the given AppendableExt within the given,
modifiable SqlContext.
|
protected void |
collectSchemaObjects(ValidationContext vContext)
Used during Query.validate() calls to collect the dbschema objects
referenced in a query.
|
AlterTableQuery |
setAction(Object action)
Sets the alter table action.
|
AlterTableQuery |
setAddColumn(Column column)
Sets the alter table action to add the given column.
|
AlterTableQuery |
setAddConstraint(Constraint constraint)
Sets the alter table action to add the given constraint.
|
AlterTableQuery |
setAddCustomColumn(Object column)
Sets the alter table action to add the given column.
|
AlterTableQuery |
setAddCustomConstraint(Object constraint)
Sets the alter table action to add the given constraint.
|
appendTo, getThisType, prependTo, validate, validate, validateTables
addCustomization, customAppendTo, customAppendTo, maybeAppendTo, maybeAppendTo
collectSchemaObjects, doValidate, toString
toString, toString
public AlterTableQuery(Table table)
public AlterTableQuery(Object tableStr)
public AlterTableQuery setAction(Object action)
Object
-> SqlObject
conversions handled by
Converter.toCustomSqlObject(Object)
.public AlterTableQuery setAddConstraint(Constraint constraint)
public AlterTableQuery setAddCustomConstraint(Object constraint)
Object
-> SqlObject
conversions handled by
Converter.toCustomConstraintClause(java.lang.Object)
.
public AlterTableQuery setAddColumn(Column column)
public AlterTableQuery setAddCustomColumn(Object column)
Object
-> SqlObject
conversions handled by
Converter.toCustomTypedColumnSqlObject(java.lang.Object)
.
protected void collectSchemaObjects(ValidationContext vContext)
SqlObject
collectSchemaObjects
in class Query<AlterTableQuery>
vContext
- handle to the current validation contextprotected void appendTo(AppendableExt app, SqlContext newContext) throws IOException
Query
Query.appendTo(AppendableExt)
method within the context of calls to
SqlContext.pushContext(com.healthmarketscience.common.util.AppendableExt)
and SqlContext.popContext(com.healthmarketscience.common.util.AppendableExt, com.healthmarketscience.sqlbuilder.SqlContext)
, so
the implementation is free to modify the given SqlContext.appendTo
in class Query<AlterTableQuery>
app
- the target for the sql query generationnewContext
- modifiable SqlContext for nested AppendeesIOException
Copyright © 2006–2021 OpenHMS. All rights reserved.