module Sequel
  module Plugins
    module PgTrgm
      module DatasetMethods
        def text_search(column, query)
          where("? % ?", column, query).reverse_order{ similarity(column, query) }
        end
      end
    end
  end
end

module Sequel
  module Plugins
    module PgTrgm
      module DatasetMethods
        def text_search(column, query)
          where(Sequel.lit('? % ?', column, query)).reverse_order{ similarity(column, query) }
        end
      end
    end
  end
end

Replace implicit SQL literal in filter method.
Replace implicit SQL literal in filter method.

Sequel 4.46 deprecated implicitly treating strings in filter methods as
SQL literals, and encourages explicitly using Sequel.lit.

https://github.com/jeremyevans/sequel/blob/master/CHANGELOG#L237
