edge badge
Methods
#
C
F
K
N
Class Public methods
new()
# File activerecord/lib/active_record/connection_adapters/postgresql/oid.rb, line 341
def initialize
  @mapping = {}
end
Instance Public methods
[](oid)
# File activerecord/lib/active_record/connection_adapters/postgresql/oid.rb, line 349
def [](oid)
  @mapping[oid]
end
[]=(oid, type)
# File activerecord/lib/active_record/connection_adapters/postgresql/oid.rb, line 345
def []=(oid, type)
  @mapping[oid] = type
end
clear()
# File activerecord/lib/active_record/connection_adapters/postgresql/oid.rb, line 353
def clear
  @mapping.clear
end
fetch(ftype, fmod)
# File activerecord/lib/active_record/connection_adapters/postgresql/oid.rb, line 361
def fetch(ftype, fmod)
  # The type for the numeric depends on the width of the field,
  # so we'll do something special here.
  #
  # When dealing with decimal columns:
  #
  # places after decimal  = fmod - 4 & 0xffff
  # places before decimal = (fmod - 4) >> 16 & 0xffff
  if ftype == 1700 && (fmod - 4 & 0xffff).zero?
    ftype = 23
  end

  @mapping.fetch(ftype) { |oid| yield oid, fmod }
end
key?(oid)
# File activerecord/lib/active_record/connection_adapters/postgresql/oid.rb, line 357
def key?(oid)
  @mapping.key? oid
end