Module: HashSql::InstanceMethods

Defined in:
lib/datatablesnet/hash_sql.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#sql_comparatorObject

Returns the value of attribute sql_comparator.



12
13
14
# File 'lib/datatablesnet/hash_sql.rb', line 12

def sql_comparator
  @sql_comparator
end

#sql_operatorObject

Returns the value of attribute sql_operator.



11
12
13
# File 'lib/datatablesnet/hash_sql.rb', line 11

def sql_operator
  @sql_operator
end

Instance Method Details

#sql_andObject



22
23
24
25
# File 'lib/datatablesnet/hash_sql.rb', line 22

def sql_and
  self.sql_operator = "and"
  return self
end

#sql_likeObject



32
33
34
35
# File 'lib/datatablesnet/hash_sql.rb', line 32

def sql_like
  self.sql_comparator = "like"
  return self
end

#sql_orObject



27
28
29
30
# File 'lib/datatablesnet/hash_sql.rb', line 27

def sql_or
  self.sql_operator = "or"
  return self
end

#sql_whereObject



14
15
16
17
18
19
20
# File 'lib/datatablesnet/hash_sql.rb', line 14

def sql_where
  if self.instance_of?(Hash)
    build_where
  else
    combine_wheres
  end
end