module Safrano::Filter::FuncTreeDefault
default adapter function handler for all others… try to use the most common version :substring –> instr because here is seems Postgres is special datetime funcs –> exctract, here sqlite is special(uses format) note: we dont test this, provided as an example/template, might work eg for mysql
Public Instance Methods
substringof_sig2(jh)
click to toggle source
# File lib/odata/filter/sequel_function_adapter.rb, line 130 def substringof_sig2(jh) # substringof(name, '__Route du Rhum__') --> # '__Route du Rhum__' contains name as a substring # instr() seems to be the most common substring func Contract.collect_result!(args[1].leuqes(jh), args[0].leuqes(jh)) do |l1, l0| substr_func = Sequel.function(:instr, l1, l0) Sequel::SQL::BooleanExpression.new(:>, substr_func, 0) end end