store

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSQLite

func NewSQLite(dbFilePath string, requiredVer uint) (*sql.DB, error)

NewSQLite opens new SQLite database.

Types

type SQLiteStore

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

SQLiteStore is a SQLite implementation of the Store interface.

func NewSQLiteStore

func NewSQLiteStore(db *sql.DB) *SQLiteStore

NewSQLiteStore creates a new SQLiteStore instance.

func (*SQLiteStore) Begin

func (s *SQLiteStore) Begin(ctx context.Context) (domain.Store, error)

Begin returns a new SQLiteStore within a transaction

func (*SQLiteStore) Close

func (s *SQLiteStore) Close()

Close closes the database connection.

func (*SQLiteStore) Commit

func (s *SQLiteStore) Commit() error

Commit commits the transaction.

func (*SQLiteStore) EpisodeCount added in v1.0.0

func (s *SQLiteStore) EpisodeCount(ctx context.Context) (int, error)

EpisodeCount returns the total count of episodes in the store.

func (*SQLiteStore) EpisodeCreate

func (s *SQLiteStore) EpisodeCreate(ctx context.Context, episode *domain.Episode) error

EpisodeCreate creates a new episode in the store.

func (*SQLiteStore) EpisodeDelete added in v1.1.0

func (s *SQLiteStore) EpisodeDelete(ctx context.Context, id int64) error

EpisodeDelete deletes an episode from the store.

func (*SQLiteStore) EpisodeGet added in v1.0.0

func (s *SQLiteStore) EpisodeGet(ctx context.Context, pageSize, pageNumber int) ([]*domain.Episode, error)

EpisodeGet returns all episodes from the store in descending order by creation date. Supports pagination via pageSize and pageNumber parameters. Zero values for pageSize and pageNumber will return all episodes without pagination.

func (*SQLiteStore) EpisodeGetByUrl added in v1.0.0

func (s *SQLiteStore) EpisodeGetByUrl(ctx context.Context, url string) ([]*domain.Episode, error)

EpisodeGetByUrl returns episodes matching the given original or canonical URL.

func (*SQLiteStore) EpisodeGetOldest added in v1.1.0

func (s *SQLiteStore) EpisodeGetOldest(ctx context.Context, limit int) ([]*domain.Episode, error)

EpisodeGetOldest returns the oldest episodes from the store.

func (*SQLiteStore) Rollback

func (s *SQLiteStore) Rollback() error

Rollback aborts the transaction.

Jump to

Keyboard shortcuts

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