Documentation ¶
Index ¶
- type Storage
- func (s *Storage) BeginBatch() index.BatchMutation
- func (s *Storage) CommitBatch(b index.BatchMutation) error
- func (s *Storage) Delete(key string) error
- func (s *Storage) Find(key string) index.Iterator
- func (s *Storage) Get(key string) (value string, err error)
- func (s *Storage) Set(key, value string) error
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 // Serial determines whether a Go-level mutex protects DB from // concurrent access. This isn't perfect and exists just for // SQLite, whose driver likes to return "the database is // locked" (camlistore.org/issue/114), so this keeps some // pressure off. But we still trust SQLite to deal with // concurrency in most cases. Serial bool // contains filtered or unexported fields }
func (*Storage) BeginBatch ¶
func (s *Storage) BeginBatch() index.BatchMutation
func (*Storage) CommitBatch ¶
func (s *Storage) CommitBatch(b index.BatchMutation) error
Click to show internal directories.
Click to hide internal directories.