MCPcopy Create free account
hub / github.com/distributedio/titan / Touch

Function Touch

command/keys.go:361–372  ·  view source on GitHub ↗

Touch alters the last access time of a key(s)

(ctx *Context, txn *db.Transaction)

Source from the content-addressed store, hash-verified

359
360// Touch alters the last access time of a key(s)
361func Touch(ctx *Context, txn *db.Transaction) (OnCommit, error) {
362 kv := txn.Kv()
363 keys := make([][]byte, len(ctx.Args))
364 for i := range ctx.Args {
365 keys[i] = []byte(ctx.Args[i])
366 }
367 count, err := kv.Touch(keys)
368 if err != nil {
369 return nil, err
370 }
371 return Integer(ctx.Out, count), nil
372}

Callers

nothing calls this directly

Calls 3

IntegerFunction · 0.85
KvMethod · 0.80
TouchMethod · 0.80

Tested by

no test coverage detected