Module: SwitchmanInstJobs::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter

Defined in:
lib/switchman_inst_jobs/active_record/connection_adapters/postgresql_adapter.rb

Instance Method Summary collapse

Instance Method Details

#set_search_path(function, args = '()', path = ::Switchman::Shard.current.name) ⇒ Object


5
6
7
8
9
10
# File 'lib/switchman_inst_jobs/active_record/connection_adapters/postgresql_adapter.rb', line 5

def set_search_path(function, args = '()', path = ::Switchman::Shard.current.name)
  execute <<-SQL
    ALTER FUNCTION #{quote_table_name(function)}#{args}
      SET search_path TO #{path}
  SQL
end