sqlite

package
v0.0.0-...-4406380 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotAtStorageLevel = errors.New("not implemented at storage level")

ErrNotAtStorageLevel marks methods that are not to be called at storage level

Functions

func CreateIndex

func CreateIndex(ctx context.Context, db *sql.DB, tblName string) error

func CreateTable

func CreateTable(ctx context.Context, db *sql.DB, tblName string) error

Types

type Storage

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

func New

func New(tblName, path string) (*Storage, error)

New returns a new sqlite file-backed Storage

func (*Storage) Destroy

func (s *Storage) Destroy(ctx context.Context) error

Destroy closes the store

func (*Storage) FindPartition

func (s *Storage) FindPartition(tblName, rowKey string) int

func (*Storage) Get

func (s *Storage) Get(ctx context.Context, tblName, rowKey, columnKey string, refKey int64) (cell models.Cell, found bool, err error)

func (*Storage) GetDB

func (s *Storage) GetDB() *sql.DB

func (*Storage) GetLatest

func (s *Storage) GetLatest(ctx context.Context, tblName, rowKey, columnKey string) (cell models.Cell, found bool, err error)

func (*Storage) PartitionRead

func (s *Storage) PartitionRead(ctx context.Context, tblName string, partitionNumber int, location string, value int64, limit int) (cells []models.Cell, found bool, err error)

func (*Storage) Put

func (s *Storage) Put(ctx context.Context, tblName, rowKey, columnKey string, refKey int64, body string) (err error)

func (*Storage) ResetConnection

func (s *Storage) ResetConnection(ctx context.Context, key string) error

ResetConnection closes the store.

Jump to

Keyboard shortcuts

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