17 #ifndef THRIFTHANDLER_TOKENCOMPLETIONHINTS_H
18 #define THRIFTHANDLER_TOKENCOMPLETIONHINTS_H
20 #include "gen-cpp/completion_hints_types.h"
24 #include <unordered_map>
25 #include <unordered_set>
33 const std::vector<TCompletionHint>& hints);
39 std::vector<TCompletionHint>& hints,
40 const std::string& last_word,
41 const std::unordered_map<std::string, std::unordered_set<std::string>>&
42 column_names_by_table);
47 std::vector<TCompletionHint>& hints,
48 const std::string& last_word,
49 const std::unordered_map<std::string, std::unordered_set<std::string>>&
50 column_names_by_table);
56 #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)