s3

package
v0.0.0-...-9648343 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoResult = errors.New("No result")

Functions

This section is empty.

Types

type Column

type Column struct {
	Name  string
	Value string
}

type S3

type S3 struct {
	*sqlite3.Conn
	// contains filtered or unexported fields
}

S3 is a sqlite3-based key/value database.

func New

func New(dbname string) (*S3, error)

New creates a new key/value database.

func (*S3) Close

func (s *S3) Close()

Close closes the database.

func (*S3) Get

func (s *S3) Get(key string) ([]byte, error)

Get returns the marshalled value without interpretation.

func (*S3) Locked

func (s *S3) Locked(f func())

func (*S3) LockedScanner

func (s *S3) LockedScanner(f func(s *Scanner) error) error

func (*S3) LockedTransaction

func (s *S3) LockedTransaction(f func() error) (err error)

func (*S3) MustExec

func (s *S3) MustExec(sql string)

Exec executes a raw SQL statement.

func (*S3) Set

func (s *S3) Set(key string, v []byte) error

Set sets the given key/value pair without marshalling the value.

func (*S3) Unset

func (s *S3) Unset(key string) error

Unset removes the given key, if it was set. If the key was not set, no error is returned.

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

func (*Scanner) Close

func (s *Scanner) Close()

func (*Scanner) Prepare

func (s *Scanner) Prepare(query string, args ...interface{}) error

func (*Scanner) Scan

func (s *Scanner) Scan(args ...interface{}) error

func (*Scanner) ScanDebug

func (s *Scanner) ScanDebug() ([]Column, error)

type Stmt

type Stmt = sqlite3.Stmt

Jump to

Keyboard shortcuts

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