sqlite

package
v0.0.0-...-83ee204 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSQLiteDB

func NewSQLiteDB(file string) (*sql.DB, error)

Types

type IndexedStore

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

func NewIndexedStore

func NewIndexedStore(db *sql.DB) *IndexedStore

func (*IndexedStore) DumpVideos

func (s *IndexedStore) DumpVideos(ctx context.Context, where, orderby string) chu.ReadChan[entity.Video]

func (*IndexedStore) Prepare

func (s *IndexedStore) Prepare(ctx context.Context) error

func (*IndexedStore) WriteVideos

func (s *IndexedStore) WriteVideos(ctx context.Context, videos []entity.Video) error

type RawStore

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

func NewRawStore

func NewRawStore(db *sql.DB) *RawStore

func (*RawStore) CountVideos

func (s *RawStore) CountVideos(ctx context.Context, ids []string) (int, error)

func (*RawStore) DumpChannels

func (s *RawStore) DumpChannels(ctx context.Context) chu.ReadChan[*youtube.Channel]

func (*RawStore) DumpVideos

func (s *RawStore) DumpVideos(ctx context.Context) chu.ReadChan[*youtube.SearchResult]

func (*RawStore) ListChannelIDs

func (s *RawStore) ListChannelIDs(ctx context.Context, channelIDs []string) ([]string, error)

func (*RawStore) Prepare

func (s *RawStore) Prepare(ctx context.Context) error

func (*RawStore) WriteChannels

func (s *RawStore) WriteChannels(ctx context.Context, fetchedAt time.Time, channels []*youtube.Channel) error

func (*RawStore) WriteVideos

func (s *RawStore) WriteVideos(ctx context.Context, videos []*youtube.SearchResult) error

Jump to

Keyboard shortcuts

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