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

Function oracleListText

backend/plugin/parser/plsql/backup.go:327–344  ·  view source on GitHub ↗
(sql string, list *oracleast.List)

Source from the content-addressed store, hash-verified

325}
326
327func oracleListText(sql string, list *oracleast.List) (string, int, bool) {
328 if list == nil || list.Len() == 0 {
329 return "", 0, false
330 }
331 start, ok := oracleNodeLoc(list.Items[0])
332 if !ok {
333 return "", 0, false
334 }
335 end, ok := oracleNodeLoc(list.Items[list.Len()-1])
336 if !ok {
337 return "", 0, false
338 }
339 text := strings.TrimSpace(oracleLocText(sql, start.Start, end.End))
340 if text == "" {
341 return "", 0, false
342 }
343 return text, end.End, true
344}
345
346func oracleWhereSuffix(sql string, start int, where oracleast.ExprNode) string {
347 loc, ok := oracleNodeLoc(where)

Callers 1

writeSuffixSelectClauseFunction · 0.85

Calls 3

oracleNodeLocFunction · 0.85
oracleLocTextFunction · 0.85
LenMethod · 0.80

Tested by

no test coverage detected