View Source Csv2sql.ProgressTracker (Csv2sql v0.1.0)
This module is responsible for tracking the progress of the operations on different csv files. The various processes working on the csv files can update the progress tracker with the status of the file.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type db_result_types() :: MyXQL.Result.t() | Postgrex.Result.t()
@type file_status() :: :pending | :analyze | :loading | :done | :failure
@type files_map() :: %{required(String.t()) => File.t()}
@type supported_db_data_types() :: String.t() | number() | boolean() | Date.t() | DateTime.t() | nil
Functions
@spec add_subscriber() :: :ok
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec get_state() :: Csv2sql.ProgressTracker.State.t() | nil
@spec init_files([Csv2sql.File.t()]) :: files_map()
@spec report_error(any()) :: :ok
@spec update_file(Csv2sql.File.t()) :: :ok
@spec update_row_count(String.t(), non_neg_integer()) :: :ok
@spec update_validation_status(:passed | :failed) :: :ok