package shakuhachi

  1. Overview
  2. Docs
A music collection manager

Install

dune-project
 Dependency

Authors

Maintainers

Sources

shakuhachi-0.4.0.tar.gz
sha256=8bd4675792ec93d705e68d4e43dc04aa1124fcaf644ae3a1a3fda68464276f95
sha512=712efcbe13e6e9d3336f72c2c25d4b41225cdd245f21adeeadc8aa4ad31ca9c905077e0873a3d1165d7c09357c009c859c4a7cd9c2d0c9bffc27144525594e72

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

Module SkhcDb.MusicPropertySource

Operations on music's property

Sourcemodule Column : sig ... end

MusicParticipant's table columns

Sourcetype t

type of music's property

Sourceval init : int64 -> string -> string -> t

init music_id key value creates a relation by associating music_id with key and value.

Sourceval to_yojson : t -> Yojson.Safe.t
Sourceval equal : t -> t -> bool

equal m1 m2 tests whether m1 equals m2. All fields are used for the test.

Sourceval compare : t -> t -> int

compare m1 m2 is Stdlib.compare.

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

insert db property inserts property inside db.

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

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

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

all db queries all properties inside db.

  • since 0.4.0
Sourceval fold : Database.t -> 'a -> ('a -> t -> 'a) -> ('a, Sqlite3.Rc.t * string) result

fold db init f queries all properties inside db and folds over each property by applying f with init.

  • since 0.4.0
Sourceval remove_key : Database.t -> t -> (unit, Sqlite3.Rc.t * string) result

remove_key db t removes all entries from db with music_id and key.

  • since 0.3.3
Sourceval remove_all_id : Database.t -> int64 -> (unit, Sqlite3.Rc.t * string) result

remove_all_id db music_id removes all entries containing music_id inside db.

  • since 0.3.3

properties db music_id returns all the properties associated with music_id in db.

Sourceval music_id : t -> int64

music_id p returns the music_id associated with the property p.

Sourceval key : t -> string

key p returns the key of the property p.

Sourceval value : t -> string

value p returns the value of the property p.