Sha256: c3459eed93c557b9d3bbfc72f2bb158ef34f301d151151c32714e9ae76cefd70

Contents?: true

Size: 780 Bytes

Versions: 6

Compression:

Stored size: 780 Bytes

Contents

# frozen_string_literal: true

require 'postgresql_cursor/version'
require 'active_support'

ActiveSupport.on_load :active_record do
  require 'postgresql_cursor/cursor'
  require 'postgresql_cursor/active_record/relation/cursor_iterators'
  require 'postgresql_cursor/active_record/sql_cursor'
  require 'postgresql_cursor/active_record/connection_adapters/postgresql_type_map'

  # ActiveRecord 4.x
  require 'active_record/connection_adapters/postgresql_adapter'
  ActiveRecord::Base.extend(PostgreSQLCursor::ActiveRecord::SqlCursor)
  ActiveRecord::Relation.send(:include, PostgreSQLCursor::ActiveRecord::Relation::CursorIterators)
  ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send(:include, PostgreSQLCursor::ActiveRecord::ConnectionAdapters::PostgreSQLTypeMap)
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
postgresql_cursor-0.6.9 lib/postgresql_cursor.rb
postgresql_cursor-0.6.8 lib/postgresql_cursor.rb
postgresql_cursor-0.6.7 lib/postgresql_cursor.rb
postgresql_cursor-0.6.6 lib/postgresql_cursor.rb
postgresql_cursor-0.6.5 lib/postgresql_cursor.rb
postgresql_cursor-0.6.4 lib/postgresql_cursor.rb