31 namespace import_export {
32 namespace delimited_parser {
37 : std::runtime_error(message) {}
91 std::unique_ptr<
char[]>& buffer,
94 const size_t buffer_first_row_index,
95 unsigned int& num_rows_in_buffer,
115 template <
typename T>
116 const char*
get_row(
const char* buf,
118 const char* entire_buf_end,
120 const bool* is_array,
122 std::vector<std::unique_ptr<
char[]>>& tmp_buffers,
123 bool& try_single_thread,
124 bool filter_empty_lines);
135 std::vector<std::string>& string_vec,
136 bool truncate_values =
false);
size_t find_beginning(const char *buffer, size_t begin, size_t end, const import_export::CopyParams ©_params)
Finds the closest possible row beginning in the given buffer.
const char * get_row(const char *buf, const char *buf_end, const char *entire_buf_end, const import_export::CopyParams ©_params, const bool *is_array, std::vector< T > &row, std::vector< std::unique_ptr< char[]>> &tmp_buffers, bool &try_single_thread, bool filter_empty_lines)
Parses the first row in the given buffer and inserts fields into given vector.
void parse_string_array(const std::string &s, const import_export::CopyParams ©_params, std::vector< std::string > &string_vec, bool truncate_values)
Parses given string array and inserts into given vector of strings.
size_t get_max_buffer_resize()
Gets the maximum size to which thread buffers should be automatically resized.
void set_max_buffer_resize(const size_t max_buffer_resize_param)
Sets the maximum size to which thread buffers should be automatically resized. This function is only ...
void extend_buffer(std::unique_ptr< char[]> &buffer, size_t &buffer_size, size_t &alloc_size, FILE *file, foreign_storage::FileReader *file_reader, size_t max_buffer_resize)
DelimitedParserException(const std::string &message)
InsufficientBufferSizeException(const std::string &message)
size_t find_row_end_pos(size_t &alloc_size, std::unique_ptr< char[]> &buffer, size_t &buffer_size, const CopyParams ©_params, const size_t buffer_first_row_index, unsigned int &num_rows_in_buffer, FILE *file, foreign_storage::FileReader *file_reader)
Finds the closest possible row ending to the end of the given buffer. The buffer is resized as needed...
static size_t max_buffer_resize