class BDB::Recnum - RDoc Documentation

# 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::Common.open(name, subname, flags, mode)

is equivalent to

BDB::Common.open(name, subname, flags, mode, “set_flags” => BDB::RENUMBER, “set_array_base” => 0)

    Inherit from BDB::Common

### Public Instance Methods

&(other) click to toggle source

returns a new array which contains elements belong to both elements.

    # File comxxx.rb, line 203
    def  &(other)
    end

*(times) click to toggle source

repetition

    # File comxxx.rb, line 193
    def  *(times)
    end

+(other) click to toggle source

concatenation

    # File comxxx.rb, line 188
    def  +(other)
    end

-(other) click to toggle source

substraction

    # File comxxx.rb, line 198
    def  -(other)
    end

<<(obj) click to toggle source

append a new item with value obj. Return self

    # File comxxx.rb, line 213
    def  <<(obj)
    end

<=>(other) click to toggle source

comparison : return -1, 0 or 1

    # File comxxx.rb, line 218
    def  <=>(other)
    end

[](args) click to toggle source

Element reference - with the following syntax

self

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.

self

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.

    # File comxxx.rb, line 160
    def  [](args)
    end

[]=(args, val) click to toggle source

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.

    # File comxxx.rb, line 183
    def  []=(args, val)
    end

clear() click to toggle source

delete all elements

    # File comxxx.rb, line 223
    def  clear
    end

collect() { |item| ... } click to toggle source

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

    # File comxxx.rb, line 230
    def  collect
       yield item
    end

collect!() { |item| ... } click to toggle source

invokes block once for each element of db, replacing the element with the value returned by block.

    # File comxxx.rb, line 237
    def  collect!
       yield item
    end

concat(other) click to toggle source

append other to the end

    # File comxxx.rb, line 243
    def  concat(other)
    end

delete(val) click to toggle source

delete the item which matches to val

    # File comxxx.rb, line 248
    def  delete(val)
    end

delete_at(pos) click to toggle source

delete the item at pos

    # File comxxx.rb, line 253
    def  delete_at(pos)
    end

delete_if() { |x| ... } click to toggle source

delete the item if the block return true

    # File comxxx.rb, line 258
    def  delete_if
       yield x
    end

each() { |x| ... } click to toggle source

iterate over each item

    # File comxxx.rb, line 270
    def  each
       yield x
    end

each_index() { |i| ... } click to toggle source

iterate over each index

    # File comxxx.rb, line 276
    def  each_index
       yield i
    end

empty?() click to toggle source

return true if the db file is empty

    # File comxxx.rb, line 282
    def  empty?
    end

fill(val) click to toggle source

set the entire db with val

    # File comxxx.rb, line 287
    def  fill(val)
    end

include?(val) click to toggle source

returns true if the given val is present

    # File comxxx.rb, line 302
    def  include?(val)
    end

index(val) click to toggle source

returns the index of the item which equals to val. If no item found, returns nil

    # File comxxx.rb, line 308
    def  index(val)
    end

indexes(index_1,..., index_n) click to toggle source

returns an array consisting of elements at the given indices

    # File comxxx.rb, line 313
    def  indexes(index_1,..., index_n)
    end

indices(index_1,..., index_n) click to toggle source

returns an array consisting of elements at the given indices

    # File comxxx.rb, line 318
    def  indices(index_1,..., index_n)
    end

join([sep]) click to toggle source

returns a string created by converting each element to a string

    # File comxxx.rb, line 323
    def  join([sep])
    end

length() click to toggle source

return the number of elements of the db file

    # File comxxx.rb, line 328
    def  length
    end

nitems() click to toggle source

return the number of non-nil elements of the db file

    # File comxxx.rb, line 336
    def  nitems
    end

pop() click to toggle source

pops and returns the last value

    # File comxxx.rb, line 341
    def  pop
    end

push(obj, ...) click to toggle source

appends obj

    # File comxxx.rb, line 346
    def  push(obj, ...)
    end

reject!() { |x| ... } click to toggle source

delete the item if the block return true

    # File comxxx.rb, line 264
    def  reject!
       yield x
    end

replace(other) click to toggle source

replaces the contents of the db file with the contents of other

    # File comxxx.rb, line 351
    def  replace(other)
    end

reverse() click to toggle source

returns the array of the items in reverse order

    # File comxxx.rb, line 356
    def  reverse
    end

reverse!() click to toggle source

replaces the items in reverse order.

    # File comxxx.rb, line 361
    def  reverse!
    end

reverse_each() { |x| ... } click to toggle source

iterate over each item in reverse order

    # File comxxx.rb, line 366
    def  reverse_each
       yield x
    end

rindex(val) click to toggle source

returns the index of the last item which verify item == val

    # File comxxx.rb, line 372
    def  rindex(val)
    end

shift() click to toggle source

remove and return the first element

    # File comxxx.rb, line 377
    def  shift
    end

size() click to toggle source

same than length

    # File comxxx.rb, line 331
    def  size
    end

to_a() click to toggle source

return an Array with all elements

    # File comxxx.rb, line 382
    def  to_a
    end

to_ary() click to toggle source

same than #to_a

    # File comxxx.rb, line 385
    def  to_ary
    end

unshift(obj) click to toggle source

insert obj to the front of the db file

    # File comxxx.rb, line 390
    def  unshift(obj)
    end

|(other) click to toggle source

join

    # File comxxx.rb, line 208
    def  |(other)
    end