Sha256: bd13e8e513379f8cadf2b8cbd58fd701b413aa89f7eabcc0ac9f82dd8d746992

Contents?: true

Size: 781 Bytes

Versions: 12

Compression:

Stored size: 781 Bytes

Contents

require_relative 'adapter/database_statements'
require_relative 'adapter/oid'
require_relative 'adapter/quoting'
require_relative 'adapter/schema_creation'
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

12 entries across 12 versions & 1 rubygems

Version Path
torque-postgresql-0.2.12 lib/torque/postgresql/adapter.rb
torque-postgresql-0.2.11 lib/torque/postgresql/adapter.rb
torque-postgresql-0.2.10 lib/torque/postgresql/adapter.rb
torque-postgresql-0.2.9 lib/torque/postgresql/adapter.rb
torque-postgresql-0.2.8 lib/torque/postgresql/adapter.rb
torque-postgresql-0.2.7 lib/torque/postgresql/adapter.rb
torque-postgresql-0.2.6 lib/torque/postgresql/adapter.rb
torque-postgresql-0.2.5 lib/torque/postgresql/adapter.rb
torque-postgresql-0.2.4 lib/torque/postgresql/adapter.rb
torque-postgresql-0.2.3 lib/torque/postgresql/adapter.rb
torque-postgresql-0.2.2 lib/torque/postgresql/adapter.rb
torque-postgresql-0.2.1 lib/torque/postgresql/adapter.rb