/** * Adds an {@literal ALTER} to the list of column changes. * * @param column must not be {@literal null}. * @param type must not be {@literal null}. * @return {@literal this} {@link AlterTableSpecification}. * @since 2.0 */ public AlterTableSpecification alter(CqlIdentifier column, DataType type) { return add(AlterColumnSpecification.alterColumn(column, type)); }
/** * Adds an {@code ADD} to the list of column changes. * * @param column must not be {@literal null} or empty. * @param type must not be {@literal null}. * @return {@literal this} {@link AlterTableSpecification}. */ public AlterTableSpecification add(String column, DataType type) { return add(CqlIdentifier.of(column), type); }
/** * Adds an {@code ADD} to the list of column changes. * * @param column must not be {@literal null}. * @param type must not be {@literal null}. * @return {@literal this} {@link AlterTableSpecification}. * @since 2.0 */ public AlterTableSpecification add(CqlIdentifier column, DataType type) { return add(AddColumnSpecification.addColumn(column, type)); }
/** * Adds a {@code RENAME} to the list of column changes. * * @param from must not be {@literal null}. * @param to must not be {@literal null}. * @return {@literal this} {@link AlterTableSpecification}. * @since 2.0 */ public AlterTableSpecification rename(CqlIdentifier from, CqlIdentifier to) { return add(new RenameColumnSpecification(from, to)); }
public AlterTableSpecification drop(CqlIdentifier column) { return add(DropColumnSpecification.dropColumn(column)); }