OmniSciDB  fe05a0c208
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
foreign_storage::anonymous_namespace{AbstractFileStorageDataWrapper.cpp} Namespace Reference

Functions

std::string append_file_path (const std::optional< std::string > &base, const std::optional< std::string > &subdirectory)
 
void throw_file_path_error (const std::string_view &missing_path, const std::string &table_name, const std::string_view &file_path_key)
 

Function Documentation

std::string foreign_storage::anonymous_namespace{AbstractFileStorageDataWrapper.cpp}::append_file_path ( const std::optional< std::string > &  base,
const std::optional< std::string > &  subdirectory 
)

Definition at line 75 of file AbstractFileStorageDataWrapper.cpp.

Referenced by foreign_storage::AbstractFileStorageDataWrapper::getFullFilePath().

76  {
77  const std::string separator{boost::filesystem::path::preferred_separator};
78  return std::regex_replace(
79  (base ? *base + separator : "") + (subdirectory ? *subdirectory : ""),
80  std::regex{separator + "{2,}"},
81  separator);
82 }

+ Here is the caller graph for this function:

void foreign_storage::anonymous_namespace{AbstractFileStorageDataWrapper.cpp}::throw_file_path_error ( const std::string_view &  missing_path,
const std::string &  table_name,
const std::string_view &  file_path_key 
)

Definition at line 109 of file AbstractFileStorageDataWrapper.cpp.

Referenced by foreign_storage::AbstractFileStorageDataWrapper::validateFilePathOptionKey().

111  {
112  std::stringstream ss;
113  ss << "No file_path found for Foreign Table \"" << table_name
114  << "\". Table must have either set a \"" << file_path_key << "\" option, or its "
115  << "parent server must have set a \"" << missing_path << "\" option.";
116  throw std::runtime_error(ss.str());
117 }

+ Here is the caller graph for this function: