(ctx context.Context, cCtx base.CompletionContext, statement string, caretLine int, caretOffset int)
| 26 | } |
| 27 | |
| 28 | func Completion(ctx context.Context, cCtx base.CompletionContext, statement string, caretLine int, caretOffset int) ([]base.Candidate, error) { |
| 29 | completer := NewStandardCompleter(ctx, cCtx, statement, caretLine, caretOffset) |
| 30 | result, err := completer.completion() |
| 31 | if err != nil { |
| 32 | return nil, err |
| 33 | } |
| 34 | if len(result) > 0 { |
| 35 | return result, nil |
| 36 | } |
| 37 | |
| 38 | trickyCompleter := NewTrickyCompleter(ctx, cCtx, statement, caretLine, caretOffset) |
| 39 | return trickyCompleter.completion() |
| 40 | } |
| 41 | |
| 42 | func computeSQLAndByteOffset(statement string, caretLine int, caretOffset int, tricky bool) (string, int) { |
| 43 | var sql string |
nothing calls this directly
no test coverage detected