diff options
Diffstat (limited to 'lib/sql/db.mli')
-rw-r--r-- | lib/sql/db.mli | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/sql/db.mli b/lib/sql/db.mli index 91933c4..213fb27 100644 --- a/lib/sql/db.mli +++ b/lib/sql/db.mli @@ -1,5 +1,3 @@ -module Syntax = ImportConf.Syntax - type 'a t type 'a result = ('a, exn) Result.t @@ -32,7 +30,7 @@ val eval_key : 'a t -> Sqlite3.stmt option -> ImportAnalyser.Dependency.key list -> - (int * ImportCSV.DataType.t) list -> + (int * ImportDataTypes.Value.t) list -> (Sqlite3.stmt option * Sqlite3.Data.t list) result (** Evaluate the keys in sqlite and get the results. @@ -43,7 +41,7 @@ val insert : 'a t -> Sqlite3.stmt -> id:int -> - (int * ImportCSV.DataType.t) list -> + (int * ImportDataTypes.Value.t) list -> unit result (** Insert a new row in the database. @@ -63,10 +61,11 @@ val rollback : 'a t -> unit result val query : f: - ((ImportDataTypes.Path.t ImportExpression.T.t * ImportCSV.DataType.t) array -> + ((ImportDataTypes.Path.t ImportExpression.T.t * ImportDataTypes.Value.t) + array -> unit) -> 'a t -> - Syntax.t -> + ImporterSyntax.t -> unit result (** This one the most important function from the application. The function will transform the configuration into an sql query and will fetch the result from @@ -74,18 +73,18 @@ val query : The function [f] given in argument will be called for each line *) -val create_view : 'a t -> Syntax.t -> unit result +val create_view : 'a t -> ImporterSyntax.t -> unit result (** Create a view which represent the result *) val check_foreign : - f:((string * ImportCSV.DataType.t) array -> unit) -> + f:((string * ImportDataTypes.Value.t) array -> unit) -> 'a t -> - Syntax.t -> - Syntax.Extern.t -> + ImporterSyntax.t -> + ImporterSyntax.Extern.t -> unit result val clear_duplicates : - f:((string * ImportCSV.DataType.t) array -> unit) -> + f:((string * ImportDataTypes.Value.t) array -> unit) -> 'a t -> ImportDataTypes.Table.t -> ImportAnalyser.Dependency.key list -> @@ -95,9 +94,9 @@ val clear_duplicates : val insert_header : 'a t -> ImportDataTypes.Table.t -> - (int * ImportCSV.DataType.t) array -> + (int * ImportDataTypes.Value.t) array -> unit T.result val query_headers : - 'a t -> ImportDataTypes.Table.t -> ImportCSV.DataType.t array T.result + 'a t -> ImportDataTypes.Table.t -> ImportDataTypes.Value.t array T.result (** Get all the headers from the database (used or not) *) |