Represents a cassandra keyspace

See Also:

Inherits

Object

Methods

name

Returns this keyspace name

Returns:
Type Details
String this keyspace name

durable_writes?

Returns whether durables writes are enabled for this keyspace

Returns:
Type Details
Boolean whether durables writes are enabled for this keyspace

has_table?

(name)

Returns whether this keyspace has a table with the given name

Parameters:
Name Type Details
name String table name
Returns:
Type Details
Boolean whether this keyspace has a table with the given name

table

(name)

Returns a table or nil

Parameters:
Name Type Details
name String table name
Returns:
Type Details
(Table or nil) a table or nil

each_table

(&block) aliased as: tables

Yield or enumerate each table defined in this keyspace

Overloads:
each_table {|table| … }

Returns self

Yield Parameters:
Name Type Details
table Table current table
Returns:
Type Details
Keyspace self
each_table

Returns a list of tables

Returns:
Type Details
Array<Table> a list of tables

has_type?

(name)

Returns whether this keyspace has a user-defined type with the given name

Parameters:
Name Type Details
name String user-defined type name
Returns:
Type Details
Boolean whether this keyspace has a user-defined type with the given name

type

(name)

Returns a type or nil

Parameters:
Name Type Details
name String user-defined type name
Returns:
Type Details
(Types::UserDefined or nil) a type or nil

each_type

(&block) aliased as: types

Yield or enumerate each user-defined type present in this keyspace

Overloads:
each_type {|type| … }

Returns self

Yield Parameters:
Name Type Details
type Types::UserDefined current type
Returns:
Type Details
Keyspace self
each_type

Returns a list of user-defined types

Returns:
Type Details
Array<Types::UserDefined> a list of user-defined types

to_cql

Returns a cql representation of this table

Returns:
Type Details
String a cql representation of this table

eql?

(other) aliased as: ==

Returns whether this keyspace is equal to the other

Returns:
Type Details
Boolean whether this keyspace is equal to the other

inspect

Returns a CLI-friendly keyspace representation

Returns:
Type Details
String a CLI-friendly keyspace representation