Merge pull request #54481 from ucasfl/hints

Refactor IHints
This commit is contained in:
robot-ch-test-poll 2023-09-10 15:46:36 +02:00 committed by GitHub
commit 6f3374d684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 14 additions and 14 deletions

View File

@ -63,7 +63,7 @@ void interruptSignalHandler(int signum);
class InternalTextLogs; class InternalTextLogs;
class WriteBufferFromFileDescriptor; class WriteBufferFromFileDescriptor;
class ClientBase : public Poco::Util::Application, public IHints<2, ClientBase> class ClientBase : public Poco::Util::Application, public IHints<2>
{ {
public: public:

View File

@ -20,7 +20,7 @@ namespace ErrorCodes
* template parameter is available as Value * template parameter is available as Value
*/ */
template <typename ValueType> template <typename ValueType>
class IFactoryWithAliases : public IHints<2, IFactoryWithAliases<ValueType>> class IFactoryWithAliases : public IHints<2>
{ {
protected: protected:
using Value = ValueType; using Value = ValueType;

View File

@ -95,7 +95,7 @@ String getHintsErrorMessageSuffix(const std::vector<String> & hints);
void appendHintsMessage(String & error_message, const std::vector<String> & hints); void appendHintsMessage(String & error_message, const std::vector<String> & hints);
template <size_t MaxNumHints, typename Self> template <size_t MaxNumHints = 1>
class IHints class IHints
{ {
public: public:

View File

@ -1073,7 +1073,7 @@ DECLARE_SETTINGS_TRAITS_ALLOW_CUSTOM_SETTINGS(SettingsTraits, LIST_OF_SETTINGS)
/** Settings of query execution. /** Settings of query execution.
* These settings go to users.xml. * These settings go to users.xml.
*/ */
struct Settings : public BaseSettings<SettingsTraits>, public IHints<2, Settings> struct Settings : public BaseSettings<SettingsTraits>, public IHints<2>
{ {
Settings() = default; Settings() = default;

View File

@ -13,7 +13,7 @@ namespace ErrorCodes
} }
template <typename T> template <typename T>
class EnumValues : public IHints<1, EnumValues<T>> class EnumValues : public IHints<>
{ {
public: public:
using Value = std::pair<std::string, T>; using Value = std::pair<std::string, T>;

View File

@ -15,7 +15,7 @@ class BackupEntriesCollector;
class RestorerFromBackup; class RestorerFromBackup;
/// Factory for SQLUserDefinedFunctions /// Factory for SQLUserDefinedFunctions
class UserDefinedSQLFunctionFactory : public IHints<1, UserDefinedSQLFunctionFactory> class UserDefinedSQLFunctionFactory : public IHints<>
{ {
public: public:
static UserDefinedSQLFunctionFactory & instance(); static UserDefinedSQLFunctionFactory & instance();

View File

@ -61,7 +61,7 @@ namespace ErrorCodes
extern const int UNFINISHED; extern const int UNFINISHED;
} }
class DatabaseNameHints : public IHints<1, DatabaseNameHints> class DatabaseNameHints : public IHints<>
{ {
public: public:
explicit DatabaseNameHints(const DatabaseCatalog & database_catalog_) explicit DatabaseNameHints(const DatabaseCatalog & database_catalog_)

View File

@ -30,7 +30,7 @@ namespace fs = std::filesystem;
namespace DB namespace DB
{ {
class TableNameHints : public IHints<1, TableNameHints> class TableNameHints : public IHints<>
{ {
public: public:
TableNameHints(ConstDatabasePtr database_, ContextPtr context_) TableNameHints(ConstDatabasePtr database_, ContextPtr context_)

View File

@ -7,7 +7,7 @@
namespace DB namespace DB
{ {
class HTTPPathHints : public IHints<1, HTTPPathHints> class HTTPPathHints : public IHints<>
{ {
public: public:
std::vector<String> getAllRegisteredNames() const override; std::vector<String> getAllRegisteredNames() const override;

View File

@ -98,7 +98,7 @@ struct ColumnDescription
/// Description of multiple table columns (in CREATE TABLE for example). /// Description of multiple table columns (in CREATE TABLE for example).
class ColumnsDescription : public IHints<1, ColumnsDescription> class ColumnsDescription : public IHints<>
{ {
public: public:
ColumnsDescription() = default; ColumnsDescription() = default;

View File

@ -91,7 +91,7 @@ using IndexSize = ColumnSize;
* - data storage structure (compression, etc.) * - data storage structure (compression, etc.)
* - concurrent access to data (locks, etc.) * - concurrent access to data (locks, etc.)
*/ */
class IStorage : public std::enable_shared_from_this<IStorage>, public TypePromotion<IStorage>, public IHints<1, IStorage> class IStorage : public std::enable_shared_from_this<IStorage>, public TypePromotion<IStorage>, public IHints<>
{ {
public: public:
IStorage() = delete; IStorage() = delete;

View File

@ -62,7 +62,7 @@ struct IndexDescription
}; };
/// All secondary indices in storage /// All secondary indices in storage
struct IndicesDescription : public std::vector<IndexDescription>, IHints<1, IndicesDescription> struct IndicesDescription : public std::vector<IndexDescription>, IHints<>
{ {
/// Index with name exists /// Index with name exists
bool has(const String & name) const; bool has(const String & name) const;

View File

@ -106,7 +106,7 @@ struct ProjectionDescription
using ProjectionDescriptionRawPtr = const ProjectionDescription *; using ProjectionDescriptionRawPtr = const ProjectionDescription *;
/// All projections in storage /// All projections in storage
struct ProjectionsDescription : public IHints<1, ProjectionsDescription> struct ProjectionsDescription : public IHints<>
{ {
ProjectionsDescription() = default; ProjectionsDescription() = default;
ProjectionsDescription(ProjectionsDescription && other) = default; ProjectionsDescription(ProjectionsDescription && other) = default;

View File

@ -22,7 +22,7 @@ struct StorageID;
* In 'columns' Nested data structures must be flattened. * In 'columns' Nested data structures must be flattened.
* You should subsequently call IStorage::startup method to work with table. * You should subsequently call IStorage::startup method to work with table.
*/ */
class StorageFactory : private boost::noncopyable, public IHints<1, StorageFactory> class StorageFactory : private boost::noncopyable, public IHints<>
{ {
public: public: