sqlite

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 14 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 {
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(dbPath string, migrateTables bool) *Storage

func (Storage) CreateAssociation

func (storage Storage) CreateAssociation(ctx context.Context, conditions storage.CreateAssociationConditions) error

func (Storage) CreateCard

func (storage Storage) CreateCard(ctx context.Context, card protomodels.Card) error

upsert to logs NewCards++

func (Storage) DeleteCard

func (storage Storage) DeleteCard(ctx context.Context, cardIndex protomodels.CardIndex) error

func (Storage) GetAssociations

func (storage Storage) GetAssociations(ctx context.Context, cardIndex protomodels.CardIndex) (protomodels.RelatedCards, error)

func (Storage) GetLog

func (storage Storage) GetLog(ctx context.Context, date time.Time) (protomodels.Log, error)

func (Storage) ListCardIndices

func (storage Storage) ListCardIndices(ctx context.Context) ([]protomodels.CardIndex, error)

func (Storage) ListCards

func (storage Storage) ListCards(ctx context.Context, req storage.ListCardsRequest) ([]protomodels.Card, error)

func (Storage) ListLogs

func (storage Storage) ListLogs(ctx context.Context, from time.Time, until time.Time) ([]protomodels.Log, error)

func (Storage) ReviewCard

func (storage Storage) ReviewCard(ctx context.Context, cardIndex protomodels.CardIndex) error

upsert to logs ReviewedCards++ update card review date

func (Storage) UpdateCard

func (storage Storage) UpdateCard(ctx context.Context, card protomodels.Card) error

zero values will NOT been updated

Jump to

Keyboard shortcuts

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