Class ColumnDefinition
java.lang.Object
com.datastax.astra.client.tables.definition.columns.ColumnDefinition
- Direct Known Subclasses:
ColumnDefinitionList
,ColumnDefinitionMap
,ColumnDefinitionSet
,ColumnDefinitionVector
Represents a column definition in a database schema.
This class encapsulates the type of the column and its associated API support configurations, providing a structure for managing column-specific details.
The class uses Lombok annotations to automatically generate getter, setter, and no-argument constructor methods.
Fields:
type
- Specifies the type of the column, represented byColumnTypes
.apiSupport
- Provides API support details for the column, defined byColumnDefinitionApiSupport
.
Constructors:
- A no-argument constructor for creating a default instance of the class.
- A parameterized constructor for initializing the column definition with a specified type.
Example usage:
ColumnTypes columnType = ColumnTypes.STRING;
ColumnDefinition columnDefinition = new ColumnDefinition(columnType);
columnDefinition.setApiSupport(new ColumnDefinitionApiSupport());
columnDefinition.getApiSupport().setCreateTable(true);
columnDefinition.getApiSupport().setInsert(false);
System.out.println(columnDefinition);
-
Constructor Summary
ConstructorDescriptionDefault constructor.ColumnDefinition
(ColumnTypes type) Constructor with type. -
Method Summary