Hash hashes the given dedicated columns configuration
()
| 394 | |
| 395 | // Hash hashes the given dedicated columns configuration |
| 396 | func (dcs DedicatedColumns) Hash() uint64 { |
| 397 | if len(dcs) == 0 { |
| 398 | return 0 |
| 399 | } |
| 400 | h := xxhash.New() |
| 401 | for _, c := range dcs { |
| 402 | _, _ = h.WriteString(string(c.Scope)) |
| 403 | _, _ = h.Write(separatorByte) |
| 404 | _, _ = h.WriteString(c.Name) |
| 405 | _, _ = h.Write(separatorByte) |
| 406 | _, _ = h.WriteString(string(c.Type)) |
| 407 | for _, opt := range c.Options { |
| 408 | _, _ = h.Write(separatorByte) |
| 409 | _, _ = h.WriteString(string(opt)) |
| 410 | } |
| 411 | } |
| 412 | return h.Sum64() |
| 413 | } |
| 414 | |
| 415 | func (dcs DedicatedColumns) Size() int { |
| 416 | if len(dcs) == 0 { |