Skip to content

Commit

Permalink
[ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/upda…
Browse files Browse the repository at this point in the history
…te.sh
  • Loading branch information
zachmu authored and coffeegoddd committed Jan 17, 2024
1 parent 32e6da5 commit d4eee91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions go/libraries/doltcore/sqle/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -1353,12 +1353,12 @@ func (db Database) GetEvents(ctx *sql.Context) (events []sql.EventDefinition, to

// NeedsToReloadEvents implements sql.EventDatabase.
func (db Database) NeedsToReloadEvents(ctx *sql.Context, token interface{}) (bool, error) {
// A nil token means no events in this db. If the dolt_schemas table doesn't exist, it will have a zero hash below
// as well, meaning we don't reload events in that case.
// A nil token means no events in this db. If the dolt_schemas table doesn't exist, it will have a zero hash below
// as well, meaning we don't reload events in that case.
if token == nil {
token = hash.Hash{}
}

hash, ok := token.(hash.Hash)
if !ok {
return false, fmt.Errorf("expected token to be hash.Hash, but received %T", token)
Expand All @@ -1368,7 +1368,7 @@ func (db Database) NeedsToReloadEvents(ctx *sql.Context, token interface{}) (boo
if err != nil {
return false, err
}

// If the current hash doesn't match what we last loaded, then we
// need to reload event definitions
return !tableHash.Equal(hash), nil
Expand Down

0 comments on commit d4eee91

Please sign in to comment.