fix :name in predicates
This commit is contained in:
parent
e621f6ef29
commit
fcb11bb036
1 changed files with 6 additions and 6 deletions
|
@ -34,19 +34,19 @@ class DataTable
|
||||||
def range_predicates name
|
def range_predicates name
|
||||||
col = @params[:columns][name]
|
col = @params[:columns][name]
|
||||||
[
|
[
|
||||||
(@table[:name].gteq(col[:lower]) if col[:lower]),
|
(@table[name].gteq(col[:lower]) if col[:lower]),
|
||||||
(@table[:name].lteq(col[:upper]) if col[:upper])
|
(@table[name].lteq(col[:upper]) if col[:upper])
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
def eq_predicate name
|
def eq_predicate name
|
||||||
value = @params[:columns][:name][:value]
|
value = @params[:columns][name][:value]
|
||||||
@table[:name].eq(value) if value
|
@table[name].eq(value) if value
|
||||||
end
|
end
|
||||||
|
|
||||||
def like_predicate name
|
def like_predicate name
|
||||||
value = @params[:columns][:name][:value]
|
value = @params[:columns][name][:value]
|
||||||
@table[:name].matches("%#{value}%") if value
|
@table[name].matches("%#{value}%") if value
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue