package shakuhachi

  1. Overview
  2. Docs
A music collection manager

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.1.0.tar.gz
sha256=bb7f91cc44c09f922d2a614e9e01fd0d2976840bacf839a8b99de63c6fc5b3b8
sha512=f02827db4228b017bb2ad7d64cb1c0667831ec2341e6f759266ec834e40627c2affeace143c6d5e769b3acce63f889b3cbd1a9ca4768091840e8fce1d4750f86

doc/shakuhachi.database/SkhcDb/Artist/index.html

Module SkhcDb.ArtistSource

Operation on artists.

Sourcetype t

type of artist

Sourceval init : sort_name:string option -> description:string option -> artwork:string option -> flag:bool -> rating:int option -> string -> t

init ~sort_name ~description ~artwork ~flag ~rating name creates an album at Unix.time () with the id = 0.

Sourceval table_name : string

artist's table name.

Sourceval equal : t -> t -> bool

equal a1 a2 tests whether a1 equals a2. All fields are used for the test.

Sourceval compare : t -> t -> int

compare a1 a2 is Stdlib.compare.

Sourceval to_string : t -> string

to_string t is a string representation of t.

Sourceval pp : Format.formatter -> t -> unit

pp format t is a preety printer for t.

Sourceval filter_map : Database.t -> (t -> 'a option) -> ('a list, Sqlite3.Rc.t * string) result

filter_map db f queries all artist inside db and applies f to every element, keeping all Some elements returned by f.

Sourceval all : Database.t -> (t list, Sqlite3.Rc.t * string) result

all db queries all artists inside db.

Sourceval update : Database.t -> t -> (t, Sqlite3.Rc.t * string) result

update db artist updates db with artist.

Sourceval insert : Database.t -> t -> (t, Sqlite3.Rc.t * string) result

insert db artist inserts artist inside db.

Sourceval remove_id : Database.t -> int64 -> (unit, Sqlite3.Rc.t * string) result

remove_id db id removes artist inside db with the id id.

Sourceval remove : Database.t -> t -> (unit, Sqlite3.Rc.t * string) result

remove db album is remove_id db (id album).

Sourceval find_or_insert : Database.t -> t -> (t * bool, Sqlite3.Rc.t * string) result

find_or_insert db artist tries to find an artist with name name artist. If artist is found, returns the first artist with this name found and true, otherwise returns artist returned by insert and false.

Sourceval find_or_update : Database.t -> t -> (t * bool, Sqlite3.Rc.t * string) result

find_or_insert db artist tries to find an artist with name name artist. If artist is found, returns the first artist with this name found and true, otherwise returns artist returned by update and false.

Sourceval to_yojson : t -> Yojson.Safe.t
Sourceval id : t -> Int64.t

id artist returns artist's id.

Sourceval name : t -> string

name artist returns artist's name.

Sourceval sort_name : t -> string option

sort_name artist returns artist's sort_name.

Sourceval description : t -> string option

description artist returns artist's description.

Sourceval artwork : t -> string option

artwork artist returns artist's artwork path.

Sourceval flag : t -> bool

flag artist returns if artist's flag is set.

Sourceval rating : t -> int option

rating artist returns artist's rating.

Sourceval created_at : t -> float

created_at artist returns artist's created time since unix epoch.

Sourceval updated_at : t -> float

updated_at artist returns artist's updated time since unix epoch.

Sourceval set_id : int64 -> t -> t
Sourceval set_name : string -> t -> t
Sourceval set_sort_name : string option -> t -> t
Sourceval set_description : string option -> t -> t
Sourceval set_artwork : string option -> t -> t
Sourceval set_flag : bool -> t -> t
Sourceval set_rating : int option -> t -> t
Sourceval set_created_at : float -> t -> t
Sourceval set_updated_at : float -> t -> t