MCPcopy
hub / github.com/hashicorp/go-memdb / First

Method First

txn.go:605–608  ·  view source on GitHub ↗

First is used to return the first matching object for the given constraints on the index. Note that all values read in the transaction form a consistent snapshot from the time when the transaction was created.

(table, index string, args ...interface{})

Source from the content-addressed store, hash-verified

603// Note that all values read in the transaction form a consistent snapshot
604// from the time when the transaction was created.
605func (txn *Txn) First(table, index string, args ...interface{}) (interface{}, error) {
606 _, val, err := txn.FirstWatch(table, index, args...)
607 return val, err
608}
609
610// Last is used to return the last matching object for
611// the given constraints on the index.

Calls 1

FirstWatchMethod · 0.95