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;
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;
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;
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;
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);
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);
bool SchemaLoader::__loadSchemaDir(const std::string& dirPath)
{
- auto fileNames = util::getFiles(dirPath);
+ auto fileNames = util::get_files(dirPath);
if (fileNames.empty())
return false;
std::string SystemSchemaLoader::__getSchemaDir()
{
- return util::getSystemPath(TZ_SYS_DATA, BASE_PATH "/system");
+ return util::get_system_path(TZ_SYS_DATA, BASE_PATH "/system");
}
std::string UserSchemaLoader::__getSchemaDir()
{
- return util::getSystemPath(TZ_SYS_DATA, BASE_PATH "/user");
+ return util::get_system_path(TZ_SYS_DATA, BASE_PATH "/user");
}
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) {