Extends

Mixed into

Classes

Methods

varchar

Returns varchar type

Returns:
Type Details
Types::Varchar varchar type

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

list

(value_type)

Returns map type

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

map

(key_type, value_type)

Returns varchar 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::Varchar varchar type

set

(value_type)

Returns set type

Parameters:
Name Type Details
value_type Type the type of elements 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