sqlindex

package
v0.0.0-...-825e40b Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2013 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	DB *sql.DB

	// SetFunc is an optional func to use when REPLACE INTO does not exist
	SetFunc      func(*sql.DB, string, string) error
	BatchSetFunc func(*sql.Tx, string, string) error

	// PlaceHolderFunc optionally replaces ? placeholders with the right ones for the rdbms
	// in use
	PlaceHolderFunc func(string) string
}

func (*Storage) BeginBatch

func (s *Storage) BeginBatch() index.BatchMutation

func (*Storage) CommitBatch

func (s *Storage) CommitBatch(b index.BatchMutation) error

func (*Storage) Delete

func (s *Storage) Delete(key string) error

func (*Storage) Find

func (s *Storage) Find(key string) index.Iterator

func (*Storage) Get

func (s *Storage) Get(key string) (value string, err error)

func (*Storage) Set

func (s *Storage) Set(key, value string) error

Jump to

Keyboard shortcuts

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