module PhatPgsearch::PostgreSQL::TableDefinition
Public Class Methods
included(base)
click to toggle source
# File lib/phat_pgsearch/postgresql.rb, line 51 def self.included(base) # add data type ::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES[:tsvector] = {:name => "tsvector"} end
Public Instance Methods
tsvector(*args)
click to toggle source
add tsvector column
# File lib/phat_pgsearch/postgresql.rb, line 57 def tsvector(*args) options = args.extract_options! column_names = args column_names.each { |name| column(name, :tsvector, options) } end