Class AlterTable

java.lang.Object
rife.database.queries.AlterTable
All Implemented Interfaces:
Cloneable, Query

public class AlterTable extends Object implements Cloneable
Object representation of a SQL "ALTER TABLE" query.

This object may be used to dynamically construct a SQL statement in a database-independent fashion. After it is finished, it may be executed using DbQueryManager.executeUpdate().

Each AlterTable instance performs exactly one alteration, since that is the only form that all the databases support. When you need several alterations, you simply execute them as a series of AlterTable queries.

The alterColumnType alteration restates the complete column definition on the databases that require it, like MySQL and Oracle, so that the nullability and the default that you provide with it become part of the restated definition. Databases that alter the type in isolation only change the type, which means that you have to alter the nullability and the default there with the dedicated alterColumnNullable and alterColumnDefault alterations.

Since:
1.10