@InterfaceAudience.Public @InterfaceStability.Unstable public class AlterTableBuilder extends Object
Constructor and Description |
---|
AlterTableBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(String name,
Type type,
Object defaultVal)
Add a new column that's not nullable
|
void |
addNullableColumn(String name,
Type type)
Add a new column that's nullable, thus has no default value
|
void |
dropColumn(String name)
Drop a column
|
void |
renameColumn(String oldName,
String newName)
Change the name of a column
|
void |
renameTable(String newName)
Change a table's name.
|
public void renameTable(String newName)
newName
- New table's name, must be used to check progresspublic void addColumn(String name, Type type, Object defaultVal)
name
- Name of the new columntype
- Type of the new columndefaultVal
- Default value used for the currently existing rowspublic void addNullableColumn(String name, Type type)
name
- Name of the new columntype
- Type of the new columnpublic void dropColumn(String name)
name
- Name of the columnCopyright © 2015. All rights reserved.