MCPcopy Index your code
hub / github.com/perkeep/perkeep / Set

Method Set

pkg/sorted/sqlkv/sqlkv.go:104–117  ·  view source on GitHub ↗
(key, value string)

Source from the content-addressed store, hash-verified

102}
103
104func (b *batchTx) Set(key, value string) {
105 if b.err != nil {
106 return
107 }
108 if err := sorted.CheckSizes(key, value); err != nil {
109 log.Printf("Skipping storing (%q:%q): %v", key, value, err)
110 return
111 }
112 if b.kv.BatchSetFunc != nil {
113 b.err = b.kv.BatchSetFunc(b.tx, key, value)
114 return
115 }
116 _, b.err = b.tx.Exec(b.kv.sql("REPLACE INTO /*TPRE*/rows (k, v) VALUES (?, ?)"), key, value)
117}
118
119func (b *batchTx) Delete(key string) {
120 if b.err != nil {

Callers

nothing calls this directly

Calls 3

CheckSizesFunction · 0.92
PrintfMethod · 0.80
sqlMethod · 0.80

Tested by

no test coverage detected