#pragma once #include #include #include #include #include #include "parser.h" #include "table.h" namespace usql { class CsvReader { private: char field_separator; char line_separator; char line_separator2; char quote_character; bool skip_header; bool header_skiped; public: CsvReader(bool skip_hdr = true, char field_sep = ',', char quote_ch = '"', char line_sep = '\r', char line_sep2 = '\n'); int parseCSV2(const std::string &csvSource, std::vector &cols_def, Table& table); int parseCSV(const std::string &filename, std::vector &cols_def, Table& table); }; } // namespace