In Files

Parent

KyotoCabinet::Cursor

Interface of cursor to indicate a record.

Public Instance Methods

accept(visitor, writable = true, step = false) click to toggle source

Accept a visitor to the current record.

  • @param visitor a visitor object which implements the Visitor interface. If it is omitted, the block parameter is evaluated.

  • @param writable true for writable operation, or false for read-only operation.

  • @param step true to move the cursor to the next record, or false for no move.

  • @block If it is specified, the block is called as the visitor.

  • @return true on success, or false on failure.

  • @note The operation for each record is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this method.

# File kyotocabinet.rb, line 195
def accept(visitor, writable = true, step = false)
  # (native code)
end
db() click to toggle source

Get the database object.

  • @return the database object.

# File kyotocabinet.rb, line 264
def db()
  # (native code)
end
disable() click to toggle source

Disable the cursor.

  • @return always nil.

  • @note This method should be called explicitly when the cursor is no longer in use.

# File kyotocabinet.rb, line 185
def disable()
  # (native code)
end
error() click to toggle source

Get the last happened error.

  • @return the last happened error.

# File kyotocabinet.rb, line 269
def error()
  # (native code)
end
get(step = false) click to toggle source

Get a pair of the key and the value of the current record.

  • @param step true to move the cursor to the next record, or false for no move.

  • @return a pair of the key and the value of the current record, or nil on failure.

  • @note If the cursor is invalidated, nil is returned.

# File kyotocabinet.rb, line 229
def get(step = false)
  # (native code)
end
get_key(step = false) click to toggle source

Get the key of the current record.

  • @param step true to move the cursor to the next record, or false for no move.

  • @return the key of the current record, or nil on failure.

  • @note If the cursor is invalidated, nil is returned.

# File kyotocabinet.rb, line 215
def get_key(step = false)
  # (native code)
end
get_value(step = false) click to toggle source

Get the value of the current record.

  • @param step true to move the cursor to the next record, or false for no move.

  • @return the value of the current record, or nil on failure.

  • @note If the cursor is invalidated, nil is returned.

# File kyotocabinet.rb, line 222
def get_value(step = false)
  # (native code)
end
inspect() click to toggle source

Get the inspection string.

  • @return the inspection string.

# File kyotocabinet.rb, line 279
def inspect()
  # (native code)
end
jump(key = nil) click to toggle source

Jump the cursor to a record for forward scan.

  • @param key the key of the destination record. If it is nil, the destination is the first record.

  • @return true on success, or false on failure.

# File kyotocabinet.rb, line 241
def jump(key = nil)
  # (native code)
end
jump_back(key = nil) click to toggle source

Jump the cursor to a record for backward scan.

  • @param key the key of the destination record. If it is nil, the destination is the last record.

  • @return true on success, or false on failure.

  • @note This method is dedicated to tree databases. Some database types, especially hash databases, will provide a dummy implementation.

# File kyotocabinet.rb, line 248
def jump_back(key = nil)
  # (native code)
end
remove() click to toggle source

Remove the current record.

  • @return true on success, or false on failure.

  • @note If no record corresponds to the key, false is returned. The cursor is moved to the next record implicitly.

# File kyotocabinet.rb, line 208
def remove()
  # (native code)
end
seize() click to toggle source

Get a pair of the key and the value of the current record and remove it atomically.

  • @return a pair of the key and the value of the current record, or nil on failure.

  • @note If the cursor is invalidated, nil is returned. The cursor is moved to the next record implicitly.

# File kyotocabinet.rb, line 235
def seize()
  # (native code)
end
set_value(value, step = false) click to toggle source

Set the value of the current record.

  • @param value the value.

  • @param step true to move the cursor to the next record, or false for no move.

  • @return true on success, or false on failure.

# File kyotocabinet.rb, line 202
def set_value(value, step = false)
  # (native code)
end
step() click to toggle source

Step the cursor to the next record.

  • @return true on success, or false on failure.

# File kyotocabinet.rb, line 253
def step()
  # (native code)
end
step_back() click to toggle source

Step the cursor to the previous record.

  • @return true on success, or false on failure.

  • @note This method is dedicated to tree databases. Some database types, especially hash databases, may provide a dummy implementation.

# File kyotocabinet.rb, line 259
def step_back()
  # (native code)
end
to_s() click to toggle source

Get the string expression.

  • @return the string expression.

# File kyotocabinet.rb, line 274
def to_s()
  # (native code)
end

Generated with the Darkfish Rdoc Generator 2.