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/Database/index.html

Module SkhcDb.DatabaseSource

Primitive operations on the database.

Sourcetype t

type of a database handler.

Sourceval open' : ?mode:[ `NO_CREATE | `READONLY ] -> ?uri:bool -> ?memory:bool -> ?mutex:[ `FULL | `NO ] -> ?cache:[ `PRIVATE | `SHARED ] -> ?vfs:string -> string -> t

open' filename opens the database at filename and returns a database handler.

see Sqlite3.db_open for details of all parameters.

Sourceval create_tables : t -> Sqlite3.Rc.t

create_tables db creates the tables used by shakuhachi in db.

Sourceval close : t -> bool

close db closes the database handler.

Sourceval transaction : t -> (t -> ('a, 'b) result) -> ('a, 'b) result

transaction db f runs f inside a transaction block. If f returns Result.Ok, modifications applied to db are commited. Otherwise, modifications are rollbacked.

Sourceval errmsg : t -> string

errmsg db returns the error message of the last operation on database db.