17 #ifndef THRIFTHANDLER_TOKENCOMPLETIONHINTS_H
18 #define THRIFTHANDLER_TOKENCOMPLETIONHINTS_H
20 #include "gen-cpp/completion_hints_types.h"
22 #include <unordered_map>
23 #include <unordered_set>
31 const std::vector<TCompletionHint>& hints);
37 std::vector<TCompletionHint>& hints,
38 const std::string& last_word,
39 const std::unordered_map<std::string, std::unordered_set<std::string>>&
40 column_names_by_table);
45 std::vector<TCompletionHint>& hints,
46 const std::string& last_word,
47 const std::unordered_map<std::string, std::unordered_set<std::string>>&
48 column_names_by_table);
54 #endif // THRIFTHANDLER_TOKENCOMPLETIONHINTS_H
std::vector< TCompletionHint > just_whitelisted_keyword_hints(const std::vector< TCompletionHint > &hints)
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 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)
std::string find_last_word_from_cursor(const std::string &sql, const int64_t cursor)
bool should_suggest_column_hints(const std::string &partial_query)