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

Function tableExprReferences

backend/plugin/parser/mysql/restore.go:348–360  ·  view source on GitHub ↗
(expr ast.TableExpr, database, table string)

Source from the content-addressed store, hash-verified

346}
347
348func tableExprReferences(expr ast.TableExpr, database, table string) bool {
349 switch n := expr.(type) {
350 case *ast.TableRef:
351 db := n.Schema
352 if db == "" {
353 db = database
354 }
355 return db == database && strings.EqualFold(n.Name, table)
356 case *ast.JoinClause:
357 return tableExprReferences(n.Left, database, table) || tableExprReferences(n.Right, database, table)
358 }
359 return false
360}
361
362func equalOrLess(a, b *storepb.Position) bool {
363 if a.Line < b.Line {

Callers 1

containsTableFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected