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/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