Class TableColumnDefinitionMap

java.lang.Object
com.datastax.astra.client.tables.definition.columns.TableColumnDefinition
com.datastax.astra.client.tables.definition.columns.TableColumnDefinitionMap

public class TableColumnDefinitionMap extends TableColumnDefinition
Represents a column definition for a map type in a database schema. Extends TableColumnDefinition to include specific details about the key and value types for map columns.

This class facilitates the configuration of map columns, allowing specification of the types of keys and values stored in the map.

Example usage:

 
 ColumnDefinitionMap mapColumn = new ColumnDefinitionMap(ColumnTypes.TEXT, ColumnTypes.INT);
 ColumnTypes keyType = mapColumn.getKeyType();
 ColumnTypes valueType = mapColumn.getValueType();
 
 
  • Constructor Details

    • TableColumnDefinitionMap

      public TableColumnDefinitionMap()
      Constructs a new ColumnDefinitionMap instance with the column type set to TableColumnTypes.MAP.
    • TableColumnDefinitionMap

      public TableColumnDefinitionMap(TableColumnTypes keyType, TableColumnTypes valueType)
      Constructs a new ColumnDefinitionMap instance with the specified key and value types.
      Parameters:
      keyType - the data type of the keys in the map
      valueType - the data type of the values in the map