Class TableUserDefinedTypeDefinition
java.lang.Object
com.datastax.astra.client.tables.definition.types.TableUserDefinedTypeDefinition
Definition of a User-Defined Type (UDT) in Cassandra.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddField(String fieldName, TableUserDefinedTypeFieldDefinition fieldDefinition) Adds a column to the table definition.addField(String name, TableUserDefinedTypeFieldTypes type) Adds a column to the table with a specific type.addFieldAscii(String name) Adds an ascii column to the table.addFieldBigInt(String name) Adds a boolean column to the table.addFieldBlob(String name) Adds a blob column to the table.addFieldBoolean(String name) Adds a boolean column to the table.addFieldDate(String name) Adds an date column to the table.addFieldInt(String name) Adds an integer column to the table.addFieldText(String name) Adds a text column to the table.addFieldTimestamp(String name) Adds a timestamp column to the table.addFieldUuid(String name) Adds a UUID column to the table.toString()
-
Constructor Details
-
TableUserDefinedTypeDefinition
public TableUserDefinedTypeDefinition()Default constructor.
-
-
Method Details
-
addField
public TableUserDefinedTypeDefinition addField(String fieldName, TableUserDefinedTypeFieldDefinition fieldDefinition) Adds a column to the table definition.- Parameters:
fieldName- the name of the columnfieldDefinition- the definition of the field- Returns:
- the updated
TableUserDefinedTypeDefinitioninstance - Throws:
IllegalArgumentException- ifcolumnNameis null
-
addField
Adds a column to the table with a specific type.- Parameters:
name- the name of the columntype- the type of the column- Returns:
- the updated
TableUserDefinedTypeDefinitioninstance
-
addFieldUuid
Adds a UUID column to the table.- Parameters:
name- the name of the column- Returns:
- the updated
TableUserDefinedTypeDefinitioninstance
-
addFieldText
Adds a text column to the table.- Parameters:
name- the name of the column- Returns:
- the updated
TableUserDefinedTypeDefinitioninstance
-
addFieldAscii
Adds an ascii column to the table.- Parameters:
name- the name of the column- Returns:
- the updated
TableUserDefinedTypeDefinitioninstance
-
addFieldDate
Adds an date column to the table.- Parameters:
name- the name of the column- Returns:
- the updated
TableUserDefinedTypeDefinitioninstance
-
addFieldInt
Adds an integer column to the table.- Parameters:
name- the name of the column- Returns:
- the updated
TableUserDefinedTypeDefinitioninstance
-
addFieldTimestamp
Adds a timestamp column to the table.- Parameters:
name- the name of the column- Returns:
- the updated
TableUserDefinedTypeDefinitioninstance
-
addFieldBoolean
Adds a boolean column to the table.- Parameters:
name- the name of the column- Returns:
- the updated
TableUserDefinedTypeDefinitioninstance
-
addFieldBigInt
Adds a boolean column to the table.- Parameters:
name- the name of the column- Returns:
- the updated
TableUserDefinedTypeDefinitioninstance
-
addFieldBlob
Adds a blob column to the table.- Parameters:
name- the name of the column- Returns:
- the updated
TableUserDefinedTypeDefinitioninstance
-
toString
-