Module Biocaml.Table

module Table: Biocaml_table

exception Invalid of string
exception No_column of string
type row 
Data row.
type getter = row -> string -> string 
A function get of type getter can be used as get r c to get the value of the column named c in row r. Raise No_column c if given row does not have a value for column c.
type columns = string list 
All column names occurring in a file, in order that they occur.
type t = Biocaml_comments.t option * columns * getter *
row Batteries.Enum.t
A table consists of:
val of_input : ?itags:string -> Batteries.IO.input -> t
Default itags is:


Raises Invalid if input does not conform to itags requirements. Raises Tags.Invalid if itags are ill-formed or invalid for this function.

val of_string_list : ?itags:string ->
?comments:string ->
?columns:string list -> string list list -> t
Default itags are:


The only modification of this allowed is to change the comment-char or omit it. If omitted, comments must not be given.

val to_sqlite : ?otags:string -> t -> Sqlite3.db
to_sqlite t writes contents of t into a SQLite database, and returns the handle to it. Comments in t are ignored. Default output tags are:


Raises Tags.Invalid if otags are ill-formed or invalid for this function.