Module: OrientDB::SQL::ConditionalExtension

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

#contains(field, value) ⇒ Object



108
109
110
# File 'lib/orientdb/sql/ext.rb', line 108

def contains(field, value)
  "#{to_s} contains (#{field} = #{quote(value)})"
end

#contains_all(field, value) ⇒ Object



112
113
114
# File 'lib/orientdb/sql/ext.rb', line 112

def contains_all(field, value)
  "#{to_s} containsAll (#{field} = #{quote(value)})"
end

#contains_key(value) ⇒ Object



116
117
118
# File 'lib/orientdb/sql/ext.rb', line 116

def contains_key(value)
  "#{to_s} containsKey #{quote(value)}"
end

#contains_text(value) ⇒ Object



124
125
126
# File 'lib/orientdb/sql/ext.rb', line 124

def contains_text(value)
  "#{to_s} containsText #{quote(value)}"
end

#contains_value(value) ⇒ Object



120
121
122
# File 'lib/orientdb/sql/ext.rb', line 120

def contains_value(value)
  "#{to_s} containsValue #{quote(value)}"
end

#eq(value) ⇒ Object



72
73
74
# File 'lib/orientdb/sql/ext.rb', line 72

def eq(value)
  "#{to_s} = #{quote(value)}"
end

#gt(value) ⇒ Object



84
85
86
# File 'lib/orientdb/sql/ext.rb', line 84

def gt(value)
  "#{to_s} > #{quote(value)}"
end

#gte(value) ⇒ Object



88
89
90
# File 'lib/orientdb/sql/ext.rb', line 88

def gte(value)
  "#{to_s} >= #{quote(value)}"
end

#in(*values) ⇒ Object



104
105
106
# File 'lib/orientdb/sql/ext.rb', line 104

def in(*values)
  "#{to_s} IN #{quote(values)}"
end

#is_not_nullObject



100
101
102
# File 'lib/orientdb/sql/ext.rb', line 100

def is_not_null
  "#{to_s} IS NOT null"
end

#is_nullObject



96
97
98
# File 'lib/orientdb/sql/ext.rb', line 96

def is_null
  "#{to_s} IS null"
end

#like(value) ⇒ Object



68
69
70
# File 'lib/orientdb/sql/ext.rb', line 68

def like(value)
  "#{to_s} LIKE #{quote(value)}"
end

#litObject



64
65
66
# File 'lib/orientdb/sql/ext.rb', line 64

def lit
  OrientDB::SQL::LiteralExpression.new to_s
end

#lt(value) ⇒ Object



76
77
78
# File 'lib/orientdb/sql/ext.rb', line 76

def lt(value)
  "#{to_s} < #{quote(value)}"
end

#lte(value) ⇒ Object



80
81
82
# File 'lib/orientdb/sql/ext.rb', line 80

def lte(value)
  "#{to_s} <= #{quote(value)}"
end

#matches(value) ⇒ Object



128
129
130
# File 'lib/orientdb/sql/ext.rb', line 128

def matches(value)
  "#{to_s} matches #{quote(value)}"
end

#ne(value) ⇒ Object



92
93
94
# File 'lib/orientdb/sql/ext.rb', line 92

def ne(value)
  "#{to_s} <> #{quote(value)}"
end