Class Create

    • Method Detail

      • addPartitionKey

        public Create addPartitionKey​(String columnName,
                                      DataType dataType)
        Add a partition key column definition to this CREATE TABLE statement.

        This includes the column declaration (you don't need an additional addColumn call).

        Partition key columns are added in the order of their declaration.

        Parameters:
        columnName - the name of the partition key column to be added.
        dataType - the data type of the partition key column to be added.
        Returns:
        this CREATE statement.
      • addUDTPartitionKey

        public Create addUDTPartitionKey​(String columnName,
                                         UDTType udtType)
        Add a partition key column definition to this CREATE TABLE statement, when its type contains a UDT.

        This includes the column declaration (you don't need an additional addColumn call).

        Partition key columns are added in the order of their declaration.

        Parameters:
        columnName - the name of the partition key column to be added.
        udtType - the UDT type of the partition key column to be added. Use SchemaBuilder.frozen(String) or SchemaBuilder.udtLiteral(String).
        Returns:
        this CREATE statement.
      • addClusteringColumn

        public Create addClusteringColumn​(String columnName,
                                          DataType dataType)
        Add a clustering column definition to this CREATE TABLE statement.

        This includes the column declaration (you don't need an additional addColumn call).

        Clustering columns are added in the order of their declaration.

        Parameters:
        columnName - the name of the clustering column to be added.
        dataType - the data type of the clustering column to be added.
        Returns:
        this CREATE statement.
      • addUDTClusteringColumn

        public Create addUDTClusteringColumn​(String columnName,
                                             UDTType udtType)
        Add a clustering column definition to this CREATE TABLE statement, when its type contains a UDT.

        This includes the column declaration (you don't need an additional addColumn call).

        Clustering columns are added in the order of their declaration.

        Parameters:
        columnName - the name of the clustering column to be added.
        udtType - the UDT type of the clustering column to be added. Use SchemaBuilder.frozen(String) or SchemaBuilder.udtLiteral(String).
        Returns:
        this CREATE statement.
      • addStaticColumn

        public Create addStaticColumn​(String columnName,
                                      DataType dataType)
        Add a static column definition to this CREATE TABLE statement.
        Parameters:
        columnName - the name of the column to be added.
        dataType - the data type of the column to be added.
        Returns:
        this CREATE statement.
      • addUDTStaticColumn

        public Create addUDTStaticColumn​(String columnName,
                                         UDTType udtType)
        Add a static column definition to this CREATE TABLE statement, when its type contains a UDT.
        Parameters:
        columnName - the name of the column to be added.
        udtType - the UDT type of the column to be added. Use SchemaBuilder.frozen(String) or SchemaBuilder.udtLiteral(String).
        Returns:
        this CREATE statement.
      • withOptions

        public Create.Options withOptions()
        Add options for this CREATE TABLE statement.
        Returns:
        the options of this CREATE TABLE statement.
      • buildInternal

        public String buildInternal()