Class: QueryBuilder::CQL::Contexts::Keyspace
- Defined in:
- lib/query_builder/cql/contexts/keyspace.rb
Overview
Describes the Cassandra keyspace
Instance Method Summary collapse
-
#aggregate(name) ⇒ QueryBuilder::CQL::Contexts::Aggregate
Returns the aggregate context.
-
#alter ⇒ QueryBuilder::CQL::Statements::AlterKeyspace
Builds the ‘ALTER KEYSPACE’ CQL statement for the current keyspace.
-
#create ⇒ QueryBuilder::Statements::CreateKeyspace
Builds the ‘CREATE KEYSPACE’ CQL statement for the current keyspace.
-
#drop ⇒ QueryBuilder::CQL::Statements::DropKeyspace
Builds the ‘DROP KEYSPACE’ CQL statement for the current keyspace.
-
#function(name) ⇒ QueryBuilder::CQL::Contexts::Function
Returns the function context.
-
#permission(name = nil) ⇒ Object
Returns the context of Cassandra keyspace permission.
-
#table(name) ⇒ QueryBuilder::CQL::Contexts::Table
Returns the table context.
-
#to_s ⇒ String
Returns the name of the keyspace.
-
#type(name) ⇒ QueryBuilder::CQL::Contexts::Type
Returns the type context.
-
#use ⇒ QueryBuilder::Statements::Use
Builds the ‘USE’ CQL statement.
Instance Method Details
#aggregate(name) ⇒ QueryBuilder::CQL::Contexts::Aggregate
Returns the aggregate context
57 58 59 |
# File 'lib/query_builder/cql/contexts/keyspace.rb', line 57 def aggregate(name) Aggregate.new(keyspace: self, name: name) end |
#alter ⇒ QueryBuilder::CQL::Statements::AlterKeyspace
Builds the ‘ALTER KEYSPACE’ CQL statement for the current keyspace
83 84 85 |
# File 'lib/query_builder/cql/contexts/keyspace.rb', line 83 def alter Statements::AlterKeyspace.new(context: self) end |
#create ⇒ QueryBuilder::Statements::CreateKeyspace
Builds the ‘CREATE KEYSPACE’ CQL statement for the current keyspace
75 76 77 |
# File 'lib/query_builder/cql/contexts/keyspace.rb', line 75 def create Statements::CreateKeyspace.new(context: self) end |
#drop ⇒ QueryBuilder::CQL::Statements::DropKeyspace
Builds the ‘DROP KEYSPACE’ CQL statement for the current keyspace
91 92 93 |
# File 'lib/query_builder/cql/contexts/keyspace.rb', line 91 def drop Statements::DropKeyspace.new(context: self) end |
#function(name) ⇒ QueryBuilder::CQL::Contexts::Function
Returns the function context
47 48 49 |
# File 'lib/query_builder/cql/contexts/keyspace.rb', line 47 def function(name) Function.new(keyspace: self, name: name) end |
#permission(name = nil) ⇒ Object
Returns the context of Cassandra keyspace permission
67 68 69 |
# File 'lib/query_builder/cql/contexts/keyspace.rb', line 67 def (name = nil) Contexts::Permission.new(keyspace: self, name: name) end |
#table(name) ⇒ QueryBuilder::CQL::Contexts::Table
Returns the table context
27 28 29 |
# File 'lib/query_builder/cql/contexts/keyspace.rb', line 27 def table(name) Table.new(keyspace: self, name: name) end |
#to_s ⇒ String
Returns the name of the keyspace
17 18 19 |
# File 'lib/query_builder/cql/contexts/keyspace.rb', line 17 def to_s name.to_s end |
#type(name) ⇒ QueryBuilder::CQL::Contexts::Type
Returns the type context
37 38 39 |
# File 'lib/query_builder/cql/contexts/keyspace.rb', line 37 def type(name) Type.new(keyspace: self, name: name) end |
#use ⇒ QueryBuilder::Statements::Use
Builds the ‘USE’ CQL statement
99 100 101 |
# File 'lib/query_builder/cql/contexts/keyspace.rb', line 99 def use Statements::Use.new(context: self) end |