Module: OrientDB::SQL::FieldOperatorExtension

Includes:
UtilsMixin
Defined in:
lib/orientdb/sql/ext.rb

Instance Method Summary collapse

Methods included from UtilsMixin

#field_name, #quote, #quote_regexp, #quote_string, #select_single_string

Instance Method Details

#as_booleanObject



206
207
208
# File 'lib/orientdb/sql/ext.rb', line 206

def as_boolean
  "#{to_s}.asBoolean()"
end

#as_dateObject



198
199
200
# File 'lib/orientdb/sql/ext.rb', line 198

def as_date
  "#{to_s}.asDate()"
end

#as_date_timeObject



202
203
204
# File 'lib/orientdb/sql/ext.rb', line 202

def as_date_time
  "#{to_s}.asDateTime()"
end

#as_floatObject



194
195
196
# File 'lib/orientdb/sql/ext.rb', line 194

def as_float
  "#{to_s}.asFloat()"
end

#as_integerObject



190
191
192
# File 'lib/orientdb/sql/ext.rb', line 190

def as_integer
  "#{to_s}.asInteger()"
end

#as_stringObject



186
187
188
# File 'lib/orientdb/sql/ext.rb', line 186

def as_string
  "#{to_s}.asString()"
end

#char_at(pos) ⇒ Object



168
169
170
# File 'lib/orientdb/sql/ext.rb', line 168

def char_at(pos)
  "#{to_s}.charAt(#{quote(pos)})"
end

#index_of(string, start = nil) ⇒ Object



172
173
174
# File 'lib/orientdb/sql/ext.rb', line 172

def index_of(string, start = nil)
  "#{to_s}.indexOf(#{quote(string)}#{start ? ", #{quote(start)}" : ''})"
end

#odb_format(frmt) ⇒ Object

Avoided overriding the native method



177
178
179
# File 'lib/orientdb/sql/ext.rb', line 177

def odb_format(frmt)
  "#{to_s}.format(#{quote(frmt)})"
end

#odb_left(length) ⇒ Object

Avoided overriding the native method



155
156
157
# File 'lib/orientdb/sql/ext.rb', line 155

def odb_left(length)
  "#{to_s}.left(#{quote(length)})"
end

#odb_lengthObject

Avoided overriding the native method



137
138
139
# File 'lib/orientdb/sql/ext.rb', line 137

def odb_length
  "#{to_s}.length()"
end

#odb_right(length) ⇒ Object

Avoided overriding the native method



160
161
162
# File 'lib/orientdb/sql/ext.rb', line 160

def odb_right(length)
  "#{to_s}.right(#{quote(length)})"
end

#odb_sizeObject

Avoided overriding the native method



182
183
184
# File 'lib/orientdb/sql/ext.rb', line 182

def odb_size
  "#{to_s}.size()"
end

#odb_trimObject

Avoided overriding the native method



142
143
144
# File 'lib/orientdb/sql/ext.rb', line 142

def odb_trim
  "#{to_s}.trim()"
end

#sub_string(start, length = nil) ⇒ Object



164
165
166
# File 'lib/orientdb/sql/ext.rb', line 164

def sub_string(start, length = nil)
  "#{to_s}.subString(#{quote(start)}#{length ? ", #{quote(length)}" : ''})"
end

#to_lower_caseObject



150
151
152
# File 'lib/orientdb/sql/ext.rb', line 150

def to_lower_case
  "#{to_s}.toLowerCase()"
end

#to_upper_caseObject



146
147
148
# File 'lib/orientdb/sql/ext.rb', line 146

def to_upper_case
  "#{to_s}.toUpperCase()"
end