class OCI8::OracleVersion

@see OCI8#oracle_server_version
@see OCI8.oracle_client_version
major, minor, update, patch and port_update.
Oracle version is represented by five numbers:
The data class, representing Oracle version.

def <=>(other)

Returns:
  • (-1, 0, +1) -
def <=>(other)
  @vernum <=> other.to_i
end

def eql?(other)

Returns:
  • (true or false) -
def eql?(other)
  other.is_a? OCI8::OracleVersion and (self <=> other) == 0
end

def hash

Returns:
  • (Integer) -
def hash
  @vernum
end

def initialize(arg, minor = nil, update = nil, patch = nil, port_update = nil)

Returns:
  • (OCI8::OracleVersion) -
def initialize(arg, minor = nil, update = nil, patch = nil, port_update = nil)
  if arg.is_a? String
    major, minor, update, patch, port_update = arg.split('.').collect do |v|
      v.to_i
    end
  elsif arg >= 0x08000000
    major  = (arg & 0xFF000000) >> 24
    minor  = (arg & 0x00F00000) >> 20
    update = (arg & 0x000FF000) >> 12
    patch  = (arg & 0x00000F00) >> 8
    port_update = (arg & 0x000000FF)
  else
    major = arg
  end
  @major = major
  @minor = minor || 0
  @update = update || 0
  @patch = patch || 0
  @port_update = port_update || 0
  @vernum = (@major << 24) | (@minor << 20) | (@update << 12) | (@patch << 8) | @port_update
end

def inspect

Other tags:
    Private: -
def inspect
  "#<#{self.class.to_s}: #{self.to_s}>"
end

def to_i

Returns:
  • (Integer) -
def to_i
  @vernum
end

def to_s

Returns:
  • (String) -
def to_s
  format('%d.%d.%d.%d.%d', @major, @minor, @update, @patch, @port_update)
end