Class foreign_storage::ForeignDataWrapperFactory

class ForeignDataWrapperFactory

Public Static Functions

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

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

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)
std::unique_ptr<ForeignServer> createForeignServerProxy(const int db_id, const int user_id, const std::string &file_path, const import_export::CopyParams &copy_params)
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)
std::unique_ptr<ForeignDataWrapper> createForImport(const std::string &data_wrapper_type, const int db_id, const ForeignTable *foreign_table, const UserMapping *user_mapping)

Create for the import use-case.

std::unique_ptr<ForeignDataWrapper> createForGeneralImport(const std::string &data_wrapper_type, const int db_id, const ForeignTable *foreign_table, const UserMapping *user_mapping)
const ForeignDataWrapper &createForValidation(const std::string &data_wrapper_type, const ForeignTable *foreign_table = nullptr)

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.

void validateDataWrapperType(const std::string &data_wrapper_type)

Checks that the given data wrapper type is valid.

Private Static Attributes

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