package shakuhachi

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Collection.ArtistSource

Operations on artists

Sourceval kquery : accept_empty:bool -> t -> SkhcDb.Database.t -> SkhcQuery.Node.t SkhcQuery.Query.t option -> (((SkhcDb.Artist.t * string SkhcDb.Ids.Map.t * SkhcDb.Artist.Stats.t) list, Sqlite3.Rc.t * string) result -> 'a) -> 'a

kquery ~accept_empty collection database query k tries to filter artists within database that matches query. The result is then given to k.

If query is None, no album is matched unless accept_empty, in this case, all albums are matched.

  • since 0.4.0
Sourceval query : accept_empty:bool -> t -> SkhcDb.Database.t -> SkhcQuery.Node.t SkhcQuery.Query.t option -> ((SkhcDb.Artist.t * string SkhcDb.Ids.Map.t * SkhcDb.Artist.Stats.t) list, Sqlite3.Rc.t * string) result

query ~accept_empty collection database query is Skhclibs.Collection.Artist.kquery with k being the identity function.

  • since 0.4.0
Sourceval set_rating : t -> SkhcDb.Database.t -> SkhcDb.Artist.t -> int option -> (SkhcDb.Artist.t, Sqlite3.Rc.t * string) result

set_rating collection database artist rating sets artist rating to rating. if SkhcDb.Artist.rating artist = rating, returns artist as is. Otherwise, call SkhcDb.Artist.update.

Sourceval sort : (bool * ('a, 'b, 'c, 'd, 'e) SkhcQuery.Field.t) list -> (SkhcDb.Artist.t * 'f * SkhcDb.Artist.Stats.t) list -> (SkhcDb.Artist.t * 'f * SkhcDb.Artist.Stats.t) list

sort keys artists is SkhcQuery.Query.sort_with_keys with SkhcQuery.Query.compare_artist_key.

  • since 0.3.1
  • before 0.4.0,

    only artist was compared.

set_flag collection database artist sets flag to true. if artist has already flag set to true, this functions returns artist as is. Otherwise, it calls SkhcDb.Artist.update.

unset_flag collection database artist sets flag to false. if artist has already flag set to false, this functions returns artist as is. Otherwise, it calls SkhcDb.Artist.update.

Sourceval artwork : t -> SkhcDb.Artist.t -> string option

artwork library artist returns the cover bytes associated with artist in library. Returns None is artist doesn't have an artwork.

raise Sys_error if one of the underlying system calls fails.