ObjectAdded updates the block meta appropriately based on information about an added record start/end are unix epoch seconds, when 0 the start and the end are not applied.
(start, end uint32)
| 253 | // ObjectAdded updates the block meta appropriately based on information about an added record |
| 254 | // start/end are unix epoch seconds, when 0 the start and the end are not applied. |
| 255 | func (b *BlockMeta) ObjectAdded(start, end uint32) { |
| 256 | if start > 0 { |
| 257 | startTime := time.Unix(int64(start), 0) |
| 258 | if b.StartTime.IsZero() || startTime.Before(b.StartTime) { |
| 259 | b.StartTime = startTime |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | if end > 0 { |
| 264 | endTime := time.Unix(int64(end), 0) |
| 265 | if b.EndTime.IsZero() || endTime.After(b.EndTime) { |
| 266 | b.EndTime = endTime |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | b.TotalObjects++ |
| 271 | } |
| 272 | |
| 273 | func (b *BlockMeta) DedicatedColumnsHash() uint64 { |
| 274 | return b.DedicatedColumns.Hash() |
no outgoing calls