for_sqlite

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package for_sqlite stores types in categories package in a sqlite database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func New

func New(db *sqlite_db.Db) *Cache

func (*Cache) AccountAdd

func (c *Cache) AccountAdd(t db.Transaction, name string) (
	cds categories.CatDetailStore, newId int64, err error)

func (*Cache) AccountRemove

func (c *Cache) AccountRemove(t db.Transaction, id int64) (
	cds categories.CatDetailStore, err error)

func (*Cache) AccountRename

func (c *Cache) AccountRename(t db.Transaction, id int64, name string) (
	cds categories.CatDetailStore, err error)

func (*Cache) Add

func (c *Cache) Add(t db.Transaction, name string) (
	cds categories.CatDetailStore, newId fin.Cat, err error)

func (*Cache) Get

func (c *Cache) Get(t db.Transaction) (
	cds categories.CatDetailStore, err error)

func (*Cache) Invalidate

func (c *Cache) Invalidate(t db.Transaction) error

func (*Cache) Purge

func (c *Cache) Purge(t db.Transaction, cats fin.CatSet) error

func (*Cache) Remove

func (c *Cache) Remove(t db.Transaction, id fin.Cat) (
	cds categories.CatDetailStore, err error)

func (*Cache) Rename

func (c *Cache) Rename(t db.Transaction, id fin.Cat, newName string) (
	cds categories.CatDetailStore, err error)

type ReadOnlyCache

type ReadOnlyCache struct {
	categoriesdb.NoPermissionCache
	// contains filtered or unexported fields
}

The writing methods of ReadOnlyCache merely return categoriesdb.NoPermission error along with the contents of the cache. If nothing is in the cache, they read from the database.

func ReadOnlyWrapper

func ReadOnlyWrapper(c *Cache) ReadOnlyCache

func (ReadOnlyCache) AccountAdd

func (c ReadOnlyCache) AccountAdd(t db.Transaction, name string) (
	cds categories.CatDetailStore, newId int64, err error)

func (ReadOnlyCache) AccountRemove

func (c ReadOnlyCache) AccountRemove(t db.Transaction, id int64) (
	cds categories.CatDetailStore, err error)

func (ReadOnlyCache) AccountRename

func (c ReadOnlyCache) AccountRename(t db.Transaction, id int64, name string) (
	cds categories.CatDetailStore, err error)

func (ReadOnlyCache) Add

func (c ReadOnlyCache) Add(t db.Transaction, name string) (
	cds categories.CatDetailStore, newId fin.Cat, err error)

func (ReadOnlyCache) Get

func (ReadOnlyCache) Remove

func (c ReadOnlyCache) Remove(t db.Transaction, id fin.Cat) (
	cds categories.CatDetailStore, err error)

func (ReadOnlyCache) Rename

func (c ReadOnlyCache) Rename(
	t db.Transaction, id fin.Cat, newName string) (
	cds categories.CatDetailStore, err error)

Jump to

Keyboard shortcuts

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