package shakuhachi

  1. Overview
  2. Docs
A music collection manager

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.3.1.tar.gz
sha256=91dc3168bc12fdd6032c16f9990018fd54f91cea50d9f6eb798e4d5eecd9c6a6
sha512=a93c4bf39d80d2c595d361b393f0f1fd2fd078e5bd714988e835a0b5ac8c8c48d3b4cbe2e11d33c9168d9f2f44818b6a60e38b32773bd4967c24794abbf323dd

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.

Sourceval sqlite3 : t -> Sqlite3.db
  • since 0.3.0