class BDB::Cursor

A database cursor is a sequential pointer to the database entries. It allows traversal of the database and access to duplicate keyed entries. Cursors are used for operating on collections of records, for iterating over a database, and for saving handles to individual records, so that they can be modified after they have been read.

A cursor is created with the methods BDB::Common#cursor and BDB::Common#cursor_write

Public Instance Methods

c_clone(flags = 0) click to toggle source

same than dup

# File cursor.rb, line 65
def  c_clone(flags = 0)
end
c_close() click to toggle source

same than close

# File cursor.rb, line 17
def  c_close()
end
c_count() click to toggle source

same than count

# File cursor.rb, line 25
def  c_count()
end
c_current() click to toggle source

same than current

# File cursor.rb, line 33
def  c_current()
end
c_del() click to toggle source

same than del

# File cursor.rb, line 44
def  c_del()
end
c_dup(flags = 0) click to toggle source

same than dup

# File cursor.rb, line 62
def  c_dup(flags = 0)
end
c_first() click to toggle source

same than first

# File cursor.rb, line 73
def  c_first()
end
c_get(flags, key = nil, value = nil) click to toggle source

same than get

# File cursor.rb, line 89
def  c_get(flags, key = nil, value = nil)
end
c_last() click to toggle source

same than last

# File cursor.rb, line 97
def  c_last()
end
c_next() click to toggle source

same than next

# File cursor.rb, line 105
def  c_next()
end
c_pget(flags, key = nil, value = nil) click to toggle source

same than pget

# File cursor.rb, line 113
def  c_pget(flags, key = nil, value = nil)
end
c_prev() click to toggle source

same than prev

# File cursor.rb, line 121
def  c_prev()
end
c_put(flags, value) click to toggle source

same than put

# File cursor.rb, line 132
def  c_put(flags, value)
end
c_set(key) click to toggle source

same than set

# File cursor.rb, line 153
def  c_set(key)
end
c_set_range(key) click to toggle source

same than set

# File cursor.rb, line 159
def  c_set_range(key)
end
c_set_recno(key) click to toggle source

same than set

# File cursor.rb, line 165
def  c_set_recno(key)
end
clone(flags = 0) click to toggle source

same than dup

# File cursor.rb, line 59
def  clone(flags = 0)
end
close() click to toggle source

Discards the cursor.

# File cursor.rb, line 14
def  close()
end
count() click to toggle source

Return the count of duplicate

# File cursor.rb, line 22
def  count()
end
current() click to toggle source

Same than get(BDB::CURRENT)

# File cursor.rb, line 30
def  current()
end
del() click to toggle source

Deletes the key/data pair currently referenced by the cursor.

# File cursor.rb, line 38
def  del()
end
delete() click to toggle source

same than del

# File cursor.rb, line 41
def  delete()
end
dup(flags = 0) click to toggle source

Creates new cursor that uses the same transaction and locker ID as the original cursor. This is useful when an application is using locking and requires two or more cursors in the same thread of control.

flags can have the value BDB::DB_POSITION, in this case the newly created cursor is initialized to reference the same position in the database as the original cursor and hold the same locks.

# File cursor.rb, line 56
def  dup(flags = 0)
end
first() click to toggle source

Same than get(BDB::FIRST)

# File cursor.rb, line 70
def  first()
end
get(flags, key = nil, value = nil) click to toggle source

Retrieve key/data pair from the database

See the description of c_get in the Berkeley distribution for the different values of the flags parameter.

key must be given if the flags parameter is BDB::SET | BDB::SET_RANGE | BDB::SET_RECNO

key and value must be specified for BDB::GET_BOTH

# File cursor.rb, line 86
def  get(flags, key = nil, value = nil)
end
last() click to toggle source

Same than get(BDB::LAST)

# File cursor.rb, line 94
def  last()
end
next() click to toggle source

Same than get(BDB::NEXT)

# File cursor.rb, line 102
def  next()
end
pget(flags, key = nil, value = nil) click to toggle source

Retrieve key/primary key/data pair from the database

# File cursor.rb, line 110
def  pget(flags, key = nil, value = nil)
end
prev() click to toggle source

Same than get(BDB::PREV)

# File cursor.rb, line 118
def  prev()
end
put(flags, value) click to toggle source

Stores data value into the database.

See the description of c_put in the Berkeley distribution for the different values of the flags parameter.

# File cursor.rb, line 129
def  put(flags, value)
end
set(key) click to toggle source

Same than get with the flags BDB::SET or BDB::SET_RANGE or BDB::SET_RECNO

# File cursor.rb, line 150
def  set(key)
end
set_range(key) click to toggle source

same than set

# File cursor.rb, line 156
def  set_range(key)
end
set_recno(key) click to toggle source

same than set

# File cursor.rb, line 162
def  set_recno(key)
end