for_sqlite

package
v0.0.0-...-c6def04 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package for_sqlite provides a sqlite implementation of interfaces in vsafedb package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func ConnNew

func ConnNew(tx *sql.Tx) Store

ConnNew creates a sqlite implementation of the vsafe app datastore from a sqlite connection instance.

func New

func New(db *sqlite3_db.Db) Store

New creates a sqlite implementation of the vsafe app datastore.

func (Store) AddCategory

func (s Store) AddCategory(
	t db.Transaction, category *vsafe.Category) error

func (Store) AddEntry

func (s Store) AddEntry(
	t db.Transaction, entry *vsafe.Entry) error

func (Store) AddUser

func (s Store) AddUser(
	t db.Transaction, user *vsafe.User) error

func (Store) CategoriesByOwner

func (s Store) CategoriesByOwner(
	t db.Transaction, owner int64) ([]vsafe.Category, error)

func (Store) CategoryById

func (s Store) CategoryById(
	t db.Transaction, id int64, category *vsafe.Category) error

func (Store) EntriesByOwner

func (s Store) EntriesByOwner(
	t db.Transaction,
	owner int64,
	consumer consume2.Consumer[vsafe.Entry]) error

func (Store) EntryById

func (s Store) EntryById(
	t db.Transaction, id int64, entry *vsafe.Entry) error

func (Store) RemoveCategory

func (s Store) RemoveCategory(t db.Transaction, id int64) error

func (Store) RemoveEntry

func (s Store) RemoveEntry(t db.Transaction, id, owner int64) error

func (Store) RemoveUser

func (s Store) RemoveUser(
	t db.Transaction, name string) error

func (Store) UpdateCategory

func (s Store) UpdateCategory(t db.Transaction, category *vsafe.Category) error

func (Store) UpdateEntry

func (s Store) UpdateEntry(t db.Transaction, entry *vsafe.Entry) error

func (Store) UpdateUser

func (s Store) UpdateUser(
	t db.Transaction, user *vsafe.User) error

func (Store) UserById

func (s Store) UserById(
	t db.Transaction, id int64, user *vsafe.User) error

func (Store) UserByName

func (s Store) UserByName(
	t db.Transaction, name string, user *vsafe.User) error

func (Store) Users

func (s Store) Users(
	t db.Transaction, consumer consume2.Consumer[vsafe.User]) error

Jump to

Keyboard shortcuts

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