module Biocaml_table:Tabular data as defined by principal tag 'table'. Design emphasizes support for large tables. Additional tags supported are: header, header_, comment-char, separator. By default, parsers assume input format is:sig
..end
"table,comment-char=#,header,header_,separator=\t".
If header=false, then column names are assigned the values: "0",
"1", "2", etc.
exception Invalid of string
exception No_column of string
type
row
typegetter =
row -> string -> string
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
.typecolumns =
string list
typet =
Biocaml_comments.t option * columns * getter *
row Batteries.Enum.t
val of_input : ?itags:string -> Batteries.IO.input -> t
"table,comment-char=#,header,header_,separator=\t"
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
itags
are:
"table,comment-char=#,header"
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:
"sqlite,db=:memory:,db_table=table"
Raises Tags.Invalid
if otags
are ill-formed or invalid for
this function.