Apply the changed function names in context-common 08/138508/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 12 Jul 2017 10:13:59 +0000 (19:13 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 12 Jul 2017 10:13:59 +0000 (19:13 +0900)
Change-Id: Ib2ddcfc868cede417024d1b8e206ebae703d5b84
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/client/context_store.cpp
src/server/QueryChecker.cpp
src/server/SchemaLoader.cpp
src/server/StoreManager.cpp

index 0c74817..d3e1f50 100644 (file)
@@ -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;
index 5c1172c..d7aa0a7 100644 (file)
@@ -59,7 +59,7 @@ bool QueryChecker::validateUri(const std::string& uri)
 
 bool QueryChecker::validateColumns(const std::string& columns)
 {
-       std::vector<std::string> tokens = util::tokenizeString(columns, ",");
+       std::vector<std::string> 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<std::string> tokens = util::tokenizeString(projection, ",");
+       std::vector<std::string> 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<std::string> tokens = util::tokenizeString(stripped, " ()!<>=");
+       std::vector<std::string> 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<std::string> tokens = util::tokenizeString(having, "!<>=");
+       std::vector<std::string> 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<std::string> tokens = util::tokenizeString(sortOrder, ",");
+       std::vector<std::string> tokens = util::tokenize_string(sortOrder, ",");
 
        for (auto& token : tokens) {
                token = std::regex_replace(token, orderRegex, EMPTY_STR);
index 4b6ae25..3133fe2 100644 (file)
@@ -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");
 }
index 1ff2b4c..0792c11 100644 (file)
@@ -86,8 +86,8 @@ Store* StoreManager::__createStore(Database& database, std::list<Store*>& stores
        store->metadata.columns = columns;
        store->metadata.retention= static_cast<unsigned int>(retention);
        store->metadata.limit = static_cast<unsigned int>(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) {