OmniSciDB
a5dc49c757
|
#include "TokenCompletionHints.h"
#include "Shared/StringTransform.h"
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/tokenizer.hpp>
Go to the source code of this file.
Namespaces | |
anonymous_namespace{TokenCompletionHints.cpp} | |
Functions | |
bool | anonymous_namespace{TokenCompletionHints.cpp}::is_qualified_identifier_part (const char ch) |
std::string | find_last_word_from_cursor (const std::string &sql, const int64_t cursor) |
std::vector< TCompletionHint > | just_whitelisted_keyword_hints (const std::vector< TCompletionHint > &hints) |
bool | get_qualified_column_hints (std::vector< TCompletionHint > &hints, const std::string &last_word, const std::unordered_map< std::string, std::unordered_set< std::string >> &column_names_by_table) |
void | get_column_hints (std::vector< TCompletionHint > &hints, const std::string &last_word, const std::unordered_map< std::string, std::unordered_set< std::string >> &column_names_by_table) |
bool | should_suggest_column_hints (const std::string &partial_query) |
std::string find_last_word_from_cursor | ( | const std::string & | sql, |
const int64_t | cursor | ||
) |
Definition at line 33 of file TokenCompletionHints.cpp.
References anonymous_namespace{TokenCompletionHints.cpp}::is_qualified_identifier_part().
Referenced by DBHandler::get_token_based_completions().
void get_column_hints | ( | std::vector< TCompletionHint > & | hints, |
const std::string & | last_word, | ||
const std::unordered_map< std::string, std::unordered_set< std::string >> & | column_names_by_table | ||
) |
Definition at line 125 of file TokenCompletionHints.cpp.
Referenced by DBHandler::get_token_based_completions().
bool get_qualified_column_hints | ( | std::vector< TCompletionHint > & | hints, |
const std::string & | last_word, | ||
const std::unordered_map< std::string, std::unordered_set< std::string >> & | column_names_by_table | ||
) |
Definition at line 94 of file TokenCompletionHints.cpp.
References join(), and split().
Referenced by DBHandler::get_token_based_completions().
std::vector<TCompletionHint> just_whitelisted_keyword_hints | ( | const std::vector< TCompletionHint > & | hints | ) |
Definition at line 66 of file TokenCompletionHints.cpp.
References to_upper().
Referenced by DBHandler::get_completion_hints_unsorted().
bool should_suggest_column_hints | ( | const std::string & | partial_query | ) |
Definition at line 148 of file TokenCompletionHints.cpp.
References to_upper().
Referenced by DBHandler::get_token_based_completions().