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_index?

(name)

Returns whether this keyspace has an index with the given name

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

index

(name)

Returns an index or nil

Parameters:
Name Type Details
name String index name
Returns:
Type Details
(Index or nil) an index or nil

each_index

(&block) aliased as: indexes

Yield or enumerate each index defined in this keyspace

Overloads:
each_index {|index| … }

Returns self

Yield Parameters:
Name Type Details
index Index current index
Returns:
Type Details
Keyspace self
each_index

Returns a list of indexes

Returns:
Type Details
Array<Index> a list of indexes

has_materialized_view?

(name)

Returns whether this keyspace has a materialized view with the given name

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

materialized_view

(name)

Returns a materialized view or nil

Parameters:
Name Type Details
name String materialized view name
Returns:
Type Details
(MaterializedView or nil) a materialized view or nil

each_materialized_view

(&block) aliased as: materialized_views

Yield or enumerate each materialized view defined in this keyspace

Overloads:
each_materialized_view {|view| … }

Returns self

Yield Parameters:
Name Type Details
view MaterializedView current materialized view
Returns:
Type Details
Keyspace self
each_materialized_view

Returns a list of materialized views

Returns:
Type Details
Array<MaterializedView> a list of materialized views

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

has_function?

(name, *args)

Returns whether this keyspace has a function with the given name and arguments

Parameters:
Name Type Details
name String function name
args Array<String> (var-args style) function argument types
Returns:
Type Details
Boolean whether this keyspace has a function with the given name and arguments

function

(name, *args)

Returns a function or nil

Parameters:
Name Type Details
name String function name
args Array<String> (var-args style) function argument types
Returns:
Type Details
(Function or nil) a function or nil

each_function

(&block) aliased as: functions

Yield or enumerate each function defined in this keyspace

Overloads:
each_function {|function| … }

Returns self

Yield Parameters:
Name Type Details
function Function current function
Returns:
Type Details
Keyspace self
each_function

Returns a list of functions

Returns:
Type Details
Array<Function> a list of functions

has_aggregate?

(name, *args)

Returns whether this keyspace has an aggregate with the given name and arguments

Parameters:
Name Type Details
name String aggregate name
args Array<String> (var-args style) aggregate function argument types
Returns:
Type Details
Boolean whether this keyspace has an aggregate with the given name and arguments

aggregate

(name, *args)

Returns an aggregate or nil

Parameters:
Name Type Details
name String aggregate name
args Array<String> (var-args style) aggregate function argument types
Returns:
Type Details
(Aggregate or nil) an aggregate or nil

each_aggregate

(&block) aliased as: aggregates

Yield or enumerate each aggregate defined in this keyspace

Overloads:
each_aggregate {|aggregate| … }

Returns self

Yield Parameters:
Name Type Details
aggregate Aggregate current aggregate
Returns:
Type Details
Keyspace self
each_aggregate

Returns a list of aggregates

Returns:
Type Details
Array<Aggregate> a list of aggregates

to_cql

Returns a cql representation of this keyspace

Returns:
Type Details
String a cql representation of this keyspace