Class: QueryBuilder::CQL::Contexts::Type
- Defined in:
- lib/query_builder/cql/contexts/type.rb
Overview
Describes the Cassandra user-defined type
Instance Method Summary collapse
-
#create ⇒ QueryBuilder::Statements::CreateType
Builds the ‘CREATE TYPE’ CQL statement.
-
#drop ⇒ QueryBuilder::Statements::DropType
Builds the ‘DROP TYPE’ CQL statement.
-
#field(name) ⇒ QueryBuilder::CQL::Contexts::Field
Returns the field context.
-
#to_s ⇒ String
Returns the full name of the type.
Instance Method Details
#create ⇒ QueryBuilder::Statements::CreateType
Builds the ‘CREATE TYPE’ CQL statement
36 37 38 |
# File 'lib/query_builder/cql/contexts/type.rb', line 36 def create Statements::CreateType.new(context: self) end |
#drop ⇒ QueryBuilder::Statements::DropType
Builds the ‘DROP TYPE’ CQL statement
44 45 46 |
# File 'lib/query_builder/cql/contexts/type.rb', line 44 def drop Statements::DropType.new(context: self) end |
#field(name) ⇒ QueryBuilder::CQL::Contexts::Field
Returns the field context
28 29 30 |
# File 'lib/query_builder/cql/contexts/type.rb', line 28 def field(name) Contexts::Field.new(type: self, name: name) end |
#to_s ⇒ String
Returns the full name of the type
18 19 20 |
# File 'lib/query_builder/cql/contexts/type.rb', line 18 def to_s [keyspace, name].join(".") end |