rootValueChanged returns whether the new root value is different from the old one
(newRoot *RootValue, root *RootValue)
| 583 | |
| 584 | // rootValueChanged returns whether the new root value is different from the old one |
| 585 | func rootValueChanged(newRoot *RootValue, root *RootValue) (error, bool) { |
| 586 | if newRoot == root { |
| 587 | return nil, false |
| 588 | } |
| 589 | |
| 590 | newHash, err := newRoot.HashOf() |
| 591 | if err != nil { |
| 592 | return err, false |
| 593 | } |
| 594 | |
| 595 | oldHash, err := root.HashOf() |
| 596 | if err != nil { |
| 597 | return err, false |
| 598 | } |
| 599 | |
| 600 | if newHash == oldHash { |
| 601 | return nil, false |
| 602 | } |
| 603 | |
| 604 | return nil, true |
| 605 | } |
| 606 | |
| 607 | // databasesInContext returns all databases found within the context values. |
| 608 | func databasesInContext(ctx *sql.Context, cv *contextValues) []string { |
no test coverage detected