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

Function hasOracleSubqueriesInSelection

backend/plugin/db/oracle/query.go:413–438  ·  view source on GitHub ↗
(selectStmt *oracleast.SelectStmt)

Source from the content-addressed store, hash-verified

411}
412
413func hasOracleSubqueriesInSelection(selectStmt *oracleast.SelectStmt) bool {
414 if selectStmt.TargetList == nil || len(selectStmt.TargetList.Items) == 0 {
415 return true
416 }
417 for _, item := range selectStmt.TargetList.Items {
418 target, ok := item.(*oracleast.ResTarget)
419 if !ok || target.Expr == nil {
420 return true
421 }
422 if _, ok := target.Expr.(*oracleast.Star); ok {
423 return true
424 }
425 hasSubquery := false
426 oracleast.Inspect(target.Expr, func(node oracleast.Node) bool {
427 if _, ok := node.(*oracleast.SubqueryExpr); ok {
428 hasSubquery = true
429 return false
430 }
431 return true
432 })
433 if hasSubquery {
434 return true
435 }
436 }
437 return false
438}

Callers 1

skipAddLimitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected