Skip to content

Commit

Permalink
Merge pull request #240 from kevinbarbour/fix/spanner-shard-query
Browse files Browse the repository at this point in the history
fix(repository): correct an issue with shard querying in spanner
  • Loading branch information
adamdecaf authored Sep 27, 2024
2 parents 5a7a219 + 1b7da02 commit 2bcce1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/shards/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@ func (r *spannerRepository) Lookup(shardKey string) (string, error) {
return "", err
}

return row.String(), nil
var shardName string
if err := row.ColumnByName("shard_name", &shardName); err != nil {
return "", err
}

return shardName, nil
}

func (r *spannerRepository) List() ([]service.ShardMapping, error) {
Expand Down

0 comments on commit 2bcce1b

Please sign in to comment.