Inherits

Classes

Methods

keyspace

Returns keyspace where this type is defined

Returns:
Type Details
String keyspace where this type is defined

name

Returns name of this type

Returns:
Type Details
String name of this type

has_field?

(name)

Returns whether this type has a given field

Parameters:
Name Type Details
name String field name
Returns:
Type Details
Boolean whether this type has a given field

each_field

(&block) aliased as: fields

Yield or enumerate each field defined in this type

Overloads:
each_field {|field| … }

Returns self

Yield Parameters:
Name Type Details
field Cassandra::UserDefined::Field field
Returns:
Type Details
Types::UserDefined self
each_field

Returns a list of fields

Returns:
Type Details
Array<Array<String, Type>> a list of fields

field

(name)

Returns a field with this name or nil

Parameters:
Name Type Details
name String field name
Returns:
Type Details
(Cassandra::UserDefined::Field or nil) a field with this name or nil

new

(*value)

Coerces the value to Cassandra::UDT

Parameters:
Name Type Details
value Object original value
Returns:
Type Details
UDT value
See Also:

assert

(value, message = nil, &block)

Asserts that a given value is an Cassandra::UDT

Void
Return value of this method is ignored.
Parameters:
Name Type Details
value Object value to be validated
message String (defaults to: nil) error message to use when assertion fails
Yield Returns:
Type Details
String error message to use when assertion fails
Raises:
Type Details
ArgumentError if the value is not an Cassandra::UDT
See Also:

to_s

Returns "keyspace.name"

Returns:
Type Details
String "keyspace.name"
See Also:

hash

eql?

(other) aliased as: ==
Returns:
Type Details
Boolean

to_cql

Output this type in CQL