package shakuhachi

  1. Overview
  2. Docs
A music collection manager

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.2.0.tar.gz
sha256=966fc8667c2aa9830e64950d2de74bd564a65d60e1f50cfd3dc1e99ef106dc47
sha512=6423ce04d784ba521a7f49fabdafbe036e2dd80cd08ca999fdc6767262d7f12aa4e5002d65efd4c568b343eaabf4d680191c88334d629e1ca0156084531e9e0b

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.