2017-11-28 11:00:07 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Poco/AutoPtr.h>
|
|
|
|
#include <Poco/Timestamp.h>
|
|
|
|
#include <Poco/Util/AbstractConfiguration.h>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <set>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
/** Repository with configurations of user-defined objects (dictionaries, models).
|
|
|
|
* Used by ExternalLoader.
|
2018-05-07 02:01:11 +00:00
|
|
|
*/
|
2017-11-28 11:00:07 +00:00
|
|
|
class IExternalLoaderConfigRepository
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
using Files = std::set<std::string>;
|
|
|
|
virtual Files list(const Poco::Util::AbstractConfiguration & config, const std::string & path_key) const = 0;
|
|
|
|
|
|
|
|
virtual bool exists(const std::string & config_file) const = 0;
|
|
|
|
|
|
|
|
virtual Poco::Timestamp getLastModificationTime(const std::string & config_file) const = 0;
|
|
|
|
|
2018-11-27 16:11:46 +00:00
|
|
|
virtual Poco::AutoPtr<Poco::Util::AbstractConfiguration> load(const std::string & config_file, const std::string & preprocessed_dir = "") const = 0;
|
2017-11-28 11:00:07 +00:00
|
|
|
|
|
|
|
virtual ~IExternalLoaderConfigRepository() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|