Class: SQLValue

Inherits:
SQLObject show all
Defined in:
lib/sqlobject.rb

Overview

Class representing SQL scalar values

Instance Attribute Summary

Attributes inherited from SQLObject

#alias, #inline, #name, #separator

Instance Method Summary collapse

Methods inherited from SQLObject

#_name, #_string, #_string=, get

Constructor Details

#initialize(val = nil) ⇒ SQLValue

Returns a new instance of SQLValue.



129
130
131
# File 'lib/sqlobject.rb', line 129

def initialize ( val = nil )
    @value = val.is_a?( SQLValue )  ?  val.value  :  _escape( val )
end

Instance Method Details

#to_sObject



134
135
136
# File 'lib/sqlobject.rb', line 134

def to_s
    @value
end