OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DelimitedParserUtils.cpp File Reference
#include "ImportExport/DelimitedParserUtils.h"
#include <string_view>
#include "Logger/Logger.h"
#include "StringDictionary/StringDictionary.h"
+ Include dependency graph for DelimitedParserUtils.cpp:

Go to the source code of this file.

Namespaces

 anonymous_namespace{DelimitedParserUtils.cpp}
 
 import_export
 
 import_export::delimited_parser
 

Functions

bool anonymous_namespace{DelimitedParserUtils.cpp}::is_eol (const char &c, const import_export::CopyParams &copy_params)
 
void anonymous_namespace{DelimitedParserUtils.cpp}::trim_space (const char *&field_begin, const char *&field_end)
 
void anonymous_namespace{DelimitedParserUtils.cpp}::trim_quotes (const char *&field_begin, const char *&field_end, const import_export::CopyParams &copy_params)
 
size_t import_export::delimited_parser::find_beginning (const char *buffer, size_t begin, size_t end, const CopyParams &copy_params)
 Finds the closest possible row beginning in the given buffer. More...
 
size_t import_export::delimited_parser::find_end (const char *buffer, size_t size, const import_export::CopyParams &copy_params, unsigned int &num_rows_this_buffer, size_t buffer_first_row_index, bool &in_quote, size_t offset)
 
size_t import_export::delimited_parser::get_max_buffer_resize ()
 Gets the maximum size to which thread buffers should be automatically resized. More...
 
void import_export::delimited_parser::set_max_buffer_resize (const size_t max_buffer_resize)
 Sets the maximum size to which thread buffers should be automatically resized. This function is only used for testing. More...
 
size_t import_export::delimited_parser::find_row_end_pos (size_t &alloc_size, std::unique_ptr< char[]> &buffer, size_t &buffer_size, const CopyParams &copy_params, const size_t buffer_first_row_index, unsigned int &num_rows_in_buffer, FILE *file, foreign_storage::CsvReader *csv_reader=nullptr)
 Finds the closest possible row ending to the end of the given buffer. The buffer is resized as needed, with more content read from the file, until an end of row is found or a configured max buffer limit is reached. More...
 
template<typename T >
const char * import_export::delimited_parser::get_row (const char *buf, const char *buf_end, const char *entire_buf_end, const import_export::CopyParams &copy_params, const bool *is_array, std::vector< T > &row, std::vector< std::unique_ptr< char[]>> &tmp_buffers, bool &try_single_thread)
 Parses the first row in the given buffer and inserts fields into given vector. More...
 
template const char * import_export::delimited_parser::get_row (const char *buf, const char *buf_end, const char *entire_buf_end, const import_export::CopyParams &copy_params, const bool *is_array, std::vector< std::string > &row, std::vector< std::unique_ptr< char[]>> &tmp_buffers, bool &try_single_thread)
 
template const char * import_export::delimited_parser::get_row (const char *buf, const char *buf_end, const char *entire_buf_end, const import_export::CopyParams &copy_params, const bool *is_array, std::vector< std::string_view > &row, std::vector< std::unique_ptr< char[]>> &tmp_buffers, bool &try_single_thread)
 
void import_export::delimited_parser::parse_string_array (const std::string &s, const import_export::CopyParams &copy_params, std::vector< std::string > &string_vec)
 Parses given string array and inserts into given vector of strings. More...
 

Variables

static size_t import_export::delimited_parser::max_buffer_resize = 1024 * 1024 * 1024