usql update

This commit is contained in:
2021-08-23 18:14:05 +02:00
parent 8d220356f2
commit 0e90d6047c
28 changed files with 1623 additions and 3774 deletions

View File

@@ -5,6 +5,10 @@
#include <string>
#include <vector>
#include <regex>
#include <functional>
#include "parser.h"
#include "table.h"
namespace usql {
@@ -20,12 +24,12 @@ namespace usql {
bool header_skiped;
public:
CsvReader(bool skip_hdr = false, char field_sep = ',', char quote_ch = '"', char line_sep = '\r',
char line_sep2 = '\n');
CsvReader(bool skip_hdr = true, char field_sep = ',', char quote_ch = '"', char line_sep = '\r', char line_sep2 = '\n');
std::vector<std::vector<std::string>> parseCSV(const std::string &csvSource);
int parseCSV2(const std::string &csvSource, std::vector<ColDefNode> &cols_def, Table& table);
int parseCSV(const std::string &filename, std::vector<ColDefNode> &cols_def, Table& table);
private:
void add_line(const std::vector<std::string> &line, std::vector<std::vector<std::string>> &lines);
};
}
} // namespace