OmniSciDB  c0231cc57d
 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 shared::FilePathOptions &options)
 
S3ObjectComparator getFileComparator () override
 
- Public Member Functions inherited from shared::FileOrderBase< S3ObjectComparator >
 FileOrderBase (const FilePathOptions &options)
 
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 18 of file S3FilePathUtil.h.

Constructor & Destructor Documentation

foreign_storage::FileOrderS3::FileOrderS3 ( const shared::FilePathOptions options)
inline

Definition at line 20 of file S3FilePathUtil.h.

21  : FileOrderBase<S3ObjectComparator>(options) {}

Member Function Documentation

S3ObjectComparator foreign_storage::FileOrderS3::getFileComparator ( )
inlineoverridevirtual

Implements shared::FileOrderBase< S3ObjectComparator >.

Definition at line 23 of file S3FilePathUtil.h.

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

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

+ 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 30 of file S3FilePathUtil.h.

Referenced by getFileComparator().


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