Sha256: c7848a9ff18f36ab7f2e61228b29eb9f36ecaf1723c31e58464d87f845820c4e

Contents?: true

Size: 739 Bytes

Versions: 8

Compression:

Stored size: 739 Bytes

Contents

require_relative 'adapter/database_statements'
require_relative 'adapter/oid'
require_relative 'adapter/quoting'
require_relative 'adapter/schema_definitions'
require_relative 'adapter/schema_dumper'
require_relative 'adapter/schema_statements'

module Torque
  module PostgreSQL
    module Adapter

      include Quoting
      include ColumnDumper
      include DatabaseStatements
      include SchemaStatements

      # Get the current PostgreSQL version as a Gem Version.
      def version
        @version ||= Gem::Version.new(
          select_value('SELECT version()')
            .match(/#{Adapter::ADAPTER_NAME} ([\d\.]+)/)[1])
      end

    end

    ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend Adapter
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
torque-postgresql-0.1.7 lib/torque/postgresql/adapter.rb
torque-postgresql-0.1.6 lib/torque/postgresql/adapter.rb
torque-postgresql-0.1.5 lib/torque/postgresql/adapter.rb
torque-postgresql-0.1.4 lib/torque/postgresql/adapter.rb
torque-postgresql-0.1.3 lib/torque/postgresql/adapter.rb
torque-postgresql-0.1.2 lib/torque/postgresql/adapter.rb
torque-postgresql-0.1.1 lib/torque/postgresql/adapter.rb
torque-postgresql-0.1.0 lib/torque/postgresql/adapter.rb