Class ColumnDefinitionMap

java.lang.Object
com.datastax.astra.client.tables.definition.columns.ColumnDefinition
com.datastax.astra.client.tables.definition.columns.ColumnDefinitionMap

public class ColumnDefinitionMap extends ColumnDefinition
Represents a column definition for a map type in a database schema. Extends ColumnDefinition 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

    • ColumnDefinitionMap

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

      public ColumnDefinitionMap(ColumnTypes keyType, ColumnTypes 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