lib/sequel_core/adapters/shared/postgres.rb
# PostgreSQL specific full text search syntax, using tsearch2 (included
# in 8.3 by default, and available for earlier versions as an add-on).
PostgreSQL specific full text search syntax, using tsearch2 (included
in 8.3 by default, and available for earlier versions as an add-on).
PostgreSQL specific full text search syntax using tsearch2 ( included in 8 . 3 by default and available for earlier versions as an add - on ) .
def full_text_search(cols, terms, opts = {})
        lang = opts[:language] || 'simple'
        cols =  Array(cols).map{|x| :COALESCE[x, '']}.sql_string_join(' ')
        filter("to_tsvector(#{literal(lang)}, #{literal(cols)}) @@ to_tsquery(#{literal(lang)}, #{literal(Array(terms).join(' | '))})")
      end
def full_text_search ( cols , terms , opts = { } ) lang = opts [ :language ] || 'simple' cols = Array ( cols ) . map { | x | :COALESCE [ x , '' ] } . sql_string_join ( ' ' ) filter ( "to_tsvector(#{literal(lang)}, #{literal(cols)}) @@ to_tsquery(#{literal(lang)}, #{literal(Array(terms).join(' | '))})" ) end
PostgreSQL specific full text search syntax, using tsearch2 (included
in 8.3 by default, and available for earlier versions as an add-on).
PostgreSQL specific full text search syntax using tsearch2 ( included in 8 . 3 by default and available for earlier versions as an add - on ) .
cols
terms
opts