chore: refactor (#5071)

This commit is contained in:
Kevin Wan
2025-08-09 12:27:43 +08:00
committed by GitHub
parent 130e1ba963
commit 9fd1f29845
2 changed files with 2 additions and 2 deletions

View File

@@ -39,8 +39,8 @@ type Join []string
func genCacheKeys(prefix string, table parser.Table) (Key, []Key) {
var primaryKey Key
uniqueKey := make([]Key, 0, len(table.UniqueIndex))
primaryKey = genCacheKey(prefix, table.Db, table.Name, []*parser.Field{&table.PrimaryKey.Field})
uniqueKey := make([]Key, 0, len(table.UniqueIndex))
for _, each := range table.UniqueIndex {
uniqueKey = append(uniqueKey, genCacheKey(prefix, table.Db, table.Name, each))
}