mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-05 13:28:49 +08:00
replace metaOptions with meta_options (#1979)
* replace metaOptions with meta_options Signed-off-by: huanghua <bruce.huang@hotmail.com> * typo Signed-off-by: groot <yihua.mo@zilliz.com> Co-authored-by: groot <yihua.mo@zilliz.com>
This commit is contained in:
parent
50ddc49332
commit
008f24a7c2
@ -44,8 +44,8 @@ MetaFactory::BuildOption(const std::string& path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
meta::MetaPtr
|
meta::MetaPtr
|
||||||
MetaFactory::Build(const DBMetaOptions& metaOptions, const int& mode) {
|
MetaFactory::Build(const DBMetaOptions& meta_options, const int& mode) {
|
||||||
std::string uri = metaOptions.backend_uri_;
|
std::string uri = meta_options.backend_uri_;
|
||||||
|
|
||||||
utils::MetaUriInfo uri_info;
|
utils::MetaUriInfo uri_info;
|
||||||
auto status = utils::ParseMetaUri(uri, uri_info);
|
auto status = utils::ParseMetaUri(uri, uri_info);
|
||||||
@ -56,10 +56,10 @@ MetaFactory::Build(const DBMetaOptions& metaOptions, const int& mode) {
|
|||||||
|
|
||||||
if (strcasecmp(uri_info.dialect_.c_str(), "mysql") == 0) {
|
if (strcasecmp(uri_info.dialect_.c_str(), "mysql") == 0) {
|
||||||
LOG_ENGINE_INFO_ << "Using MySQL";
|
LOG_ENGINE_INFO_ << "Using MySQL";
|
||||||
return std::make_shared<meta::MySQLMetaImpl>(metaOptions, mode);
|
return std::make_shared<meta::MySQLMetaImpl>(meta_options, mode);
|
||||||
} else if (strcasecmp(uri_info.dialect_.c_str(), "sqlite") == 0) {
|
} else if (strcasecmp(uri_info.dialect_.c_str(), "sqlite") == 0) {
|
||||||
LOG_ENGINE_INFO_ << "Using SQLite";
|
LOG_ENGINE_INFO_ << "Using SQLite";
|
||||||
return std::make_shared<meta::SqliteMetaImpl>(metaOptions);
|
return std::make_shared<meta::SqliteMetaImpl>(meta_options);
|
||||||
} else {
|
} else {
|
||||||
LOG_ENGINE_ERROR_ << "Invalid dialect in URI: dialect = " << uri_info.dialect_;
|
LOG_ENGINE_ERROR_ << "Invalid dialect in URI: dialect = " << uri_info.dialect_;
|
||||||
throw InvalidArgumentException("URI dialect is not mysql / sqlite");
|
throw InvalidArgumentException("URI dialect is not mysql / sqlite");
|
||||||
|
@ -25,7 +25,7 @@ class MetaFactory {
|
|||||||
BuildOption(const std::string& path = "");
|
BuildOption(const std::string& path = "");
|
||||||
|
|
||||||
static meta::MetaPtr
|
static meta::MetaPtr
|
||||||
Build(const DBMetaOptions& metaOptions, const int& mode);
|
Build(const DBMetaOptions& meta_options, const int& mode);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace engine
|
} // namespace engine
|
||||||
|
Loading…
Reference in New Issue
Block a user