c

package
v0.0.0-...-6f3b9bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package c provides a C interface to Bolt.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor struct {
	C *C.bolt_cursor
}

Cursor represents a wrapper around a Bolt C cursor.

func NewCursor

func NewCursor(b *bolt.Bucket) *Cursor

NewCursor creates a C cursor from a Bucket.

func (*Cursor) First

func (c *Cursor) First() (key, value []byte)

Next moves the cursor to the first element and returns the key and value. Returns a nil key if there are no elements.

func (*Cursor) Next

func (c *Cursor) Next() (key, value []byte)

Next moves the cursor to the next element and returns the key and value. Returns a nil key if there are no more key/value pairs.

func (*Cursor) Seek

func (c *Cursor) Seek(seek []byte) (key, value []byte, flags int)

Seek moves the cursor to a given key and returns it. If the key does not exist then the next key is used. If no keys follow, an empty value is returned.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL