db

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func Connect

func Connect(cfg *config.Config) (*DB, error)

func (*DB) AddPhotoToAlbum added in v1.1.3

func (db *DB) AddPhotoToAlbum(photoID, albumID string) error

AddPhotoToAlbum adds a photo to an album without removing existing memberships.

func (*DB) Driver

func (db *DB) Driver() string

func (*DB) GetAlbums

func (db *DB) GetAlbums() ([]models.Album, error)

func (*DB) GetAlbumsWithPhotoCounts

func (db *DB) GetAlbumsWithPhotoCounts() ([]models.AlbumWithPhotoCount, error)

func (*DB) GetPhotoByID

func (db *DB) GetPhotoByID(id string) (*models.PhotoWithSizeVariants, error)

func (*DB) GetPhotosNeedingMetadata

func (db *DB) GetPhotosNeedingMetadata(albumID *string, limit, offset int) ([]models.PhotoWithSizeVariants, error)

func (*DB) Health

func (db *DB) Health() error

func (*DB) UpdatePhoto

func (db *DB) UpdatePhoto(id string, update models.PhotoUpdate) error

Jump to

Keyboard shortcuts

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