func (s *StateStore) Index(name string) (uint64, error) {
	txn := s.db.Txn(false)

	// Lookup the first matching index
	out, err := txn.First("index", "id", name)
	if err != nil {
		return 0, err
	}
	if out == nil {
		return 0, nil
	}
	return out.(*IndexEntry).Value, nil
}
// Index finds the matching index value
Index finds the matching index value
// Index finds the matching index value
func (s *StateStore) Index(name string) (uint64, error) {
	txn := s.db.Txn(false)
	out, err := txn.First("index", "id", name)
	if err != nil {
		return 0, err
	}
	if out == nil {
		return 0, nil
	}
	return out.(*IndexEntry).Value, nil
}
func ( s * StateStore ) Index ( name string ) ( uint64 , error ) { txn := s . db . Txn ( false ) out , err := txn . First ( " " , " " , name ) if err != nil { return 0 , err } if out == nil { return 0 , nil } return out . ( * IndexEntry ) . Value , nil }
Index finds the matching index value
Index finds the matching index value
// Lookup the first matching index