Sha256: f402f0f5f902274ef78e3948c5cb8091c31241c3b3555bca12c8396f54a13f77

Contents?: true

Size: 1.19 KB

Versions: 12

Compression:

Stored size: 1.19 KB

Contents

# encoding: UTF-8
require 'date'
require 'bigdecimal'
require 'rational' unless RUBY_VERSION >= '1.9.2'

require 'mysql2/version' unless defined? Mysql2::VERSION
require 'mysql2/error'
require 'mysql2/mysql2'
require 'mysql2/result'
require 'mysql2/client'

# = Mysql2
#
# A modern, simple and very fast Mysql library for Ruby - binding to libmysql
module Mysql2
end

if defined?(ActiveRecord::VERSION::STRING) && ActiveRecord::VERSION::STRING < "3.1"
  begin
    require 'active_record/connection_adapters/mysql2_adapter'
  rescue LoadError
    warn "============= WARNING FROM mysql2 ============="
    warn "This version of mysql2 (#{Mysql2::VERSION}) doesn't ship with the ActiveRecord adapter."
    warn "In Rails version 3.1.0 and up, the mysql2 ActiveRecord adapter is included with rails."
    warn "If you want to use the mysql2 gem with Rails <= 3.0.x, please use the latest mysql2 in the 0.2.x series."
    warn "============= END WARNING FROM mysql2 ============="
  end
end

# For holding utility methods
module Mysql2::Util

  #
  # Rekey a string-keyed hash with equivalent symbols.
  #
  def self.key_hash_as_symbols(hash)
    return nil unless hash
    Hash[hash.map { |k,v| [k.to_sym, v] }]
  end

end

Version data entries

12 entries across 9 versions & 2 rubygems

Version Path
mysql2-0.3.17 lib/mysql2.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/mysql2-0.3.16/lib/mysql2.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/mysql2-0.3.16/lib/mysql2.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.16/lib/mysql2.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.16/lib/mysql2.rb
mysql2-0.3.16 lib/mysql2.rb
mysql2-0.3.15 lib/mysql2.rb
mysql2-0.3.14 lib/mysql2.rb
mysql2-0.3.13 lib/mysql2.rb
mysql2-0.3.12 lib/mysql2.rb
mysql2-0.3.12b6 lib/mysql2.rb
mysql2-0.3.12b5 lib/mysql2.rb