type 'a t = { header : 'a option; transaction : bool; insert_stmt : Sqlite3.stmt option; check_key_stmt : Sqlite3.stmt option; row_number : int; sheet_number : int; delayed : 'a list; } type insert_result = { insert_stmt : Sqlite3.stmt option; check_key_stmt : Sqlite3.stmt option; } type ('a, 'b) mapper = { get_row : 'b -> 'a Array.t; get_value : 'a -> ImportCSV.DataType.t; default : 'a; } val insert_row : mapper:(_, 'row) mapper -> ImportAnalyser.Dependency.t -> _ ImportSQL.Db.t -> 'row -> _ t -> (insert_result, ImportErrors.xlsError) result (** Low level row insertion *) val run_row : log_error:ImportErrors.t -> mapper:(_, 'row) mapper -> ImportAnalyser.Dependency.t -> _ ImportSQL.Db.t -> 'row -> 'a t -> 'a t val clear : log_error:ImportErrors.t -> 'a ImportSQL.Db.t -> ImportAnalyser.Dependency.t -> ImportConf.Syntax.t -> unit ImportSQL.Db.result (** Clean up the table after the insertion, check for the duplicates and external references *)