sqlite

package
v0.0.0-...-a2e4898 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore(path string) (core.Store, error)

Types

type SqliteStore

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

func (SqliteStore) Close

func (s SqliteStore) Close() error

func (SqliteStore) GetAllTasks

func (s SqliteStore) GetAllTasks(context context.Context) (models.List, error)

func (SqliteStore) InitDB

func (s SqliteStore) InitDB() error

func (SqliteStore) PomodoroDeleteByTaskID

func (s SqliteStore) PomodoroDeleteByTaskID(context context.Context, taskID int) error

func (SqliteStore) PomodoroGetByTaskID

func (s SqliteStore) PomodoroGetByTaskID(context context.Context, taskID int) ([]*models.Pomodoro, error)

func (SqliteStore) PomodoroSave

func (s SqliteStore) PomodoroSave(context context.Context, taskID int, pomodoro *models.Pomodoro) error

func (SqliteStore) TaskDeleteByID

func (s SqliteStore) TaskDeleteByID(context context.Context, taskID int) error

func (SqliteStore) TaskGetByID

func (s SqliteStore) TaskGetByID(context context.Context, taskID int) (*models.Task, error)

func (SqliteStore) TaskSave

func (s SqliteStore) TaskSave(context context.Context, task *models.Task) (int, error)

func (SqliteStore) With

func (s SqliteStore) With(fns ...func(tx *sql.Tx) error) error

With applies all of the given functions with a single transaction, rolling back on failure and commiting on success.

type SqliteStoreFunc

type SqliteStoreFunc func(tx *sql.Tx) error

Jump to

Keyboard shortcuts

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