public class AlterTable extends Object
| Constructor and Description |
|---|
AlterTable() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addColumn(GeoPackageCoreConnection db,
String tableName,
String columnName,
String columnDef)
Add a column
|
static String |
addColumnSQL(String tableName,
String columnName,
String columnDef)
Create the add column SQL
|
static <T extends UserColumn> |
alterColumn(GeoPackageCoreConnection db,
String tableName,
UserCustomColumn column)
Alter a column
|
static <T extends UserColumn> |
alterColumn(GeoPackageCoreConnection db,
UserTable<T> table,
T column)
Alter a column
|
static <T extends UserColumn> |
alterColumns(GeoPackageCoreConnection db,
String tableName,
Collection<UserCustomColumn> columns)
Alter columns
|
static <T extends UserColumn> |
alterColumns(GeoPackageCoreConnection db,
UserTable<T> table,
Collection<T> columns)
Alter columns
|
static void |
alterTable(GeoPackageCoreConnection db,
String sql,
TableMapping tableMapping)
Alter a table with a new table SQL creation statement and table mapping.
|
static void |
alterTable(GeoPackageCoreConnection db,
UserTable<? extends UserColumn> newTable)
Alter a table with a new table schema assuming a default table mapping.
|
static void |
alterTable(GeoPackageCoreConnection db,
UserTable<? extends UserColumn> newTable,
TableMapping tableMapping)
Alter a table with a new table schema and table mapping.
|
static String |
alterTable(String table)
Create the ALTER TABLE SQL command prefix
|
static void |
copyTable(GeoPackageCoreConnection db,
String tableName,
String newTableName)
Copy the table and row content
|
static void |
copyTable(GeoPackageCoreConnection db,
String tableName,
String newTableName,
boolean transferContent)
Copy the table
|
static void |
copyTable(GeoPackageCoreConnection db,
UserTable<? extends UserColumn> table,
String newTableName)
Copy the table and row content
|
static void |
copyTable(GeoPackageCoreConnection db,
UserTable<? extends UserColumn> table,
String newTableName,
boolean transferContent)
Copy the table
|
static void |
dropColumn(GeoPackageCoreConnection db,
String tableName,
String columnName)
Drop a column
|
static void |
dropColumn(GeoPackageCoreConnection db,
UserTable<? extends UserColumn> table,
String columnName)
Drop a column
|
static void |
dropColumns(GeoPackageCoreConnection db,
String tableName,
Collection<String> columnNames)
Drop columns
|
static void |
dropColumns(GeoPackageCoreConnection db,
UserTable<? extends UserColumn> table,
Collection<String> columnNames)
Drop columns
|
static void |
renameColumn(GeoPackageCoreConnection db,
String tableName,
String columnName,
String newColumnName)
Rename a column
|
static String |
renameColumnSQL(String tableName,
String columnName,
String newColumnName)
Create the rename column SQL
|
static void |
renameTable(GeoPackageCoreConnection db,
String tableName,
String newTableName)
Rename a table
|
static String |
renameTableSQL(String tableName,
String newTableName)
Create the rename table SQL
|
public static String alterTable(String table)
table - table namepublic static void renameTable(GeoPackageCoreConnection db, String tableName, String newTableName)
db - connectiontableName - table namenewTableName - new table namepublic static String renameTableSQL(String tableName, String newTableName)
tableName - table namenewTableName - new table namepublic static void renameColumn(GeoPackageCoreConnection db, String tableName, String columnName, String newColumnName)
db - connectiontableName - table namecolumnName - column namenewColumnName - new column namepublic static String renameColumnSQL(String tableName, String columnName, String newColumnName)
tableName - table namecolumnName - column namenewColumnName - new column namepublic static void addColumn(GeoPackageCoreConnection db, String tableName, String columnName, String columnDef)
db - connectiontableName - table namecolumnName - column namecolumnDef - column definitionpublic static String addColumnSQL(String tableName, String columnName, String columnDef)
tableName - table namecolumnName - column namecolumnDef - column definitionpublic static void dropColumn(GeoPackageCoreConnection db, UserTable<? extends UserColumn> table, String columnName)
db - connectiontable - tablecolumnName - column namepublic static void dropColumns(GeoPackageCoreConnection db, UserTable<? extends UserColumn> table, Collection<String> columnNames)
db - connectiontable - tablecolumnNames - column namespublic static void dropColumn(GeoPackageCoreConnection db, String tableName, String columnName)
db - connectiontableName - table namecolumnName - column namepublic static void dropColumns(GeoPackageCoreConnection db, String tableName, Collection<String> columnNames)
db - connectiontableName - table namecolumnNames - column namespublic static <T extends UserColumn> void alterColumn(GeoPackageCoreConnection db, UserTable<T> table, T column)
T - user column typedb - connectiontable - tablecolumn - columnpublic static <T extends UserColumn> void alterColumns(GeoPackageCoreConnection db, UserTable<T> table, Collection<T> columns)
T - user column typedb - connectiontable - tablecolumns - columnspublic static <T extends UserColumn> void alterColumn(GeoPackageCoreConnection db, String tableName, UserCustomColumn column)
T - user column typedb - connectiontableName - table namecolumn - columnpublic static <T extends UserColumn> void alterColumns(GeoPackageCoreConnection db, String tableName, Collection<UserCustomColumn> columns)
T - user column typedb - connectiontableName - table namecolumns - columnspublic static void copyTable(GeoPackageCoreConnection db, UserTable<? extends UserColumn> table, String newTableName)
db - connectiontable - tablenewTableName - new table namepublic static void copyTable(GeoPackageCoreConnection db, UserTable<? extends UserColumn> table, String newTableName, boolean transferContent)
db - connectiontable - tablenewTableName - new table nametransferContent - transfer row content to the new tablepublic static void copyTable(GeoPackageCoreConnection db, String tableName, String newTableName)
db - connectiontableName - table namenewTableName - new table namepublic static void copyTable(GeoPackageCoreConnection db, String tableName, String newTableName, boolean transferContent)
db - connectiontableName - table namenewTableName - new table nametransferContent - transfer row content to the new tablepublic static void alterTable(GeoPackageCoreConnection db, UserTable<? extends UserColumn> newTable)
db - connectionnewTable - new table schemapublic static void alterTable(GeoPackageCoreConnection db, UserTable<? extends UserColumn> newTable, TableMapping tableMapping)
db - connectionnewTable - new table schematableMapping - table mappingpublic static void alterTable(GeoPackageCoreConnection db, String sql, TableMapping tableMapping)
db - connectionsql - new table SQLtableMapping - table mappingCopyright © 2019 National Geospatial-Intelligence Agency. All rights reserved.