module QueryBuilder::CQL
The builder for CQL-specific statements
Public Class Methods
Builds the ‘BATCH’ CQL
statement
@return [QueryBuilder::Statements::Batch]
# File lib/query_builder/cql.rb, line 74 def self.batch Statements::Batch.new end
Returns the context of Cassandra keyspace
@param [#to_s] name The name of the keyspace
@param [QueryBuilder::CQL::Contexts::Keyspace]
# File lib/query_builder/cql.rb, line 20 def self.keyspace(name) Contexts::Keyspace.new(name: name) end
Returns the context of Cassandra root permission
@param [#to_s, nil] name The name of the permission
@param [QueryBuilder::CQL::Contexts::Permission]
# File lib/query_builder/cql.rb, line 50 def self.permission(name = nil) Contexts::Permission.new(name: name) end
Returns the context of Cassandra users role
@param [#to_s] name The name of the role
@param [QueryBuilder::CQL::Contexts::Role]
# File lib/query_builder/cql.rb, line 40 def self.role(name) Contexts::Role.new(name: name) end
Builds the ‘LIST ROLES’ CQL
statement
@return [QueryBuilder::Statements::ListRoles]
# File lib/query_builder/cql.rb, line 66 def self.roles Statements::ListRoles.new end
Returns the context of Cassandra user
@param [#to_s] name The name of the user
@param [QueryBuilder::CQL::Contexts::User]
# File lib/query_builder/cql.rb, line 30 def self.user(name) Contexts::User.new(name: name) end
Builds the ‘LIST USERS’ CQL
statement
@return [QueryBuilder::Statements::ListUsers]
# File lib/query_builder/cql.rb, line 58 def self.users Statements::ListUsers.new end