public class Alter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Alter.AddColumn
An ADD column clause.
|
static class |
Alter.AlterColumn
An ALTER column clause.
|
static class |
Alter.Options
The table options of an ALTER TABLE statement.
|
static class |
Alter.RenameColumn
A RENAME column clause.
|
Modifier and Type | Method and Description |
---|---|
Alter.AddColumn |
addColumn(String columnName)
Add a new ADD column clause to this ALTER TABLE statement.
|
Alter.AddColumn |
addStaticColumn(String columnName)
Add a new ADD column clause to this ALTER TABLE statement, to add a static column.
|
Alter.AlterColumn |
alterColumn(String columnName)
Add an ALTER column clause (to change the column type) to this ALTER TABLE statement.
|
String |
buildInternal() |
SchemaStatement |
dropColumn(String columnName)
Add a new DROP column clause to this ALTER TABLE statement.
|
Alter.RenameColumn |
renameColumn(String columnName)
Add a new RENAME column clause to this ALTER TABLE statement.
|
Alter.Options |
withOptions()
Add options (WITH clause) to this ALTER TABLE statement.
|
public Alter.AlterColumn alterColumn(String columnName)
columnName
- the name of the column to be altered.Alter.AlterColumn
instance.public Alter.AddColumn addColumn(String columnName)
columnName
- the name of the column to be added.Alter.AddColumn
instance.public Alter.AddColumn addStaticColumn(String columnName)
columnName
- the name of the column to be added.Alter.AddColumn
instance.public SchemaStatement dropColumn(String columnName)
Note that you cannot drop a column that is part of the primary key.
columnName
- the name of the column to be dropped.public Alter.RenameColumn renameColumn(String columnName)
Note that you can only rename a column that is part of the primary key.
columnName
- the name of the column to be renamed.Alter.RenameColumn
instance.public Alter.Options withOptions()
Alter.Options
instance.public String buildInternal()
Copyright © 2012–2020. All rights reserved.