MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / addTableCompletion

Function addTableCompletion

tools/shell/embedded_shell.cpp:167–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void 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
178bool isInsideCommentOrQuote(const std::string& buffer) {
179 bool insideSingleLineComment = false;

Callers 1

completionFunction · 0.85

Calls 2

linenoiseAddCompletionFunction · 0.85
lengthMethod · 0.80

Tested by

no test coverage detected