sqlite

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBStorage

type DBStorage struct {
	Path string
}

func (*DBStorage) Close

func (d *DBStorage) Close()

func (*DBStorage) Create

func (d *DBStorage) Create(item *search.ExternalResultItem, additionalIndexKey *indexing.Key) error

func (*DBStorage) CreateWithId

func (d *DBStorage) CreateWithId(keyParts *indexing.Key, tr *search.ExternalResultItem, uniqueIndexKeys *indexing.Key) error

CreateWithId a new result record. In sqlite we're not using the key parts.

func (*DBStorage) Find

func (d *DBStorage) Find(query indexing.Query, matchingItem *search.ExternalResultItem) error

func (*DBStorage) FindById

func (d *DBStorage) FindById(id string) *search.ExternalResultItem

Find a result by it's id

func (*DBStorage) FindByNameAndIndex

func (d *DBStorage) FindByNameAndIndex(title string, indexerSite string) *search.ExternalResultItem

FindByNameAndIndex finds an item by it's name and index.

func (*DBStorage) GetCategories

func (d *DBStorage) GetCategories() []db.TorrentCategory

func (*DBStorage) GetDb

func (d *DBStorage) GetDb() *gorm.DB

func (*DBStorage) GetNewest

func (d *DBStorage) GetNewest(cnt int) []search.ExternalResultItem

GetNewest gets the CNT latest results.

func (*DBStorage) GetOlderThanHours

func (d *DBStorage) GetOlderThanHours(h int) []search.ExternalResultItem

func (*DBStorage) GetTorrentsInCategories

func (d *DBStorage) GetTorrentsInCategories(ids []int) []search.ExternalResultItem

func (*DBStorage) Size

func (d *DBStorage) Size() int64

func (*DBStorage) Truncate

func (d *DBStorage) Truncate()

func (*DBStorage) Update

func (d *DBStorage) Update(query indexing.Query, item *search.ExternalResultItem) error

Update a result with a matching keyParts.

func (*DBStorage) UpdateResult

func (d *DBStorage) UpdateResult(id uint, torrent *search.ExternalResultItem)

Jump to

Keyboard shortcuts

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