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

Function isOracleSelectFromDual

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

Source from the content-addressed store, hash-verified

397}
398
399func isOracleSelectFromDual(selectStmt *oracleast.SelectStmt) bool {
400 if selectStmt.FromClause == nil || len(selectStmt.FromClause.Items) != 1 {
401 return false
402 }
403 tableRef, ok := selectStmt.FromClause.Items[0].(*oracleast.TableRef)
404 if !ok || tableRef.Name == nil {
405 return false
406 }
407 return tableRef.Alias == nil &&
408 tableRef.Name.Schema == "" &&
409 tableRef.Name.DBLink == "" &&
410 strings.EqualFold(tableRef.Name.Name, "DUAL")
411}
412
413func hasOracleSubqueriesInSelection(selectStmt *oracleast.SelectStmt) bool {
414 if selectStmt.TargetList == nil || len(selectStmt.TargetList.Items) == 0 {

Callers 1

skipAddLimitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected