OmniSciDB  471d68cefb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 78 of file AbstractFileStorageDataWrapper.cpp.

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

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

+ 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 112 of file AbstractFileStorageDataWrapper.cpp.

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

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

+ Here is the caller graph for this function: