| 165 | } |
| 166 | |
| 167 | void addTableCompletion(const std::string& buf, const std::string& tableName, |
| 168 | linenoiseCompletions* lc) { |
| 169 | std::string prefix, suffix; |
| 170 | auto prefixPos = buf.rfind(':') + 1; |
| 171 | prefix = buf.substr(0, prefixPos); |
| 172 | suffix = buf.substr(prefixPos); |
| 173 | if (suffix == tableName.substr(0, suffix.length())) { |
| 174 | linenoiseAddCompletion(lc, (prefix + tableName).c_str()); |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | bool isInsideCommentOrQuote(const std::string& buffer) { |
| 179 | bool insideSingleLineComment = false; |
no test coverage detected