// Check if a given value is in the set
551374
func (s *Set) Has(value string) (bool, error) {
	if !s.host.rawUTF8 {
		Encode(&value)
	}
	rows, err := s.host.db.Query("SELECT "+setCol+" FROM "+s.table+" WHERE "+setCol+" = ?", value)
	if err != nil {
		return false, err
	}
	defer rows.Close()
	var scanValue string
	// Get the value. Should not loop more than once.
	counter := 0
	for rows.Next() {
		err = rows.Scan(&scanValue)
		if err != nil {
			// Unusual, worthy of panic
			panic(err.Error())
		}
		counter++
	}
	if err := rows.Err(); err != nil {
		// Unusual, worthy of panic
		panic(err.Error())
	}
	if counter > 1 {
		panic("Duplicate members in set! " + value)
	}
	return counter > 0, nil
}
735499
func (set WordSet) ContainsAll(i ...string) bool {
	for _, v := range i {
		if !set.Contains(v) {
			return false
		}
	}
	return true
}
1198755
func (set StringSet) Equals(sset StringSet) bool {
	// If length of set is not equal to length of given set, the
	// set is not equal to given set.
	if len(set) != len(sset) {
		return false
	}

	// As both sets are equal in length, check each elements are equal.
	for k := range set {
		if _, ok := sset[k]; !ok {
			return false
		}
	}

	return true
}
1157669
func (a BoolA) IsSet(vals ...interface{}) bool {
	return isSet(a(false).arg(), vals)
}
831138
func (a *AtomicBool) Set(value bool) {
	var n int32
	if value {
		n = 1
	}
	atomic.StoreInt32(&a.v, n)
}
1159933
func (s *set) IsSubset(t Interface) (subset bool) {
	subset = true

	t.Each(func(item interface{}) bool {
		_, subset = s.m[item]
		return subset
	})

	return
}
8880
func (set StringSet) IsSubset(other StringSet) bool {
	for elem := range set {
		if !other.Contains(elem) {
			return false
		}
	}
	return true
}
445486
func matches(s string, set stringset.Set) bool {
	return set.Has(s) || set.Len() == 0
}
1336033
func (m Map) Contains(key, value string) bool {
	for _, v := range m[key] {
		if v == value {
			return true
		}
	}
	return false
}
1171950
func (nn *NullNumber) Set(value interface{}) error {

	nn.valid = false
	nn.value = ""

	if value == nil {
		return nil
	}

	s := fmt.Sprint(value)
	_, err := strconv.ParseFloat(s, 64)
	if err != nil {
		return err
	}

	nn.valid = true
	nn.value = s

	return nil
}
153194
func (s *Set) Subset(t *Set) bool {
	// Check if all elements in the parameter set are contained within the set
	for _, v := range t.Enumerate() {
		// Check if element is contained, if not, return false
		if !s.Has(v) {
			return false
		}
	}

	return true
}
178962
func (i *Int) Set(value int) {
	i.lock.Lock()
	defer i.lock.Unlock()
	i.increment = value
}
1325711
func containsValue(m map[string]string, val string) bool {
	for _, v := range m {
		if v == val {
			return true
		}
	}
	return false
}
1108247
func (s *Set) Each(f func(item interface{}) bool) {
	s.l.RLock()
	defer s.l.RUnlock()

	for item := range s.m {
		if !f(item) {
			break
		}
	}
}
390736
func (s *set) All() []interface{} {
	all := []interface{}{}
	for v := range s.values {
		all = append(all, v)
	}
	return all
}
1056610
func (ss stringSet) contains(key string) bool {
	_, ok := ss[key]
	return ok
}
12699
func (s *stringSet) Contains(v string) bool {
	_, ok := s.values[v]
	return ok
}