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

Function put

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

Source from the content-addressed store, hash-verified

103}
104
105func put() {
106 if err := db.Update(
107 func(tx *nutsdb.Tx) error {
108 key := []byte("name1")
109 val := []byte("val1")
110 return tx.Put(bucket, key, val, 0)
111 }); err != nil {
112 log.Fatal(err)
113 }
114}
115func put2() {
116 if err := db.Update(
117 func(tx *nutsdb.Tx) error {

Callers 1

mainFunction · 0.70

Calls 2

UpdateMethod · 0.80
PutMethod · 0.45

Tested by

no test coverage detected