From: Mu-Woong Lee Date: Wed, 12 Jul 2017 10:13:59 +0000 (+0900) Subject: Apply the changed function names in context-common X-Git-Tag: accepted/tizen/4.0/unified/20170816.011457^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ac752d838907860c1f701121aa71493adc2e5fa;p=platform%2Fcore%2Fcontext%2Fcontext-store.git Apply the changed function names in context-common Change-Id: Ib2ddcfc868cede417024d1b8e206ebae703d5b84 Signed-off-by: Mu-Woong Lee (cherry picked from commit c94595a84ba9d11c5f241dcb2be623f34a77a845) --- diff --git a/src/client/context_store.cpp b/src/client/context_store.cpp index 0c74817..d3e1f50 100644 --- a/src/client/context_store.cpp +++ b/src/client/context_store.cpp @@ -149,7 +149,7 @@ EXPORT_API int ctx_store_retrieve(ctx_store_h store, const char* projection, } csr->index = 0; - csr->keys = util::tokenizeString(query.projection, ", "); + csr->keys = util::tokenize_string(query.projection, ", "); csr->tuples = tuples; *cursor = csr; diff --git a/src/server/QueryChecker.cpp b/src/server/QueryChecker.cpp index 5c1172c..d7aa0a7 100644 --- a/src/server/QueryChecker.cpp +++ b/src/server/QueryChecker.cpp @@ -59,7 +59,7 @@ bool QueryChecker::validateUri(const std::string& uri) bool QueryChecker::validateColumns(const std::string& columns) { - std::vector tokens = util::tokenizeString(columns, ","); + std::vector tokens = util::tokenize_string(columns, ","); for (auto& token : tokens) { if (!__isColumnName(token)) return false; @@ -70,7 +70,7 @@ bool QueryChecker::validateColumns(const std::string& columns) bool QueryChecker::validateProjection(const std::string& projection) { - std::vector tokens = util::tokenizeString(projection, ","); + std::vector tokens = util::tokenize_string(projection, ","); for (auto& token : tokens) { if (!__isColumnName(token) && !__isAggregation(token)) return false; @@ -87,7 +87,7 @@ bool QueryChecker::validateSelection(const std::string& selection) static std::regex quotedStrRegex(QUOTED_REGEX, std::regex::optimize); std::string stripped = std::regex_replace(selection, quotedStrRegex, " "); - std::vector tokens = util::tokenizeString(stripped, " ()!<>="); + std::vector tokens = util::tokenize_string(stripped, " ()!<>="); for (auto& token : tokens) { if (!__isColumnName(token) && !__isNumber(token)) return false; @@ -109,7 +109,7 @@ bool QueryChecker::validateHaving(const std::string& having) if (having.empty()) return true; - std::vector tokens = util::tokenizeString(having, "!<>="); + std::vector tokens = util::tokenize_string(having, "!<>="); if (tokens.size() != 2) return false; @@ -130,7 +130,7 @@ bool QueryChecker::validateSortOrder(const std::string& sortOrder) static std::regex orderRegex(ORDER_REGEX, std::regex::optimize); - std::vector tokens = util::tokenizeString(sortOrder, ","); + std::vector tokens = util::tokenize_string(sortOrder, ","); for (auto& token : tokens) { token = std::regex_replace(token, orderRegex, EMPTY_STR); diff --git a/src/server/SchemaLoader.cpp b/src/server/SchemaLoader.cpp index 4b6ae25..3133fe2 100644 --- a/src/server/SchemaLoader.cpp +++ b/src/server/SchemaLoader.cpp @@ -98,7 +98,7 @@ bool SchemaLoader::load() bool SchemaLoader::__createMetadataTables() { - std::string path = util::getSystemPath(TZ_SYS_DATA, BASE_PATH "/init.sql"); + std::string path = util::get_system_path(TZ_SYS_DATA, BASE_PATH "/init.sql"); IF_FAIL_RETURN(!path.empty(), false); std::ifstream inFile(path); @@ -110,7 +110,7 @@ bool SchemaLoader::__createMetadataTables() bool SchemaLoader::__loadSchemaDir(const std::string& dirPath) { - auto fileNames = util::getFiles(dirPath); + auto fileNames = util::get_files(dirPath); if (fileNames.empty()) return false; @@ -337,7 +337,7 @@ Database& SystemSchemaLoader::__getDatabase() std::string SystemSchemaLoader::__getSchemaDir() { - return util::getSystemPath(TZ_SYS_DATA, BASE_PATH "/system"); + return util::get_system_path(TZ_SYS_DATA, BASE_PATH "/system"); } @@ -352,5 +352,5 @@ Database& UserSchemaLoader::__getDatabase() std::string UserSchemaLoader::__getSchemaDir() { - return util::getSystemPath(TZ_SYS_DATA, BASE_PATH "/user"); + return util::get_system_path(TZ_SYS_DATA, BASE_PATH "/user"); } diff --git a/src/server/StoreManager.cpp b/src/server/StoreManager.cpp index 1ff2b4c..0792c11 100644 --- a/src/server/StoreManager.cpp +++ b/src/server/StoreManager.cpp @@ -86,8 +86,8 @@ Store* StoreManager::__createStore(Database& database, std::list& stores store->metadata.columns = columns; store->metadata.retention= static_cast(retention); store->metadata.limit = static_cast(limit); - store->metadata.readPrivileges = util::tokenizeString(readPrivil, PRIVILEGE_DELIM); - store->metadata.writePrivileges = util::tokenizeString(writePrivil, PRIVILEGE_DELIM); + store->metadata.readPrivileges = util::tokenize_string(readPrivil, PRIVILEGE_DELIM); + store->metadata.writePrivileges = util::tokenize_string(writePrivil, PRIVILEGE_DELIM); stores.push_front(store); if (stores.size() > CACHE_SIZE) {