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

Function get

pkg/sorted/sqlkv/sqlkv.go:275–281  ·  view source on GitHub ↗

Common logic for KeyValue.Get and batchTx.Get

(kv *KeyValue, qobj queryObject, key string)

Source from the content-addressed store, hash-verified

273
274// Common logic for KeyValue.Get and batchTx.Get
275func get(kv *KeyValue, qobj queryObject, key string) (value string, err error) {
276 err = qobj.QueryRow(kv.sql("SELECT v FROM /*TPRE*/rows WHERE k=?"), key).Scan(&value)
277 if err == sql.ErrNoRows {
278 err = sorted.ErrNotFound
279 }
280 return
281}
282
283func (kv *KeyValue) Find(start, end string) sorted.Iterator {
284 var releaseGate func() // nil if unused

Callers 3

GetMethod · 0.85
GetMethod · 0.85
testReadTransactionFunction · 0.85

Calls 2

QueryRowMethod · 0.80
sqlMethod · 0.80

Tested by

no test coverage detected