MCPcopy Index your code
hub / github.com/bytebase/bytebase / Completion

Function Completion

backend/plugin/parser/base/interface.go:151–157  ·  view source on GitHub ↗

Completion returns the completion candidates for the statement.

(ctx context.Context, engine storepb.Engine, cCtx CompletionContext, statement string, caretLine int, caretOffset int)

Source from the content-addressed store, hash-verified

149
150// Completion returns the completion candidates for the statement.
151func Completion(ctx context.Context, engine storepb.Engine, cCtx CompletionContext, statement string, caretLine int, caretOffset int) ([]Candidate, error) {
152 f, ok := completers[engine]
153 if !ok {
154 return nil, errors.Errorf("engine %s is not supported", engine)
155 }
156 return f(ctx, cCtx, statement, caretLine, caretOffset)
157}
158
159// RegisterDiagnoseFunc registers the diagnose function for the engine.
160func RegisterDiagnoseFunc(engine storepb.Engine, f DiagnoseFunc) {

Calls 2

fFunction · 0.85
ErrorfMethod · 0.80