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

Method NewCommitObject

db/commits/patch.go:106–121  ·  view source on GitHub ↗
(parent ksuid.KSUID, retries int, author, message string, meta super.Value)

Source from the content-addressed store, hash-verified

104}
105
106func (p *Patch) NewCommitObject(parent ksuid.KSUID, retries int, author, message string, meta super.Value) *Object {
107 o := NewObject(parent, author, message, meta, retries)
108 for _, id := range p.deletedObjects {
109 o.appendDelete(id)
110 }
111 for _, s := range p.diff.objects {
112 o.appendAdd(s)
113 }
114 for _, id := range p.deletedVectors {
115 o.appendDeleteVector(id)
116 }
117 for id := range p.diff.vectors {
118 o.appendAddVector(id)
119 }
120 return o
121}
122
123func (p *Patch) Revert(tip *Snapshot, commit, parent ksuid.KSUID, retries int, author, message string) (*Object, error) {
124 object := NewObject(parent, author, message, super.Null, retries)

Callers 3

DeleteWhereMethod · 0.95
CommitCompactMethod · 0.95
buildMergeObjectMethod · 0.80

Calls 5

appendDeleteMethod · 0.95
appendAddMethod · 0.95
appendDeleteVectorMethod · 0.95
appendAddVectorMethod · 0.95
NewObjectFunction · 0.70

Tested by

no test coverage detected