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