MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / put4

Function put4

examples/basic/main.go:137–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135}
136
137func put4() {
138 if err := db.Update(
139 func(tx *nutsdb.Tx) error {
140 key := []byte("name2")
141 val := []byte("val2")
142 return tx.PutIfExists(bucket, key, val, 100)
143 }); err != nil {
144 log.Fatal(err)
145 }
146}
147
148func read() {
149 if err := db.View(

Callers 1

mainFunction · 0.85

Calls 2

UpdateMethod · 0.80
PutIfExistsMethod · 0.80

Tested by

no test coverage detected