MCPcopy Create free account
hub / github.com/brimdata/super / AddDataObject

Method AddDataObject

db/commits/snapshot.go:52–59  ·  view source on GitHub ↗
(object *data.Object)

Source from the content-addressed store, hash-verified

50}
51
52func (s *Snapshot) AddDataObject(object *data.Object) error {
53 id := object.ID
54 if _, ok := s.objects[id]; ok {
55 return fmt.Errorf("%s: add of a duplicate data object: %w", id, ErrWriteConflict)
56 }
57 s.objects[id] = object
58 return nil
59}
60
61func (s *Snapshot) DeleteObject(id ksuid.KSUID) error {
62 if _, ok := s.objects[id]; !ok {

Callers 2

CompactFunction · 0.95
VectorsFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected