Class: Virsandra::AddQuery

Inherits:
Query
  • Object
show all
Defined in:
lib/virsandra/queries/add_query.rb

Instance Attribute Summary

Attributes inherited from Query

#row, #statement

Instance Method Summary collapse

Methods inherited from Query

#add, alter, delete, #execute, #fetch, #from, insert, #limit, #order, select, #values, #where

Constructor Details

#initialize(column_name, column_type = nil) ⇒ AddQuery

Returns a new instance of AddQuery.



3
4
5
6
# File 'lib/virsandra/queries/add_query.rb', line 3

def initialize(column_name, column_type = nil)
  @column_name = column_name
  @column_type = column_type.to_s.empty? ? "varchar" : column_type
end

Instance Method Details

#to_sObject



8
9
10
11
# File 'lib/virsandra/queries/add_query.rb', line 8

def to_s
  validate
  super
end