Class: QueryBuilder::CQL::Contexts::Field

Inherits:
Base
  • Object
show all
Defined in:
lib/query_builder/cql/contexts/field.rb

Overview

Describes the field of Cassandra user-defined type

Instance Method Summary collapse

Instance Method Details

#alter(type) ⇒ QueryBuilder::Statements::AlterField

Builds the ‘ALTER TYPE … ALTER’ CQL statement

Parameters:

  • type (#to_s)

Returns:

  • (QueryBuilder::Statements::AlterField)


30
31
32
# File 'lib/query_builder/cql/contexts/field.rb', line 30

def alter(type)
  Statements::AlterField.new(context: self, type: type)
end

#create(type) ⇒ QueryBuilder::Statements::CreateField

Builds the ‘ALTER TYPE … ADD’ CQL statement

Parameters:

  • type (#to_s)

Returns:

  • (QueryBuilder::Statements::CreateField)


20
21
22
# File 'lib/query_builder/cql/contexts/field.rb', line 20

def create(type)
  Statements::CreateField.new(context: self, type: type)
end

#rename(name) ⇒ QueryBuilder::Statements::RenameField

Builds the ‘ALTER TYPE … RENAME’ CQL statement

Parameters:

  • name (#to_s)

Returns:

  • (QueryBuilder::Statements::RenameField)


40
41
42
# File 'lib/query_builder/cql/contexts/field.rb', line 40

def rename(name)
  Statements::RenameField.new(context: self, name: name)
end