MCPcopy
hub / github.com/etcd-io/etcd / WithPrefix

Method WithPrefix

client/v3/compare.go:119–122  ·  view source on GitHub ↗

WithPrefix sets the comparison to scan all keys prefixed by the key.

()

Source from the content-addressed store, hash-verified

117
118// WithPrefix sets the comparison to scan all keys prefixed by the key.
119func (cmp Cmp) WithPrefix() Cmp {
120 cmp.RangeEnd = getPrefix(cmp.Key)
121 return cmp
122}
123
124// mustInt64 panics if val isn't an int or int64. It returns an int64 otherwise.
125func mustInt64(val any) int64 {

Callers 15

mixedTxnFuncFunction · 0.80
ExampleKV_deleteFunction · 0.80
NewWatchChannelMethod · 0.80
watchMethod · 0.80
ListMethod · 0.80
CountMethod · 0.80
SyncUpdatesMethod · 0.80
ExampleSTM_applyFunction · 0.80
observeMethod · 0.80

Calls 1

getPrefixFunction · 0.85

Tested by 15

ExampleKV_deleteFunction · 0.64
ExampleSTM_applyFunction · 0.64
testWatchMultiWatcherFunction · 0.64
TestWatchRequestProgressFunction · 0.64
TestWatchEventTypeFunction · 0.64
testWatchFragmentFunction · 0.64
TestTxnCompareRangeFunction · 0.64
TestLeasingIntervalFunction · 0.64