Class: AdminData::Search::Dbbase

Inherits:
Object
  • Object
show all
Defined in:
lib/admin_data/search.rb

Direct Known Subclasses

OracleSpecific, PostgresqlSpecific

Instance Method Summary collapse

Constructor Details

#initialize(operands, table_name, field_name, operator) ⇒ Dbbase

Returns a new instance of Dbbase.



5
6
7
8
9
10
# File 'lib/admin_data/search.rb', line 5

def initialize(operands, table_name, field_name, operator)
  @operands = operands
  @table_name = table_name
  @field_name = field_name
  @operator = operator
end

Instance Method Details

#like_operatorObject



12
13
14
# File 'lib/admin_data/search.rb', line 12

def like_operator
  'LIKE'
end

#operandsObject



20
21
22
# File 'lib/admin_data/search.rb', line 20

def operands
  @operands
end

#sql_field_nameObject



16
17
18
# File 'lib/admin_data/search.rb', line 16

def sql_field_name
  "#{@table_name}.#{@field_name}"
end