Class: AWSCDK::Cassandra::CfnTable::ColumnProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cassandra/cfn_table.rb

Overview

The name and data type of an individual column in a table.

In addition to the data type, you can also use the following two keywords:

  • STATIC if the table has a clustering column. Static columns store values that are shared by all rows in the same partition.
  • FROZEN for collection data types. In frozen collections the values of the collection are serialized into a single immutable value, and Amazon Keyspaces treats them like a BLOB .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(column_name:, column_type:) ⇒ ColumnProperty

Returns a new instance of ColumnProperty.

Parameters:

  • column_name (String)

    The name of the column.

  • column_type (String)

    The data type of the column.



987
988
989
990
991
992
# File 'cassandra/cfn_table.rb', line 987

def initialize(column_name:, column_type:)
  @column_name = column_name
  Jsii::Type.check_type(@column_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "columnName")
  @column_type = column_type
  Jsii::Type.check_type(@column_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "columnType")
end

Instance Attribute Details

#column_nameString (readonly)

The name of the column.

For more information, see Identifiers in the Amazon Keyspaces Developer Guide .



1000
1001
1002
# File 'cassandra/cfn_table.rb', line 1000

def column_name
  @column_name
end

#column_typeString (readonly)

The data type of the column.

For more information, see Data types in the Amazon Keyspaces Developer Guide .



1007
1008
1009
# File 'cassandra/cfn_table.rb', line 1007

def column_type
  @column_type
end

Class Method Details

.jsii_propertiesObject



1009
1010
1011
1012
1013
1014
# File 'cassandra/cfn_table.rb', line 1009

def self.jsii_properties
  {
    :column_name => "columnName",
    :column_type => "columnType",
  }
end

Instance Method Details

#to_jsiiObject



1016
1017
1018
1019
1020
1021
1022
1023
# File 'cassandra/cfn_table.rb', line 1016

def to_jsii
  result = {}
  result.merge!({
    "columnName" => @column_name,
    "columnType" => @column_type,
  })
  result.compact
end