OmniSciDB
a5dc49c757
|
#include <FileReader.h>
Public Member Functions | |
SingleFileReader (const std::string &file_path, const import_export::CopyParams ©_params) | |
~SingleFileReader () override=default | |
FirstLineByFilePath | getFirstLineForEachFile () const override |
bool | isEndOfLastFile () override |
std::string | getCurrentFilePath () const override |
Public Member Functions inherited from foreign_storage::FileReader | |
FileReader (const std::string &file_path, const import_export::CopyParams ©_params) | |
virtual | ~FileReader ()=default |
virtual size_t | read (void *buffer, size_t max_size)=0 |
virtual bool | isScanFinished () const =0 |
virtual size_t | readRegion (void *buffer, size_t offset, size_t size)=0 |
virtual size_t | getRemainingSize ()=0 |
virtual bool | isRemainingSizeKnown ()=0 |
virtual void | checkForMoreRows (size_t file_offset, const shared::FilePathOptions &options, const ForeignServer *server_options=nullptr, const UserMapping *user_mapping=nullptr) |
virtual void | serialize (rapidjson::Value &value, rapidjson::Document::AllocatorType &allocator) const =0 |
Protected Member Functions | |
virtual std::string | getFirstLine () const =0 |
virtual void | skipHeader ()=0 |
Static Protected Attributes | |
static constexpr size_t | DEFAULT_HEADER_READ_SIZE {1024} |
Additional Inherited Members | |
Protected Attributes inherited from foreign_storage::FileReader | |
import_export::CopyParams | copy_params_ |
std::string | file_path_ |
Definition at line 132 of file FileReader.h.
foreign_storage::SingleFileReader::SingleFileReader | ( | const std::string & | file_path, |
const import_export::CopyParams & | copy_params | ||
) |
Definition at line 73 of file FileReader.cpp.
|
overridedefault |
|
overridevirtual |
Returns the path of the currently processed file.
Implements foreign_storage::FileReader.
Definition at line 85 of file FileReader.cpp.
References foreign_storage::FileReader::file_path_.
|
protectedpure virtual |
Implemented in foreign_storage::CompressedFileReader, and foreign_storage::SingleTextFileReader.
Referenced by getFirstLineForEachFile().
|
overridevirtual |
Returns a map containing the first line for each file that will be read.
Implements foreign_storage::FileReader.
Definition at line 77 of file FileReader.cpp.
References foreign_storage::FileReader::file_path_, and getFirstLine().
|
overridevirtual |
Returns a boolean indicating whether the reader is at the end of the last file that was read.
Implements foreign_storage::FileReader.
Definition at line 81 of file FileReader.cpp.
References foreign_storage::FileReader::isScanFinished().
|
protectedpure virtual |
Implemented in foreign_storage::CompressedFileReader, and foreign_storage::SingleTextFileReader.
|
staticprotected |
Definition at line 149 of file FileReader.h.
Referenced by foreign_storage::CompressedFileReader::getFirstLine().