Class: QueryBuilder::CQL::Statements::CreateColumn

Inherits:
Base show all
Defined in:
lib/query_builder/cql/statements/create_column.rb

Overview

Describes the ‘ALTER TABLE … ADD’ CQL3 statement

Instance Attribute Summary

Attributes inherited from QueryBuilder::Core::Base

#attributes

Instance Method Summary collapse

Methods included from Operators

cql, cql_composite, cql_dec, cql_element, cql_entries, cql_frozen, cql_full, cql_gt, cql_gte, cql_in, cql_inc, cql_keys, cql_list, cql_literal, cql_lt, cql_lte, cql_map, cql_set, cql_token, cql_token_value, cql_ttl, cql_tuple, cql_tuple_value, cql_writetime

Methods inherited from QueryBuilder::Core::Statement

#<<, #clauses, #initialize

Methods inherited from QueryBuilder::Core::Base

#attribute, attribute, attributes, inherited, #initialize

Constructor Details

This class inherits a constructor from QueryBuilder::Core::Statement

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class QueryBuilder::CQL::Operators

Instance Method Details

#to_sString

Builds the statement

Returns:

  • (String)


18
19
20
21
22
23
# File 'lib/query_builder/cql/statements/create_column.rb', line 18

def to_s
  cql[
    "ALTER TABLE", context.table.to_s,
    "ADD", context.name, type, maybe_static
  ]
end