Class AlterTableAlterColumn


  • public class AlterTableAlterColumn
    extends CommandWithColumns
    This class represents the statements ALTER TABLE ADD, ALTER TABLE ADD IF NOT EXISTS, ALTER TABLE ALTER COLUMN, ALTER TABLE ALTER COLUMN SELECTIVITY, ALTER TABLE ALTER COLUMN SET DEFAULT, ALTER TABLE ALTER COLUMN DROP DEFAULT, ALTER TABLE ALTER COLUMN DROP EXPRESSION, ALTER TABLE ALTER COLUMN SET NULL, ALTER TABLE ALTER COLUMN DROP NULL, ALTER TABLE ALTER COLUMN SET VISIBLE, ALTER TABLE ALTER COLUMN SET INVISIBLE, ALTER TABLE DROP COLUMN
    • Constructor Detail

      • AlterTableAlterColumn

        public AlterTableAlterColumn​(SessionLocal session,
                                     Schema schema)
    • Method Detail

      • setIfTableExists

        public void setIfTableExists​(boolean b)
      • setTableName

        public void setTableName​(java.lang.String tableName)
      • setOldColumn

        public void setOldColumn​(Column oldColumn)
      • setAddFirst

        public void setAddFirst()
        Add the column as the first column of the table.
      • setAddBefore

        public void setAddBefore​(java.lang.String before)
      • setAddAfter

        public void setAddAfter​(java.lang.String after)
      • update

        public long update()
        Description copied from class: Prepared
        Execute the statement.
        Overrides:
        update in class Prepared
        Returns:
        the update count
      • setType

        public void setType​(int type)
      • setSelectivity

        public void setSelectivity​(Expression selectivity)
      • setDefaultExpression

        public void setDefaultExpression​(Expression defaultExpression)
        Set default or on update expression.
        Parameters:
        defaultExpression - default or on update expression
      • setUsingExpression

        public void setUsingExpression​(Expression usingExpression)
        Set using expression.
        Parameters:
        usingExpression - using expression
      • setNewColumn

        public void setNewColumn​(Column newColumn)
      • getType

        public int getType()
        Description copied from class: Prepared
        Get the command type as defined in CommandInterface
        Specified by:
        getType in class Prepared
        Returns:
        the statement type
      • setIfNotExists

        public void setIfNotExists​(boolean ifNotExists)
      • setColumnsToRemove

        public void setColumnsToRemove​(java.util.ArrayList<Column> columnsToRemove)
      • setBooleanFlag

        public void setBooleanFlag​(boolean booleanFlag)