Packages

Csv2Sql is a blazing fast fully automated tool to load huge CSV files into a RDBMS.

Current section

Files

Jump to
csv2sql lib csv2sql file.ex
Raw

lib/csv2sql/file.ex

defmodule Csv2sql.File do
use Csv2sql.Types
@moduledoc """
A file struct that contains information about a csv file
"""
use TypedStruct
typedstruct enforce: true do
@typedoc "Csv2sql File struct"
field(:name, String.t())
field(:path, String.t())
field(:size, non_neg_integer(), default: 0)
field(:row_count, non_neg_integer(), default: 0)
field(:rows_processed, non_neg_integer(), default: 0)
field(:column_types, csv_col_types_list(), enforce: false)
field(:status, file_status(), default: :pending)
field(:existing_db_row_count, non_neg_integer(), default: 0)
field(:producer_pid, pid(), default: nil)
end
end