database

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SQLITE_DB_DROP = `` /* 255-byte string literal not displayed */
View Source
const SQLITE_DB_INIT = `` /* 3010-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*sql.DB
	// contains filtered or unexported fields
}

func NewDB

func NewDB(dsn string) *DB

==================================

func (*DB) AuthorBookSeries

func (db *DB) AuthorBookSeries(id int64) []*model.Serie

func (*DB) AuthorByID

func (db *DB) AuthorByID(id int64) *model.Author

func (*DB) AuthorsByBookId

func (db *DB) AuthorsByBookId(bookId int64) []*model.Author

func (*DB) CountGenreBooks

func (db *DB) CountGenreBooks(genreCode string) int64

func (*DB) DropDB

func (db *DB) DropDB()

func (*DB) FindAuthor

func (db *DB) FindAuthor(a *model.Author) int64

func (*DB) FindBook

func (db *DB) FindBook(b *model.Book) int64

func (*DB) FindBookById

func (db *DB) FindBookById(id int64) *model.Book

func (*DB) FindLanguage

func (db *DB) FindLanguage(l *model.Language) int64

func (*DB) FindSerie

func (db *DB) FindSerie(s *model.Serie) int64

func (*DB) InitDB

func (db *DB) InitDB()

func (*DB) IsArchiveInStock added in v1.1.0

func (db *DB) IsArchiveInStock(archive string) bool

func (*DB) IsFileInStock added in v1.1.0

func (db *DB) IsFileInStock(file string, crc32 uint32) bool

func (*DB) IsReady

func (db *DB) IsReady() bool

func (*DB) ListAuthorBooks

func (db *DB) ListAuthorBooks(authorId, serieId int64, limit, offset int) []*model.Book

func (*DB) ListAuthorWithTotals

func (db *DB) ListAuthorWithTotals(prefix string) []*model.Author

func (*DB) ListAuthors

func (db *DB) ListAuthors(prefix, abc string) []*model.Author

func (*DB) ListGenreBooks

func (db *DB) ListGenreBooks(genreCode string, limit, offset int) []*model.Book

func (*DB) ListSerieBooks

func (db *DB) ListSerieBooks(id int64, limit, offset int) []*model.Book

func (*DB) ListSeries

func (db *DB) ListSeries(prefix, lang, abc string) []*model.Serie

func (*DB) ListSeriesWithTotals

func (db *DB) ListSeriesWithTotals(prefix, lang string) []*model.Serie

func (*DB) NewAuthor

func (db *DB) NewAuthor(a *model.Author) int64

Authors

func (*DB) NewBook

func (db *DB) NewBook(b *model.Book) int64

Books

func (*DB) NewLanguage

func (db *DB) NewLanguage(l *model.Language) int64

Languages

func (*DB) NewSerie

func (db *DB) NewSerie(s *model.Serie) int64

Series

func (*DB) PageFoundAuthors

func (db *DB) PageFoundAuthors(pattern string, limit, offset int) []*model.Author

func (*DB) PageFoundBooks

func (db *DB) PageFoundBooks(pattern string, limit, offset int) []*model.Book

func (*DB) SearchAuthorsCount

func (db *DB) SearchAuthorsCount(pattern string) int64

func (*DB) SearchBooksCount

func (db *DB) SearchBooksCount(pattern string) int64

Search

func (*DB) SerieByID

func (db *DB) SerieByID(id int64) *model.Serie

Jump to

Keyboard shortcuts

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