OmniSciDB  a667adc9c8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AbstractFileStorageDataWrapper.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "ForeignDataWrapper.h"
4 
5 namespace foreign_storage {
7  public:
9 
10  void validateServerOptions(const ForeignServer* foreign_server) const override;
11 
12  void validateTableOptions(const ForeignTable* foreign_table) const override;
13 
14  const std::set<std::string_view>& getSupportedTableOptions() const override;
15 
16  void validateUserMappingOptions(const UserMapping* user_mapping,
17  const ForeignServer* foreign_server) const override;
18 
19  const std::set<std::string_view>& getSupportedUserMappingOptions() const override;
20 
21  inline static const std::string STORAGE_TYPE_KEY = "STORAGE_TYPE";
22  inline static const std::string BASE_PATH_KEY = "BASE_PATH";
23  inline static const std::string FILE_PATH_KEY = "FILE_PATH";
24  inline static const std::string LOCAL_FILE_STORAGE_TYPE = "LOCAL_FILE";
25  inline static const std::string S3_STORAGE_TYPE = "AWS_S3";
26 
27  inline static const std::array<std::string, 1> supported_storage_types{
29 
30  protected:
35  static std::string getFullFilePath(const ForeignTable* foreign_table);
36 
37  private:
38  static void validateFilePath(const ForeignTable* foreign_table);
39 
40  // A valid path is a concatenation of the file_path and the base_path (for local
41  // storage). One of the two must be present.
42  static void validateFilePathOptionKey(const ForeignTable* foreign_table);
43 
44  static const std::set<std::string_view> supported_table_options_;
45  static const std::set<std::string_view> supported_server_options_;
46  static const std::set<std::string_view> supported_user_mapping_options_;
47 };
48 } // namespace foreign_storage
const std::set< std::string_view > & getSupportedUserMappingOptions() const override
static void validateFilePathOptionKey(const ForeignTable *foreign_table)
static const std::array< std::string, 1 > supported_storage_types
void validateUserMappingOptions(const UserMapping *user_mapping, const ForeignServer *foreign_server) const override
static const std::set< std::string_view > supported_server_options_
void validateTableOptions(const ForeignTable *foreign_table) const override
static const std::set< std::string_view > supported_user_mapping_options_
const std::set< std::string_view > & getSupportedTableOptions() const override
void validateServerOptions(const ForeignServer *foreign_server) const override
static const std::set< std::string_view > supported_table_options_
static std::string getFullFilePath(const ForeignTable *foreign_table)
Returns the path to the source file/dir of the table. Depending on options this may result from a con...
static void validateFilePath(const ForeignTable *foreign_table)