public interface TableElement
| Modifier and Type | Field and Description |
|---|---|
static String |
YOU_CANNOT_DROP_A_COLUMN_THAT_BELONGS_TO
Constant
YOU_CANNOT_DROP_A_COLUMN_THAT_BELONGS_TO. |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(Column<?> column)
Adds a column to the table.
|
Column<?> |
getColumn(String colName)
Returns a column by its name or throws an exception with a message that
the column is not found.
|
Map<String,Column<?>> |
getColumns()
Returns a map of columns with names.
|
Grain |
getGrain()
Returns grain that the table element belongs to.
|
String |
getName()
Returns table element name.
|
String |
getPkConstraintName()
Returns PK constraint name.
|
Map<String,Column<?>> |
getPrimaryKey()
Returns unmodified map of primary key columns.
|
String |
getQuotedName()
Returns name in ANSI quotes ("name").
|
String |
getQuotedNameIfNeeded()
Returns the name in ANSI quotes if needed.
|
boolean |
hasPrimeKey()
Whether the table has primary key.
|
void |
removeColumn(Column<?> column)
Removes a column from the table.
|
static final String YOU_CANNOT_DROP_A_COLUMN_THAT_BELONGS_TO
YOU_CANNOT_DROP_A_COLUMN_THAT_BELONGS_TO.Grain getGrain()
String getName()
String getQuotedName()
String getQuotedNameIfNeeded()
Column<?> getColumn(String colName) throws ParseException
colName - column nameParseException - if a column with the specified name is not found in the tablevoid addColumn(Column<?> column) throws ParseException
column - new columnParseException - if the column couldn't be addedvoid removeColumn(Column<?> column) throws ParseException
column - existing columnParseException - if the column couldn't be removedboolean hasPrimeKey()
String getPkConstraintName()
Copyright © 2023 CURS. All rights reserved.