sqlite

package
v0.0.0-...-a56ea5b Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataSource

func NewDataSource(pool *Pool) *datasource

Types

type Pool

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

func CreatePool

func CreatePool(ctx context.Context, uri string) (*Pool, error)

func (*Pool) Close

func (p *Pool) Close(ctx context.Context) error

func (*Pool) Conn

func (p *Pool) Conn(ctx context.Context) (*sqlite.Conn, func(), error)

type TransactionRepository

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

func (*TransactionRepository) Create

func (r *TransactionRepository) Create(ctx context.Context, transactions []beans.Transaction) error

func (*TransactionRepository) Delete

func (r *TransactionRepository) Delete(ctx context.Context, budgetID beans.ID, transactionIDs []beans.ID) error

func (*TransactionRepository) Get

func (r *TransactionRepository) Get(ctx context.Context, budgetID beans.ID, id beans.ID) (beans.Transaction, error)

func (*TransactionRepository) GetActivityByCategory

func (r *TransactionRepository) GetActivityByCategory(ctx context.Context, budgetID beans.ID, from beans.Date, to beans.Date) (map[beans.ID]beans.Amount, error)

func (*TransactionRepository) GetForBudget

func (r *TransactionRepository) GetForBudget(ctx context.Context, budgetID beans.ID) ([]beans.TransactionWithRelations, error)

func (*TransactionRepository) GetIncomeBetween

func (r *TransactionRepository) GetIncomeBetween(ctx context.Context, budgetID beans.ID, begin beans.Date, end beans.Date) (beans.Amount, error)

func (*TransactionRepository) GetSplits

func (r *TransactionRepository) GetSplits(ctx context.Context, budgetID beans.ID, transactionID beans.ID) ([]beans.TransactionAsSplit, error)

func (*TransactionRepository) GetWithRelations

func (r *TransactionRepository) GetWithRelations(ctx context.Context, budgetID beans.ID, id beans.ID) (beans.TransactionWithRelations, error)

func (*TransactionRepository) Update

func (r *TransactionRepository) Update(ctx context.Context, transactions []beans.Transaction) error

type Tx

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

func (*Tx) Commit

func (t *Tx) Commit(ctx context.Context) error

func (*Tx) Rollback

func (t *Tx) Rollback(ctx context.Context) error

Jump to

Keyboard shortcuts

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