Sha256: a6d2181457b8e219b204f55842a60d65eb9a80d7b9bf027446c06e9bc1410c6c

Contents?: true

Size: 473 Bytes

Versions: 47

Compression:

Stored size: 473 Bytes

Contents

# frozen_string_literal: true

module Ridgepole
  class ConnectionAdapters
    def self.mysql?
      defined?(ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter) && ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter)
    end

    def self.postgresql?
      defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) && ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
ridgepole-0.8.4 lib/ridgepole/connection_adapters.rb
ridgepole-0.8.3 lib/ridgepole/connection_adapters.rb
ridgepole-0.8.2 lib/ridgepole/connection_adapters.rb
ridgepole-0.8.1 lib/ridgepole/connection_adapters.rb
ridgepole-0.8.0 lib/ridgepole/connection_adapters.rb
ridgepole-0.8.0.rc2 lib/ridgepole/connection_adapters.rb
ridgepole-0.7.8 lib/ridgepole/connection_adapters.rb