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

Function updateTable

db/journal/store.go:146–161  ·  view source on GitHub ↗
(table map[string]Entry, e Entry)

Source from the content-addressed store, hash-verified

144}
145
146func updateTable(table map[string]Entry, e Entry) {
147 switch e := e.(type) {
148 case *Add:
149 table[e.Entry.Key()] = e.Entry
150 case *Update:
151 key := e.Key()
152 if _, ok := table[key]; !ok {
153 panic(fmt.Errorf("update to non-existent key in journal store: %T", key))
154 }
155 table[key] = e.Entry
156 case *Delete:
157 delete(table, e.EntryKey)
158 default:
159 panic(fmt.Errorf("unknown type in journal store: %T", e))
160 }
161}
162
163func (s *Store) newUnmarshaler() *sup.UnmarshalBSUPContext {
164 unmarshaler := sup.NewBSUPUnmarshaler()

Callers 2

loadMethod · 0.85
putBaseMethod · 0.85

Calls 1

KeyMethod · 0.65

Tested by

no test coverage detected