Make method of DatabaseFactory

This commit is contained in:
NikBarykin 2024-09-03 19:13:05 +03:00
parent e874c6e1de
commit 83854cf293
2 changed files with 8 additions and 7 deletions

View File

@ -59,10 +59,7 @@ void cckMetadataPathForOrdinary(const ASTCreateQuery & create, const String & me
}
/// validate validates the database engine that's specified in the create query for
/// engine arguments, settings and table overrides.
void validate(const ASTCreateQuery & create_query)
void DatabaseFactory::validate(const ASTCreateQuery & create_query) const
{
auto * storage = create_query.storage;

View File

@ -63,9 +63,9 @@ public:
using DatabaseEngines = std::unordered_map<std::string, Creator>;
void registerDatabase(const std::string & name, CreatorFn creator_fn, EngineFeatures features = EngineFeatures{
supports_arguments = false,
supports_settings = false,
supports_table_overrides = false,
.supports_arguments = false,
.supports_settings = false,
.supports_table_overrides = false,
});
const DatabaseEngines & getDatabaseEngines() const { return database_engines; }
@ -82,6 +82,10 @@ private:
DatabaseEngines database_engines;
DatabasePtr getImpl(const ASTCreateQuery & create, const String & metadata_path, ContextPtr context);
/// validate validates the database engine that's specified in the create query for
/// engine arguments, settings and table overrides.
void validate(const ASTCreateQuery & create_query) const;
};
}