(expr ast.TableExpr, database, table string)
| 346 | } |
| 347 | |
| 348 | func 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 | |
| 362 | func equalOrLess(a, b *storepb.Position) bool { |
| 363 | if a.Line < b.Line { |