MCPcopy Create free account
hub / github.com/bytebase/bytebase / Diagnose

Function Diagnose

backend/plugin/parser/plsql/diagnose.go:17–25  ·  view source on GitHub ↗
(_ context.Context, _ base.DiagnoseContext, statement string)

Source from the content-addressed store, hash-verified

15}
16
17func Diagnose(_ context.Context, _ base.DiagnoseContext, statement string) ([]base.Diagnostic, error) {
18 diagnostics := make([]base.Diagnostic, 0)
19 syntaxError := parsePLSQLStatement(statement)
20 if syntaxError != nil {
21 diagnostics = append(diagnostics, base.ConvertSyntaxErrorToDiagnostic(syntaxError, statement))
22 }
23
24 return diagnostics, nil
25}
26
27func parsePLSQLStatement(statement string) *base.SyntaxError {
28 trimmedStatement := strings.TrimRightFunc(statement, unicode.IsSpace)

Calls 2

parsePLSQLStatementFunction · 0.85