module SchemaPlus::Functions::ActiveRecord::ConnectionAdapters::PostgresqlAdapter

Public Instance Methods

drop_function(function_name, params, options = {}) click to toggle source
Calls superclass method
# File lib/schema_plus/functions/active_record/connection_adapters/postgresql_adapter.rb, line 7
def drop_function(function_name, params, options = {})
  clean_params = params.gsub(/ DEFAULT[^,]+/i, '')
  super(function_name, clean_params, options)
end
postgresql_version_at_least?(env, required) click to toggle source
# File lib/schema_plus/functions/active_record/connection_adapters/postgresql_adapter.rb, line 12
def postgresql_version_at_least?(env, required)
  @postgresql_version ||= begin
                            env.connection.select_value("SHOW server_version").match(/(\d+\.\d+)/)[1]
                          end
  Gem::Version.new(@postgresql_version) >= Gem::Version.new(required)
end