Class: MemDB::Idx::Uniq
Constant Summary
Constants included
from MemDB::Idx
ANY
Instance Method Summary
collapse
Methods included from MemDB::Idx
#default, #default_any, #downcase
Constructor Details
#initialize(original) ⇒ Uniq
Returns a new instance of Uniq.
8
9
10
|
# File 'lib/mem_db/idx/uniq.rb', line 8
def initialize(original)
@original = original
end
|
Instance Method Details
#field ⇒ Object
12
13
14
|
# File 'lib/mem_db/idx/uniq.rb', line 12
def field
@original.field
end
|
#map_query(raw) ⇒ Object
31
32
33
|
# File 'lib/mem_db/idx/uniq.rb', line 31
def map_query(raw)
@original.map_query(raw)
end
|
#map_value(raw) ⇒ Object
27
28
29
|
# File 'lib/mem_db/idx/uniq.rb', line 27
def map_value(raw)
@original.map_value(raw)
end
|
#prepare_query(query) ⇒ Object
23
24
25
|
# File 'lib/mem_db/idx/uniq.rb', line 23
def prepare_query(query)
@original.prepare_query(query).uniq
end
|
#value(obj) ⇒ Object
16
17
18
19
20
21
|
# File 'lib/mem_db/idx/uniq.rb', line 16
def value(obj)
val = @original.value(obj)
return val if val == MemDB::Idx::ANY
val.uniq
end
|