dbhelpers

package
v0.0.0-...-e1ec090 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeForILike

func EscapeForILike(term string) string

func InsertManyAlbumCounts

func InsertManyAlbumCounts(albumCounts []db.AlbumCount, itemsPerChunk float64) ([]db.AlbumCount, error)

func InsertManyAlbums

func InsertManyAlbums(albums []db.Album, itemsPerChunk float64) ([]db.Album, error)

InsertManyAlbums takes an input of a slice of albums, and inserts them in chunks so as to not hit the postgres stack limit

func InsertManyArtistCounts

func InsertManyArtistCounts(artistCounts []db.ArtistCount, itemsPerChunk float64) ([]db.ArtistCount, error)

InsertManyArtistCounts takes an input of a slice of artistCounts, and inserts them in chunks so as to not hit the postgres stack limit

func InsertManyArtists

func InsertManyArtists(artists []db.Artist, itemsPerChunk float64) ([]db.Artist, error)

InsertManyArtists takes an input of a slice of artists, and inserts them in chunks so as to not hit the postgres stack limit

func InsertManyPlays

func InsertManyPlays(plays []db.Scrobble, itemsPerChunk float64) ([]db.Scrobble, error)

func InsertManyRateYourMusicAlbumAlbums

func InsertManyRateYourMusicAlbumAlbums(albumAlbums []db.RateYourMusicAlbumAlbum, itemsPerChunk float64) ([]db.RateYourMusicAlbumAlbum, error)

func InsertManyRateYourMusicAlbums

func InsertManyRateYourMusicAlbums(rateYourMusicAlbums []db.RateYourMusicAlbum, itemsPerChunk float64) ([]db.RateYourMusicAlbum, error)

func InsertManyRatings

func InsertManyRatings(ratings []db.Rating, itemsPerChunk float64) ([]db.Rating, error)

func InsertManyTags

func InsertManyTags(tags []db.Tag, itemsPerChunk float64) ([]db.Tag, error)

func InsertManyTrackCounts

func InsertManyTrackCounts(trackCounts []db.TrackCount, itemsPerChunk float64) ([]db.TrackCount, error)

func InsertManyTracks

func InsertManyTracks(tracks []db.Track, itemsPerChunk float64) ([]db.Track, error)

InsertManyTracks takes an input of a slice of tracks, and inserts them in chunks so as to not hit the postgres stack limit

func InsertUniqueArtistTags

func InsertUniqueArtistTags(artistTags []db.ArtistTag) error

func SelectAlbumCountsWhereInMany

func SelectAlbumCountsWhereInMany(albumIDs []interface{}, userID int64, itemsPerChunk float64) ([]db.AlbumCount, error)

func SelectAlbumsWhereInMany

func SelectAlbumsWhereInMany(albums []interface{}, itemsPerChunk float64) ([]db.Album, error)

func SelectArtistCountsWhereInMany

func SelectArtistCountsWhereInMany(artistIDs []interface{}, userID int64, itemsPerChunk float64) ([]db.ArtistCount, error)

func SelectArtistsWhereInMany

func SelectArtistsWhereInMany(artists []string, itemsPerChunk float64) ([]db.Artist, error)

func SelectRateYourMusicAlbumsWhereInMany

func SelectRateYourMusicAlbumsWhereInMany(rymsAlbumIDs []interface{}, itemsPerChunk float64) ([]db.RateYourMusicAlbum, error)

func SelectRatingsWhereInMany

func SelectRatingsWhereInMany(rymsAlbumIDs []interface{}, userID int64, itemsPerChunk float64) ([]db.Rating, error)

func SelectTagsWhereInMany

func SelectTagsWhereInMany(tags []string, itemsPerChunk float64) ([]db.Tag, error)

func SelectTrackCountsWhereInMany

func SelectTrackCountsWhereInMany(trackIDs []interface{}, userID int64, itemsPerChunk float64) ([]db.TrackCount, error)

func SelectTracksWhereInMany

func SelectTracksWhereInMany(tracks []interface{}, itemsPerChunk float64) ([]db.Track, error)

func SelectUsersWhereInMany

func SelectUsersWhereInMany(userIDs []int64, itemsPerChunk float64) ([]db.User, error)

func UpdateManyAlbumCounts

func UpdateManyAlbumCounts(albumCounts []db.AlbumCount, itemsPerChunk float64) ([]db.AlbumCount, error)

func UpdateManyArtistCounts

func UpdateManyArtistCounts(artistCounts []db.ArtistCount, itemsPerChunk float64) ([]db.ArtistCount, error)

func UpdateManyArtistsToBeChecked

func UpdateManyArtistsToBeChecked(artistNames []string, itemsPerChunk float64) error

func UpdateManyRateYourMusicAlbums

func UpdateManyRateYourMusicAlbums(albums []db.RateYourMusicAlbum, itemsPerChunk float64) ([]db.RateYourMusicAlbum, error)

func UpdateManyRatings

func UpdateManyRatings(ratings []db.Rating, itemsPerChunk float64) ([]db.Rating, error)

func UpdateManyTrackCounts

func UpdateManyTrackCounts(trackCounts []db.TrackCount, itemsPerChunk float64) ([]db.TrackCount, error)

Types

type AlbumCountsMap

type AlbumCountsMap = map[int64]db.AlbumCount

func UpdateOrCreateManyAlbumCounts

func UpdateOrCreateManyAlbumCounts(albumCounts []db.AlbumCount, userID int64) (AlbumCountsMap, error)

type ArtistCountsMap

type ArtistCountsMap = map[int64]db.ArtistCount

func UpdateOrCreateManyArtistCounts

func UpdateOrCreateManyArtistCounts(artistCounts []db.ArtistCount, userID int64) (ArtistCountsMap, error)

type RatingsMap

type RatingsMap = map[int64]db.Rating

func UpdateOrCreateManyRatings

func UpdateOrCreateManyRatings(ratings []db.Rating, userID int64) (RatingsMap, error)

type TrackCountsMap

type TrackCountsMap = map[int64]db.TrackCount

func UpdateOrCreateManyTrackCounts

func UpdateOrCreateManyTrackCounts(trackCounts []db.TrackCount, userID int64) (TrackCountsMap, error)

Jump to

Keyboard shortcuts

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