Class TableUpdateRequest.AddTableColumnRequest
java.lang.Object
org.apache.gravitino.dto.requests.TableUpdateRequest.AddTableColumnRequest
- All Implemented Interfaces:
TableUpdateRequest,RESTMessage,RESTRequest
- Enclosing interface:
- TableUpdateRequest
public static class TableUpdateRequest.AddTableColumnRequest
extends Object
implements TableUpdateRequest
Represents a request to add a column to a table.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.gravitino.dto.requests.TableUpdateRequest
TableUpdateRequest.AddTableColumnRequest, TableUpdateRequest.AddTableIndexRequest, TableUpdateRequest.DeleteTableColumnRequest, TableUpdateRequest.DeleteTableIndexRequest, TableUpdateRequest.RemoveTablePropertyRequest, TableUpdateRequest.RenameTableColumnRequest, TableUpdateRequest.RenameTableRequest, TableUpdateRequest.SetTablePropertyRequest, TableUpdateRequest.UpdateColumnAutoIncrementRequest, TableUpdateRequest.UpdateTableColumnCommentRequest, TableUpdateRequest.UpdateTableColumnDefaultValueRequest, TableUpdateRequest.UpdateTableColumnNullabilityRequest, TableUpdateRequest.UpdateTableColumnPositionRequest, TableUpdateRequest.UpdateTableColumnTypeRequest, TableUpdateRequest.UpdateTableCommentRequest -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for Jackson deserialization.AddTableColumnRequest(String[] fieldName, Type dataType, String comment) Constructor for AddTableColumnRequest with default position and nullable value(true).AddTableColumnRequest(String[] fieldName, Type dataType, String comment, TableChange.ColumnPosition position) Constructor for AddTableColumnRequest with default nullable value(true).AddTableColumnRequest(String[] fieldName, Type dataType, String comment, TableChange.ColumnPosition position, boolean nullable, boolean autoIncrement, Expression defaultValue) Constructor for AddTableColumnRequest. -
Method Summary
Modifier and TypeMethodDescriptionThe table change that is requested.voidvalidate()Validates the request.
-
Constructor Details
-
AddTableColumnRequest
public AddTableColumnRequest()Default constructor for Jackson deserialization. -
AddTableColumnRequest
public AddTableColumnRequest(String[] fieldName, Type dataType, String comment, TableChange.ColumnPosition position, boolean nullable, boolean autoIncrement, Expression defaultValue) Constructor for AddTableColumnRequest.- Parameters:
fieldName- the field name to adddataType- the data type of the field to addcomment- the comment of the field to addposition- the position of the field to add, null for default positionnullable- whether the field to add is nullableautoIncrement- whether the field to add is auto incrementdefaultValue- whether the field has default value
-
AddTableColumnRequest
public AddTableColumnRequest(String[] fieldName, Type dataType, String comment, TableChange.ColumnPosition position) Constructor for AddTableColumnRequest with default nullable value(true).- Parameters:
fieldName- the field name to adddataType- the data type of the field to addcomment- the comment of the field to addposition- the position of the field to add
-
AddTableColumnRequest
Constructor for AddTableColumnRequest with default position and nullable value(true).- Parameters:
fieldName- the field name to adddataType- the data type of the field to addcomment- the comment of the field to add
-
-
Method Details
-
validate
Validates the request.- Specified by:
validatein interfaceRESTMessage- Throws:
IllegalArgumentException- If the request is invalid, this exception is thrown.
-
tableChange
Description copied from interface:TableUpdateRequestThe table change that is requested.- Specified by:
tableChangein interfaceTableUpdateRequest- Returns:
- An instance of TableChange.
-