|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.command.Prepared
org.h2.command.ddl.DefineCommand
org.h2.command.ddl.SchemaCommand
org.h2.command.ddl.AlterTableAlterColumn
public class AlterTableAlterColumn
This class represents the statements ALTER TABLE ADD, ALTER TABLE ALTER COLUMN, ALTER TABLE ALTER COLUMN RESTART, ALTER TABLE ALTER COLUMN SELECTIVITY, ALTER TABLE ALTER COLUMN SET DEFAULT, ALTER TABLE ALTER COLUMN SET NOT NULL, ALTER TABLE ALTER COLUMN SET NULL, ALTER TABLE DROP COLUMN
Field Summary | |
---|---|
static int |
ADD
The type of a ALTER TABLE ADD statement. |
static int |
CHANGE_TYPE
The type of a ALTER TABLE ALTER COLUMN statement that changes the column data type. |
static int |
DEFAULT
The type of a ALTER TABLE ALTER COLUMN SET DEFAULT statement. |
static int |
DROP
The type of a ALTER TABLE DROP COLUMN statement. |
static int |
NOT_NULL
The type of a ALTER TABLE ALTER COLUMN SET NOT NULL statement. |
static int |
NULL
The type of a ALTER TABLE ALTER COLUMN SET NULL statement. |
static int |
SELECTIVITY
The type of a ALTER TABLE ALTER COLUMN SELECTIVITY statement. |
Fields inherited from class org.h2.command.Prepared |
---|
headPos, parameters, prepareAlways, session, sqlStatement |
Constructor Summary | |
---|---|
AlterTableAlterColumn(Session session,
Schema schema)
|
Method Summary | |
---|---|
void |
setAddBefore(java.lang.String before)
|
void |
setDefaultExpression(Expression defaultExpression)
|
void |
setNewColumn(Column newColumn)
|
void |
setOldColumn(Column oldColumn)
|
void |
setSelectivity(Expression selectivity)
|
void |
setTable(Table table)
|
void |
setType(int type)
|
int |
update()
Execute the statement. |
Methods inherited from class org.h2.command.ddl.SchemaCommand |
---|
getSchema |
Methods inherited from class org.h2.command.ddl.DefineCommand |
---|
isReadOnly, isTransactional, queryMeta |
Methods inherited from class org.h2.command.Prepared |
---|
checkCanceled, checkParameters, getCurrentObjectId, getCurrentRowNumber, getObjectId, getParameters, getPlanSQL, getSQL, getSQL, getSQL, isQuery, needRecompile, prepare, query, setCommand, setCurrentRowNumber, setHeadPos, setObjectId, setParameterList, setPrepareAlways, setRow, setSession, setSQL, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NOT_NULL
public static final int NULL
public static final int DEFAULT
public static final int CHANGE_TYPE
public static final int ADD
public static final int DROP
public static final int SELECTIVITY
Constructor Detail |
---|
public AlterTableAlterColumn(Session session, Schema schema)
Method Detail |
---|
public void setTable(Table table)
public void setOldColumn(Column oldColumn)
public void setAddBefore(java.lang.String before)
public int update() throws java.sql.SQLException
Prepared
update
in class Prepared
java.sql.SQLException
- if it is a querypublic void setType(int type)
public void setSelectivity(Expression selectivity)
public void setDefaultExpression(Expression defaultExpression)
public void setNewColumn(Column newColumn)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |