Sha256: acaa60793525ba609967f74b1e0c258a71622b5f30e4e7587ee6642bb88cd847
Contents?: true
Size: 661 Bytes
Versions: 10
Compression:
Stored size: 661 Bytes
Contents
require 'digest' module PgSearch class Configuration class Column attr_reader :weight def initialize(column_name, weight, model) @column_name = column_name.to_s @weight = weight @model = model @connection = model.connection end def full_name "#{table_name}.#{column_name}" end def to_sql "coalesce(#{expression}::text, '')" end private def table_name @model.quoted_table_name end def column_name @connection.quote_column_name(@column_name) end def expression full_name end end end end
Version data entries
10 entries across 10 versions & 1 rubygems