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
|
||||
col = @params[:columns][name]
|
||||
[
|
||||
(@table[:name].gteq(col[:lower]) if col[:lower]),
|
||||
(@table[:name].lteq(col[:upper]) if col[:upper])
|
||||
(@table[name].gteq(col[:lower]) if col[:lower]),
|
||||
(@table[name].lteq(col[:upper]) if col[:upper])
|
||||
]
|
||||
end
|
||||
|
||||
def eq_predicate name
|
||||
value = @params[:columns][:name][:value]
|
||||
@table[:name].eq(value) if value
|
||||
value = @params[:columns][name][:value]
|
||||
@table[name].eq(value) if value
|
||||
end
|
||||
|
||||
def like_predicate name
|
||||
value = @params[:columns][:name][:value]
|
||||
@table[:name].matches("%#{value}%") if value
|
||||
value = @params[:columns][name][:value]
|
||||
@table[name].matches("%#{value}%") if value
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue