OmniSciDB  c1a53651b2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
foreign_storage::ForeignDataWrapperFactory Class Reference

#include <ForeignDataWrapperFactory.h>

Static Public Member Functions

static std::unique_ptr
< ForeignDataWrapper
create (const std::string &data_wrapper_type, const int db_id, const ForeignTable *foreign_table)
 
static std::unique_ptr
< UserMapping
createUserMappingProxyIfApplicable (const int db_id, const int user_id, const std::string &file_path, const import_export::CopyParams &copy_params, const ForeignServer *server)
 
static std::unique_ptr
< ForeignServer
createForeignServerProxy (const int db_id, const int user_id, const std::string &file_path, const import_export::CopyParams &copy_params)
 
static std::unique_ptr
< ForeignTable
createForeignTableProxy (const int db_id, const TableDescriptor *table, const std::string &file_path, const import_export::CopyParams &copy_params, const ForeignServer *server)
 
static std::unique_ptr
< ForeignDataWrapper
createForImport (const std::string &data_wrapper_type, const int db_id, const ForeignTable *foreign_table, const UserMapping *user_mapping)
 
static std::unique_ptr
< ForeignDataWrapper
createForGeneralImport (const import_export::CopyParams &copy_params, const int db_id, const ForeignTable *foreign_table, const UserMapping *user_mapping)
 
static const ForeignDataWrappercreateForValidation (const std::string &data_wrapper_type, const ForeignTable *foreign_table=nullptr)
 
static void validateDataWrapperType (const std::string &data_wrapper_type)
 

Static Private Attributes

static std::map< std::string,
std::unique_ptr
< ForeignDataWrapper > > 
validation_data_wrappers_
 

Detailed Description

Definition at line 99 of file ForeignDataWrapperFactory.h.

Member Function Documentation

std::unique_ptr< ForeignDataWrapper > foreign_storage::ForeignDataWrapperFactory::create ( const std::string &  data_wrapper_type,
const int  db_id,
const ForeignTable foreign_table 
)
static

Creates an instance of a ForeignDataWrapper for the given data wrapper type using provided database and foreign table details.

Definition at line 334 of file ForeignDataWrapperFactory.cpp.

References foreign_storage::DataWrapperType::CSV, foreign_storage::DataWrapperType::INTERNAL_CATALOG, foreign_storage::DataWrapperType::INTERNAL_LOGS, foreign_storage::DataWrapperType::INTERNAL_MEMORY_STATS, foreign_storage::DataWrapperType::INTERNAL_STORAGE_STATS, foreign_storage::DataWrapperType::PARQUET, foreign_storage::DataWrapperType::REGEX_PARSER, UNREACHABLE, and foreign_storage::CsvDataWrapper::validateAndGetIsS3Select().

337  {
338  std::unique_ptr<ForeignDataWrapper> data_wrapper;
339  if (data_wrapper_type == DataWrapperType::CSV) {
340  if (CsvDataWrapper::validateAndGetIsS3Select(foreign_table)) {
341  UNREACHABLE();
342  } else {
343  data_wrapper = std::make_unique<CsvDataWrapper>(db_id, foreign_table);
344  }
345 #ifdef ENABLE_IMPORT_PARQUET
346  } else if (data_wrapper_type == DataWrapperType::PARQUET) {
347  data_wrapper = std::make_unique<ParquetDataWrapper>(db_id, foreign_table);
348 #endif
349  } else if (data_wrapper_type == DataWrapperType::REGEX_PARSER) {
350  data_wrapper = std::make_unique<RegexParserDataWrapper>(db_id, foreign_table);
351  } else if (data_wrapper_type == DataWrapperType::INTERNAL_CATALOG) {
352  data_wrapper = std::make_unique<InternalCatalogDataWrapper>(db_id, foreign_table);
353  } else if (data_wrapper_type == DataWrapperType::INTERNAL_MEMORY_STATS) {
354  data_wrapper = std::make_unique<InternalMemoryStatsDataWrapper>(db_id, foreign_table);
355  } else if (data_wrapper_type == DataWrapperType::INTERNAL_STORAGE_STATS) {
356  data_wrapper =
357  std::make_unique<InternalStorageStatsDataWrapper>(db_id, foreign_table);
358  } else if (data_wrapper_type == DataWrapperType::INTERNAL_LOGS) {
359  data_wrapper = std::make_unique<InternalLogsDataWrapper>(db_id, foreign_table);
360  } else {
361  throw std::runtime_error("Unsupported data wrapper");
362  }
363  return data_wrapper;
364 }
static constexpr char const * REGEX_PARSER
static constexpr char const * INTERNAL_STORAGE_STATS
#define UNREACHABLE()
Definition: Logger.h:337
static bool validateAndGetIsS3Select(const ForeignTable *foreign_table)
static constexpr char const * INTERNAL_CATALOG
static constexpr char const * INTERNAL_MEMORY_STATS
static constexpr char const * CSV
static constexpr char const * INTERNAL_LOGS
static constexpr char const * PARQUET

+ Here is the call graph for this function:

std::unique_ptr< ForeignServer > foreign_storage::ForeignDataWrapperFactory::createForeignServerProxy ( const int  db_id,
const int  user_id,
const std::string &  file_path,
const import_export::CopyParams copy_params 
)
static

Definition at line 182 of file ForeignDataWrapperFactory.cpp.

References CHECK, foreign_storage::DataWrapperType::CSV, shared::is_s3_uri(), foreign_storage::is_valid_source_type(), import_export::kDelimitedFile, import_export::kOdbc, import_export::kParquetFile, import_export::kRegexParsedFile, foreign_storage::AbstractFileStorageDataWrapper::LOCAL_FILE_STORAGE_TYPE, foreign_storage::DataWrapperType::PARQUET, foreign_storage::DataWrapperType::REGEX_PARSER, import_export::CopyParams::source_type, foreign_storage::AbstractFileStorageDataWrapper::STORAGE_TYPE_KEY, and UNREACHABLE.

Referenced by foreign_storage::create_proxy_fsi_objects().

186  {
187  CHECK(is_valid_source_type(copy_params));
188 
189  auto foreign_server = std::make_unique<foreign_storage::ForeignServer>();
190 
191  foreign_server->id = -1;
192  foreign_server->user_id = user_id;
194  foreign_server->data_wrapper_type = DataWrapperType::CSV;
195  } else if (copy_params.source_type == import_export::SourceType::kRegexParsedFile) {
196  foreign_server->data_wrapper_type = DataWrapperType::REGEX_PARSER;
197 #ifdef ENABLE_IMPORT_PARQUET
198  } else if (copy_params.source_type == import_export::SourceType::kParquetFile) {
199  foreign_server->data_wrapper_type = DataWrapperType::PARQUET;
200 #endif
201  } else {
202  UNREACHABLE();
203  }
204  foreign_server->name = "import_proxy_server";
205 
206  if (copy_params.source_type == import_export::SourceType::kOdbc) {
207  throw std::runtime_error("ODBC storage not supported");
208  } else if (shared::is_s3_uri(file_path)) {
209  throw std::runtime_error("AWS storage not supported");
210  } else {
211  foreign_server->options[AbstractFileStorageDataWrapper::STORAGE_TYPE_KEY] =
213  }
214 
215  return foreign_server;
216 }
static constexpr char const * REGEX_PARSER
bool is_s3_uri(const std::string &file_path)
#define UNREACHABLE()
Definition: Logger.h:337
import_export::SourceType source_type
Definition: CopyParams.h:57
bool is_valid_source_type(const import_export::CopyParams &copy_params)
#define CHECK(condition)
Definition: Logger.h:291
static constexpr char const * CSV
static constexpr char const * PARQUET

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::unique_ptr< ForeignTable > foreign_storage::ForeignDataWrapperFactory::createForeignTableProxy ( const int  db_id,
const TableDescriptor table,
const std::string &  file_path,
const import_export::CopyParams copy_params,
const ForeignServer server 
)
static

Definition at line 235 of file ForeignDataWrapperFactory.cpp.

References import_export::CopyParams::array_begin, import_export::CopyParams::array_delim, foreign_storage::CsvFileBufferParser::ARRAY_DELIMITER_KEY, import_export::CopyParams::array_end, foreign_storage::CsvFileBufferParser::ARRAY_MARKER_KEY, foreign_storage::bool_to_option_value(), import_export::CopyParams::buffer_size, foreign_storage::TextFileBufferParser::BUFFER_SIZE_KEY, CHECK, import_export::CopyParams::delimiter, foreign_storage::CsvFileBufferParser::DELIMITER_KEY, import_export::CopyParams::escape, foreign_storage::CsvFileBufferParser::ESCAPE_KEY, import_export::CopyParams::file_sort_order_by, foreign_storage::AbstractFileStorageDataWrapper::FILE_SORT_ORDER_BY_KEY, import_export::CopyParams::file_sort_regex, foreign_storage::AbstractFileStorageDataWrapper::FILE_SORT_REGEX_KEY, import_export::CopyParams::geo_assign_render_groups, foreign_storage::CsvFileBufferParser::GEO_ASSIGN_RENDER_GROUPS_KEY, import_export::CopyParams::geo_explode_collections, foreign_storage::CsvFileBufferParser::GEO_EXPLODE_COLLECTIONS_KEY, Catalog_Namespace::SysCatalog::getCatalog(), import_export::CopyParams::has_header, Catalog_Namespace::SysCatalog::instance(), shared::is_s3_uri(), foreign_storage::is_valid_source_type(), import_export::kAutoDetect, import_export::kDelimitedFile, import_export::kOdbc, import_export::kParquetFile, import_export::kRegexParsedFile, import_export::CopyParams::line_delim, foreign_storage::CsvFileBufferParser::LINE_DELIMITER_KEY, import_export::CopyParams::line_regex, foreign_storage::RegexFileBufferParser::LINE_REGEX_KEY, import_export::CopyParams::line_start_regex, foreign_storage::RegexFileBufferParser::LINE_START_REGEX_KEY, import_export::CopyParams::lonlat, foreign_storage::CsvFileBufferParser::LONLAT_KEY, import_export::CopyParams::null_str, foreign_storage::CsvFileBufferParser::NULLS_KEY, import_export::num_import_threads(), foreign_storage::OptionsContainer::options, import_export::CopyParams::quote, foreign_storage::CsvFileBufferParser::QUOTE_KEY, import_export::CopyParams::quoted, foreign_storage::CsvFileBufferParser::QUOTED_KEY, import_export::CopyParams::regex_path_filter, foreign_storage::AbstractFileStorageDataWrapper::REGEX_PATH_FILTER_KEY, foreign_storage::anonymous_namespace{ForeignDataWrapperFactory.cpp}::set_header_option(), import_export::CopyParams::source_srid, foreign_storage::CsvFileBufferParser::SOURCE_SRID_KEY, import_export::CopyParams::source_type, import_export::CopyParams::threads, foreign_storage::AbstractFileStorageDataWrapper::THREADS_KEY, to_string(), import_export::CopyParams::trim_spaces, and foreign_storage::CsvFileBufferParser::TRIM_SPACES_KEY.

Referenced by foreign_storage::create_proxy_fsi_objects().

240  {
241  CHECK(is_valid_source_type(copy_params));
242 
243  auto catalog = Catalog_Namespace::SysCatalog::instance().getCatalog(db_id);
244  auto foreign_table = std::make_unique<ForeignTable>();
245 
246  *static_cast<TableDescriptor*>(foreign_table.get()) =
247  *table; // copy table related values
248 
249  CHECK(server);
250  foreign_table->foreign_server = server;
251 
252  // populate options for regex filtering of file-paths in supported data types
256  if (copy_params.regex_path_filter.has_value()) {
258  copy_params.regex_path_filter.value();
259  }
260  if (copy_params.file_sort_order_by.has_value()) {
262  copy_params.file_sort_order_by.value();
263  }
264  if (copy_params.file_sort_regex.has_value()) {
266  copy_params.file_sort_regex.value();
267  }
268  foreign_table->options[AbstractFileStorageDataWrapper::THREADS_KEY] =
270  }
271 
273  CHECK(!copy_params.line_regex.empty());
274  foreign_table->options[RegexFileBufferParser::LINE_REGEX_KEY] =
275  copy_params.line_regex;
276  if (!copy_params.line_start_regex.empty()) {
277  foreign_table->options[RegexFileBufferParser::LINE_START_REGEX_KEY] =
278  copy_params.line_start_regex;
279  }
281  set_header_option(foreign_table->options, copy_params.has_header);
282  }
283  }
284 
285  // setup data source options based on various criteria
286  if (copy_params.source_type == import_export::SourceType::kOdbc) {
287  throw std::runtime_error("ODBC storage not supported");
288  } else if (shared::is_s3_uri(copy_from_source)) {
289  throw std::runtime_error("AWS storage not supported");
290  } else {
291  foreign_table->options["FILE_PATH"] = copy_from_source;
292  }
293 
294  // for CSV import
296  foreign_table->options[CsvFileBufferParser::DELIMITER_KEY] = copy_params.delimiter;
297  foreign_table->options[CsvFileBufferParser::NULLS_KEY] = copy_params.null_str;
298  set_header_option(foreign_table->options, copy_params.has_header);
299  foreign_table->options[CsvFileBufferParser::QUOTED_KEY] =
300  bool_to_option_value(copy_params.quoted);
301  foreign_table->options[CsvFileBufferParser::QUOTE_KEY] = copy_params.quote;
302  foreign_table->options[CsvFileBufferParser::ESCAPE_KEY] = copy_params.escape;
303  foreign_table->options[CsvFileBufferParser::LINE_DELIMITER_KEY] =
304  copy_params.line_delim;
305  foreign_table->options[CsvFileBufferParser::ARRAY_DELIMITER_KEY] =
306  copy_params.array_delim;
307  const std::array<char, 3> array_marker{
308  copy_params.array_begin, copy_params.array_end, 0};
309  foreign_table->options[CsvFileBufferParser::ARRAY_MARKER_KEY] = array_marker.data();
310  foreign_table->options[CsvFileBufferParser::LONLAT_KEY] =
311  bool_to_option_value(copy_params.lonlat);
312  foreign_table->options[CsvFileBufferParser::GEO_ASSIGN_RENDER_GROUPS_KEY] =
314  if (copy_params.geo_explode_collections) {
315  throw std::runtime_error(
316  "geo_explode_collections is not yet supported for FSI CSV import");
317  }
318  foreign_table->options[CsvFileBufferParser::GEO_EXPLODE_COLLECTIONS_KEY] =
320  foreign_table->options[CsvFileBufferParser::SOURCE_SRID_KEY] =
321  std::to_string(copy_params.source_srid);
322 
323  foreign_table->options[TextFileBufferParser::BUFFER_SIZE_KEY] =
324  std::to_string(copy_params.buffer_size);
325 
326  foreign_table->options[CsvFileBufferParser::TRIM_SPACES_KEY] =
327  bool_to_option_value(copy_params.trim_spaces);
328  }
329 
330  foreign_table->initializeOptions();
331  return foreign_table;
332 }
static const std::string GEO_EXPLODE_COLLECTIONS_KEY
static const std::string TRIM_SPACES_KEY
static const std::string ARRAY_MARKER_KEY
bool is_s3_uri(const std::string &file_path)
void set_header_option(OptionsMap &options, const import_export::ImportHeaderRow &has_header)
std::string to_string(char const *&&v)
ImportHeaderRow has_header
Definition: CopyParams.h:46
static const std::string SOURCE_SRID_KEY
std::optional< std::string > regex_path_filter
Definition: CopyParams.h:85
static SysCatalog & instance()
Definition: SysCatalog.h:343
std::string bool_to_option_value(const bool value)
static const std::string LINE_DELIMITER_KEY
import_export::SourceType source_type
Definition: CopyParams.h:57
bool is_valid_source_type(const import_export::CopyParams &copy_params)
size_t num_import_threads(const int32_t copy_params_threads)
Definition: thread_count.h:31
static const std::string DELIMITER_KEY
std::shared_ptr< Catalog > getCatalog(const std::string &dbName)
static const std::string ARRAY_DELIMITER_KEY
std::string line_start_regex
Definition: CopyParams.h:106
#define CHECK(condition)
Definition: Logger.h:291
static const std::string GEO_ASSIGN_RENDER_GROUPS_KEY
std::optional< std::string > file_sort_order_by
Definition: CopyParams.h:86
std::optional< std::string > file_sort_regex
Definition: CopyParams.h:87

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::unique_ptr< ForeignDataWrapper > foreign_storage::ForeignDataWrapperFactory::createForGeneralImport ( const import_export::CopyParams copy_params,
const int  db_id,
const ForeignTable foreign_table,
const UserMapping user_mapping 
)
static

Definition at line 133 of file ForeignDataWrapperFactory.cpp.

References CHECK, foreign_storage::DataWrapperType::CSV, anonymous_namespace{ForeignDataWrapperFactory.cpp}::get_data_wrapper_type(), anonymous_namespace{ForeignDataWrapperFactory.cpp}::is_valid_data_wrapper(), foreign_storage::DataWrapperType::PARQUET, and foreign_storage::DataWrapperType::REGEX_PARSER.

Referenced by import_export::ForeignDataImporter::importGeneral().

137  {
138  auto data_wrapper_type = get_data_wrapper_type(copy_params);
139  CHECK(is_valid_data_wrapper(data_wrapper_type));
140 
141  if (data_wrapper_type == DataWrapperType::CSV) {
142  return std::make_unique<CsvDataWrapper>(
143  db_id, foreign_table, user_mapping, /*disable_cache=*/true);
144  } else if (data_wrapper_type == DataWrapperType::REGEX_PARSER) {
145  return std::make_unique<RegexParserDataWrapper>(
146  db_id, foreign_table, user_mapping, true);
147  }
148 #ifdef ENABLE_IMPORT_PARQUET
149  else if (data_wrapper_type == DataWrapperType::PARQUET) {
150  return std::make_unique<ParquetDataWrapper>(
151  db_id, foreign_table, /*do_metadata_stats_validation=*/false);
152  }
153 #endif
154 
155  return {};
156 }
bool is_valid_data_wrapper(const std::string &data_wrapper_type)
static constexpr char const * REGEX_PARSER
std::string get_data_wrapper_type(const import_export::CopyParams &copy_params)
#define CHECK(condition)
Definition: Logger.h:291
static constexpr char const * CSV
static constexpr char const * PARQUET

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::unique_ptr< ForeignDataWrapper > foreign_storage::ForeignDataWrapperFactory::createForImport ( const std::string &  data_wrapper_type,
const int  db_id,
const ForeignTable foreign_table,
const UserMapping user_mapping 
)
static

Create for the import use-case.

Definition at line 158 of file ForeignDataWrapperFactory.cpp.

References CHECK, and foreign_storage::DataWrapperType::PARQUET.

162  {
163 #ifdef ENABLE_IMPORT_PARQUET
164  // only supported for parquet import path currently
165  CHECK(data_wrapper_type == DataWrapperType::PARQUET);
166  return std::make_unique<ParquetImporter>(db_id, foreign_table, user_mapping);
167 #else
168  return {};
169 #endif
170 }
#define CHECK(condition)
Definition: Logger.h:291
static constexpr char const * PARQUET
const ForeignDataWrapper & foreign_storage::ForeignDataWrapperFactory::createForValidation ( const std::string &  data_wrapper_type,
const ForeignTable foreign_table = nullptr 
)
static

Creates an instance (or gets an existing instance) of an immutable ForeignDataWrapper to be used for validation purposes. Returned instance should not be used for any stateful operations, such as fetching foreign table data/metadata.

Definition at line 366 of file ForeignDataWrapperFactory.cpp.

References CHECK, foreign_storage::DataWrapperType::CSV, foreign_storage::DataWrapperType::INTERNAL_CATALOG, foreign_storage::DataWrapperType::INTERNAL_LOGS, foreign_storage::DataWrapperType::INTERNAL_MEMORY_STATS, foreign_storage::DataWrapperType::INTERNAL_STORAGE_STATS, foreign_storage::DataWrapperType::PARQUET, foreign_storage::DataWrapperType::REGEX_PARSER, UNREACHABLE, foreign_storage::CsvDataWrapper::validateAndGetIsS3Select(), and validation_data_wrappers_.

Referenced by foreign_storage::ForeignServer::validateStorageParameters().

368  {
369  bool is_s3_select_wrapper{false};
370  std::string data_wrapper_type_key{data_wrapper_type};
371  constexpr const char* S3_SELECT_WRAPPER_KEY = "CSV_S3_SELECT";
372  if (foreign_table && data_wrapper_type == DataWrapperType::CSV &&
374  is_s3_select_wrapper = true;
375  data_wrapper_type_key = S3_SELECT_WRAPPER_KEY;
376  }
377 
378  if (validation_data_wrappers_.find(data_wrapper_type_key) ==
380  if (data_wrapper_type == DataWrapperType::CSV) {
381  if (is_s3_select_wrapper) {
382  UNREACHABLE();
383  } else {
384  validation_data_wrappers_[data_wrapper_type_key] =
385  std::make_unique<CsvDataWrapper>();
386  }
387 #ifdef ENABLE_IMPORT_PARQUET
388  } else if (data_wrapper_type == DataWrapperType::PARQUET) {
389  validation_data_wrappers_[data_wrapper_type_key] =
390  std::make_unique<ParquetDataWrapper>();
391 #endif
392  } else if (data_wrapper_type == DataWrapperType::REGEX_PARSER) {
393  validation_data_wrappers_[data_wrapper_type_key] =
394  std::make_unique<RegexParserDataWrapper>();
395  } else if (data_wrapper_type == DataWrapperType::INTERNAL_CATALOG) {
396  validation_data_wrappers_[data_wrapper_type_key] =
397  std::make_unique<InternalCatalogDataWrapper>();
398  } else if (data_wrapper_type == DataWrapperType::INTERNAL_MEMORY_STATS) {
399  validation_data_wrappers_[data_wrapper_type_key] =
400  std::make_unique<InternalMemoryStatsDataWrapper>();
401  } else if (data_wrapper_type == DataWrapperType::INTERNAL_STORAGE_STATS) {
402  validation_data_wrappers_[data_wrapper_type_key] =
403  std::make_unique<InternalStorageStatsDataWrapper>();
404  } else if (data_wrapper_type == DataWrapperType::INTERNAL_LOGS) {
405  validation_data_wrappers_[data_wrapper_type_key] =
406  std::make_unique<InternalLogsDataWrapper>();
407  } else {
408  UNREACHABLE();
409  }
410  }
411  CHECK(validation_data_wrappers_.find(data_wrapper_type_key) !=
413  return *validation_data_wrappers_[data_wrapper_type_key];
414 }
static constexpr char const * REGEX_PARSER
static constexpr char const * INTERNAL_STORAGE_STATS
#define UNREACHABLE()
Definition: Logger.h:337
static bool validateAndGetIsS3Select(const ForeignTable *foreign_table)
static constexpr char const * INTERNAL_CATALOG
static std::map< std::string, std::unique_ptr< ForeignDataWrapper > > validation_data_wrappers_
static constexpr char const * INTERNAL_MEMORY_STATS
#define CHECK(condition)
Definition: Logger.h:291
static constexpr char const * CSV
static constexpr char const * INTERNAL_LOGS
static constexpr char const * PARQUET

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::unique_ptr< UserMapping > foreign_storage::ForeignDataWrapperFactory::createUserMappingProxyIfApplicable ( const int  db_id,
const int  user_id,
const std::string &  file_path,
const import_export::CopyParams copy_params,
const ForeignServer server 
)
static

Definition at line 173 of file ForeignDataWrapperFactory.cpp.

Referenced by foreign_storage::create_proxy_fsi_objects().

178  {
179  return {};
180 }

+ Here is the caller graph for this function:

void foreign_storage::ForeignDataWrapperFactory::validateDataWrapperType ( const std::string &  data_wrapper_type)
static

Checks that the given data wrapper type is valid.

Definition at line 416 of file ForeignDataWrapperFactory.cpp.

References shared::contains(), foreign_storage::DataWrapperType::INTERNAL_DATA_WRAPPERS, join(), foreign_storage::DataWrapperType::supported_data_wrapper_types, and run_benchmark_import::type.

Referenced by foreign_storage::ForeignServer::validate().

417  {
418  const auto& supported_wrapper_types = DataWrapperType::supported_data_wrapper_types;
419  if (std::find(supported_wrapper_types.begin(),
420  supported_wrapper_types.end(),
421  data_wrapper_type) == supported_wrapper_types.end()) {
422  std::vector<std::string_view> user_facing_wrapper_types;
423  for (const auto& type : supported_wrapper_types) {
425  user_facing_wrapper_types.emplace_back(type);
426  }
427  }
428  throw std::runtime_error{"Invalid data wrapper type \"" + data_wrapper_type +
429  "\". Data wrapper type must be one of the following: " +
430  join(user_facing_wrapper_types, ", ") + "."};
431  }
432 }
bool contains(const T &container, const U &element)
Definition: misc.h:195
static constexpr std::array< std::string_view, 7 > supported_data_wrapper_types
std::string join(T const &container, std::string const &delim)
static constexpr std::array< char const *, 4 > INTERNAL_DATA_WRAPPERS

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::map< std::string, std::unique_ptr< ForeignDataWrapper > > foreign_storage::ForeignDataWrapperFactory::validation_data_wrappers_
staticprivate

Definition at line 160 of file ForeignDataWrapperFactory.h.

Referenced by createForValidation().


The documentation for this class was generated from the following files: