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

Struct UUIDFieldIndex

index.go:514–516  ·  view source on GitHub ↗

UUIDFieldIndex is used to extract a field from an object using reflection and builds an index on that field by treating it as a UUID. This is an optimization to using a StringFieldIndex as the UUID can be more compactly represented in byte form.

Source from the content-addressed store, hash-verified

512// it as a UUID. This is an optimization to using a StringFieldIndex
513// as the UUID can be more compactly represented in byte form.
514type UUIDFieldIndex struct {
515 Field string
516}
517
518func (u *UUIDFieldIndex) FromObject(obj interface{}) (bool, []byte, error) {
519 v := reflect.ValueOf(obj)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected