Extends

Mixed into

Classes

Methods

frozen

(value_type)

varchar

Returns text type since varchar is an alias for text

Returns:
Type Details
Types::Text text type since varchar is an alias for text

text

Returns text type

Returns:
Type Details
Types::Text text type

blob

Returns blob type

Returns:
Type Details
Types::Blob blob type

ascii

Returns ascii type

Returns:
Type Details
Types::Ascii ascii type

bigint

Returns bigint type

Returns:
Type Details
Types::Bigint bigint type

counter

Returns counter type

Returns:
Type Details
Types::Counter counter type

int

Returns int type

Returns:
Type Details
Types::Int int type

varint

Returns varint type

Returns:
Type Details
Types::Varint varint type

boolean

Returns boolean type

Returns:
Type Details
Types::Boolean boolean type

decimal

Returns decimal type

Returns:
Type Details
Types::Decimal decimal type

double

Returns double type

Returns:
Type Details
Types::Double double type

float

Returns float type

Returns:
Type Details
Types::Float float type

inet

Returns inet type

Returns:
Type Details
Types::Inet inet type

timestamp

Returns timestamp type

Returns:
Type Details
Types::Timestamp timestamp type

uuid

Returns uuid type

Returns:
Type Details
Types::Uuid uuid type

timeuuid

Returns timeuuid type

Returns:
Type Details
Types::Timeuuid timeuuid type

date

Returns date type

Returns:
Type Details
Types::Date date type

time

Returns time type

Returns:
Type Details
Types::Time time type

smallint

Returns smallint type

Returns:
Type Details
Types::Smallint smallint type

tinyint

Returns tinyint type

Returns:
Type Details
Types::Tinyint tinyint type

list

(value_type)

Returns list type

Parameters:
Name Type Details
value_type Type the type of elements in this list
Returns:
Type Details
Types::List list type

map

(key_type, value_type)

Returns map type

Parameters:
Name Type Details
key_type Type the type of keys in this map
value_type Type the type of values in this map
Returns:
Type Details
Types::Map map type

set

(value_type)

Returns set type

Parameters:
Name Type Details
value_type Type the type of values in this set
Returns:
Type Details
Types::Set set type

tuple

(*members)

Returns tuple type

Parameters:
Name Type Details
members *Type types of members of this tuple
Returns:
Type Details
Types::Tuple tuple type

udt

(keyspace, name, *fields)

Creates a User Defined Type instance

Examples:
Various ways of defining the same UDT
include Cassandra::Types

udt('simplex', 'address', {'street' => varchar,
                           'city' => varchar,
                           'state' => varchar,
                           'zip' => varchar}) #=> simplex.address

udt('simplex', 'address', [['street', varchar],
                           ['city', varchar],
                           ['state', varchar],
                           ['zip', varchar]]) #=> simplex.address

udt('simplex', 'address', ['street', varchar],
                          ['city', varchar],
                          ['state', varchar],
                          ['zip', varchar]) #=> simplex.address

udt('simplex', 'address', 'street', varchar,
                          'city', varchar,
                          'state', varchar,
                          'zip', varchar) #=> simplex.address
Parameters:
Name Type Details
keyspace String name of the keyspace that this UDT is defined in
name String name of this UDT
fields (Hash<String, Type>, Array<Array<String, Type>>, *(String, Type) or *Array<String, Type>) UDT field types
Returns:
Type Details
Types::UserDefined user defined type

custom

(name)

Returns custom type

Parameters:
Name Type Details
name String name of the custom type
Returns:
Type Details
Types::Custom custom type