OmniSciDB  471d68cefb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
foreign_storage::FileOrderS3 Class Reference

#include <S3FilePathUtil.h>

+ Inheritance diagram for foreign_storage::FileOrderS3:
+ Collaboration diagram for foreign_storage::FileOrderS3:

Public Member Functions

 FileOrderS3 (const std::optional< std::string > &sort_regex, const std::optional< std::string > &sort_by)
 
S3ObjectComparator getFileComparator () override
 
- Public Member Functions inherited from shared::FileOrderBase< S3ObjectComparator >
 FileOrderBase (const std::optional< std::string > &sort_regex, const std::optional< std::string > &sort_by)
 
virtual std::string concatCaptureGroups (const std::string &file_name) const
 
virtual std::string getSortBy ()
 

Protected Attributes

const std::map< std::string,
S3ObjectComparator
comparator_map_
 
- Protected Attributes inherited from shared::FileOrderBase< S3ObjectComparator >
std::optional< std::string > sort_regex_
 
std::optional< std::string > sort_by_
 

Detailed Description

Definition at line 20 of file S3FilePathUtil.h.

Constructor & Destructor Documentation

foreign_storage::FileOrderS3::FileOrderS3 ( const std::optional< std::string > &  sort_regex,
const std::optional< std::string > &  sort_by 
)
inline

Definition at line 22 of file S3FilePathUtil.h.

24  : FileOrderBase<S3ObjectComparator>(sort_regex, sort_by) {}

Member Function Documentation

S3ObjectComparator foreign_storage::FileOrderS3::getFileComparator ( )
inlineoverridevirtual

Implements shared::FileOrderBase< S3ObjectComparator >.

Definition at line 26 of file S3FilePathUtil.h.

References CHECK, comparator_map_, and shared::FileOrderBase< S3ObjectComparator >::getSortBy().

26  {
27  auto comparator_pair = comparator_map_.find(getSortBy());
28  CHECK(comparator_pair != comparator_map_.end());
29  return comparator_pair->second;
30  }
const std::map< std::string, S3ObjectComparator > comparator_map_
#define CHECK(condition)
Definition: Logger.h:209

+ Here is the call graph for this function:

Member Data Documentation

const std::map<std::string, S3ObjectComparator> foreign_storage::FileOrderS3::comparator_map_
protected
Initial value:
{
[](const Aws::S3::Model::Object& lhs, const Aws::S3::Model::Object& rhs) -> bool {
return lhs.GetKey() < rhs.GetKey();
}},
[](const Aws::S3::Model::Object& lhs, const Aws::S3::Model::Object& rhs) -> bool {
return lhs.GetLastModified() < rhs.GetLastModified();
}},
[this](const Aws::S3::Model::Object& lhs,
const Aws::S3::Model::Object& rhs) -> bool {
auto lhs_name = lhs.GetKey();
auto rhs_name = rhs.GetKey();
return this->concatCaptureGroups(lhs_name) < this->concatCaptureGroups(rhs_name);
}},
[this](const Aws::S3::Model::Object& lhs,
const Aws::S3::Model::Object& rhs) -> bool {
this->concatCaptureGroups(rhs.GetKey()));
}},
[this](const Aws::S3::Model::Object& lhs,
const Aws::S3::Model::Object& rhs) -> bool {
this->concatCaptureGroups(lhs.GetKey()),
this->concatCaptureGroups(rhs.GetKey()));
}}}

Definition at line 33 of file S3FilePathUtil.h.

Referenced by getFileComparator().


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