Constructor, basically takes an encoding and the output buffer size.
167028 auto &config = DBConfig::GetConfig(context_p);
167030 auto function = config.GetEncodeFunction(encoding_name_to_find);
167031 if (!function) {
167032
167033 if (Catalog::TryAutoLoad(context_p, "encodings")) {
167034
167035 function = config.GetEncodeFunction(encoding_name_to_find);
167036 }
167037 }
167038 if (!function) {
167039
167040 auto loaded_encodings = config.GetLoadedEncodedFunctions();
167041 std::ostringstream error;
167042 error << "The CSV Reader does not support the encoding: \"" << encoding_name_to_find << "\"\n";
167043 if (!context_p.db->ExtensionIsLoaded("encodings")) {
167044 error << "It is possible that the encoding exists in the encodings extension. You can try \"INSTALL "
167045 "encodings; LOAD encodings\""
167046 << "\n";
167047 }
167048 error << "The currently supported encodings are: " << '\n';
167051 }
167052 throw InvalidInputException(error.str());
167053 }
167054
167055
167056 idx_t encoded_buffer_size = buffer_size % 2 != 0 ? buffer_size - 1 : buffer_size;
167057 if (encoded_buffer_size == 0) {
167058
167059 encoded_buffer_size = 2;
167060 }
167061 D_ASSERT(encoded_buffer_size > 0);
167065}
CSVEncoderBuffer encoded_buffer
The actual encoded buffer.
Definition duckdb.hpp:45056
char pass_on_byte
Pass-on Byte, used to check if we are done with the file, but must be appended to next buffer.
Definition duckdb.hpp:45062
CSVEncoderBuffer remaining_bytes_buffer
Potential remaining bytes.
Definition duckdb.hpp:45058
optional_ptr< EncodingFunction > encoding_function
Actual Encoding Function.
Definition duckdb.hpp:45060
static DUCKDB_API string Lower(const string &str)
Convert a string to lowercase.
Definition duckdb.cpp:109630
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237