package shakuhachi

  1. Overview
  2. Docs
A music collection manager

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.3.3.tar.gz
sha256=7d07b9c7edcd5f5cee242facf4260272c56e56eb34b897888299ceece3e61d57
sha512=305f97d253d39f3b9d260e018d45f2563bea911cb164ad4d40c450e6c21081f1e7cde68203f9be6633b6933e1bad39da8405b99e8ace58adcc07758d37b8f2fd

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