class BDB::Recnum
Don't mix these methods with methods of <em>BDB::Cursor</em> All instance methods has the same syntax than the methods of Array
BDB::Recnum.open(name, subname, flags, mode)
is equivalent to
BDB::Recno.open(name, subname, flags, mode, “set_flags” => BDB::RENUMBER, “set_array_base” => 0)
Inherit from BDB::Common
Public Instance Methods
Source
# File comxxx.rb, line 203 def &(other) end
returns a new array which contains elements belong to both elements.
Source
# File comxxx.rb, line 213 def <<(obj) end
append a new item with value obj. Return self
Source
# File comxxx.rb, line 160 def [](args) end
Element reference - with the following syntax
retrieves the nth item from an array. Index starts from zero. If index is the negative, counts backward from the end of the array. The index of the last element is -1. Returns nil, if the nth element is not exist in the array.
returns an array containing the objects from start to end, including both ends. if end is larger than the length of the array, it will be rounded to the length. If start is out of an array range , returns nil. And if start is larger than end with in array range, returns empty array ([]).
self[start, length]
returns an array containing length items from start. Returns nil if length is negative.
Source
# File comxxx.rb, line 183 def []=(args, val) end
Element assignement – with the following syntax
self = val
changes the nth element of the array into val. If nth is larger than array length, the array shall be extended automatically. Extended region shall be initialized by nil.
self = val
replace the items from start to end with val. If val is not an array, the type of val will be converted into the Array using to_a method.
self[start, length] = val
replace the length items from start with val. If val is not an array, the type of val will be converted into the Array using to_a.
Source
# File comxxx.rb, line 230 def collect yield item end
Returns a new array by invoking block once for every element, passing each element as a parameter to block. The result of block is used as the given element
Source
# File comxxx.rb, line 237 def collect! yield item end
invokes block once for each element of db, replacing the element with the value returned by block.
Source
# File comxxx.rb, line 248 def delete(val) end
delete the item which matches to val
Source
# File comxxx.rb, line 258 def delete_if yield x end
delete the item if the block return true
Source
# File comxxx.rb, line 276 def each_index yield i end
iterate over each index
Source
# File comxxx.rb, line 264 def reject! yield x end
delete the item if the block return true