class PLRuby::BitString
The class PLRuby::BitString implement the PostgreSQL type bit and bit varying
Public Class Methods
Convert a String to a BitString
# File plruby.rb, line 1026 def from_string(string, length = strlen(string)) end
create a new BitString object with nbits bits
init can be a Fixnum or a String
For a String the first character can be 'x', 'X' for and hexadecimal representation, or 'b', 'B' for a binary representation. The default is a binary representation
# File plruby.rb, line 1117 def initialize(init, nbits = -1) end
Public Instance Methods
AND operator
# File plruby.rb, line 1043 def &(other) end
Concatenate self and other
# File plruby.rb, line 1039 def +(other) end
LEFT SHIFT operator
# File plruby.rb, line 1059 def <<(lshft) end
comparison function for 2 BitString objects
All bits are considered and additional zero bits may make one string smaller/larger than the other, even if their zero-padded values would be the same.
# File plruby.rb, line 1035 def <=>(other) end
RIGHT SHIFT operator
# File plruby.rb, line 1063 def >>(rshft) end
Element reference with the same syntax that for a String object
Return a BitString or a Fixnum 0, 1
bitstring[fixnum] bitstring[fixnum, fixnum] bitstring[range] bitstring[regexp] bitstring[regexp, fixnum] bitstring[string] bitstring[other_bitstring]
# File plruby.rb, line 1077 def [](*args) end
Element assignment with the same syntax that for a String object
bitstring[fixnum] = fixnum bitstring[fixnum] = string_or_bitstring bitstring[fixnum, fixnum] = string_or_bitstring bitstring[range] = string_or_bitstring bitstring[regexp] = string_or_bitstring bitstring[regexp, fixnum] = string_or_bitstring bitstring[other_str] = string_or_bitstring
# File plruby.rb, line 1089 def []=(*args) end
XOR operator
# File plruby.rb, line 1051 def ^(other) end
append other to self
# File plruby.rb, line 1093 def concat(other) end
iterate other each bit
# File plruby.rb, line 1097 def each end
return true if other is included in self
# File plruby.rb, line 1101 def include?(other) end
return the position of other in self
return nil if other is not included in self
# File plruby.rb, line 1107 def index(other) end
return the length of self in bits
# File plruby.rb, line 1121 def length end
return the length of self in octets
# File plruby.rb, line 1125 def octet_length end
append other to self
# File plruby.rb, line 1129 def push(other) end
convert self to a Fixnum
# File plruby.rb, line 1133 def to_i end
convert self to a String
# File plruby.rb, line 1137 def to_s end
OR operator
# File plruby.rb, line 1047 def |(other) end
NOT operator
# File plruby.rb, line 1055 def ~() end