Class: Virsandra::AlterQuery
- Inherits:
-
Query
- Object
- Query
- Virsandra::AlterQuery
show all
- Defined in:
- lib/virsandra/queries/alter_query.rb
Instance Attribute Summary
Attributes inherited from Query
#row, #statement
Instance Method Summary
collapse
Methods inherited from Query
alter, delete, #execute, #fetch, #from, insert, #limit, #order, select, #values, #where
Constructor Details
#initialize(skip_validation = false) ⇒ AlterQuery
Returns a new instance of AlterQuery.
3
4
5
|
# File 'lib/virsandra/queries/alter_query.rb', line 3
def initialize(skip_validation = false)
@skip_validation = skip_validation
end
|
Instance Method Details
#add(column_name, column_type = nil) ⇒ Object
12
13
14
15
|
# File 'lib/virsandra/queries/alter_query.rb', line 12
def add(column_name, column_type = nil)
@add = AddQuery.new(column_name, column_type)
self
end
|
#table(table_name) ⇒ Object
7
8
9
10
|
# File 'lib/virsandra/queries/alter_query.rb', line 7
def table(table_name)
@table = TableQuery.new("TABLE", table_name)
self
end
|
#to_s ⇒ Object
17
18
19
20
|
# File 'lib/virsandra/queries/alter_query.rb', line 17
def to_s
validate
super
end
|