// Eq returns true if two values are equal.
323175
func (t Term) Eq(args ...interface{}) Term {
	return constructMethodTerm(t, "Eq", p.Term_EQ, args, map[string]interface{}{})
}
230084
func (n NormalizedUsername) Eq(n2 NormalizedUsername) bool {
	return string(n) == string(n2)
}
410600
func (lp LockedProject) Eq(lp2 LockedProject) bool {
	if lp.pi != lp2.pi {
		return false
	}

	if lp.r != lp2.r {
		return false
	}

	if len(lp.pkgs) != len(lp2.pkgs) {
		return false
	}

	for k, v := range lp.pkgs {
		if lp2.pkgs[k] != v {
			return false
		}
	}

	v1n := lp.v == nil
	v2n := lp2.v == nil

	if v1n != v2n {
		return false
	}

	if !v1n && !lp.v.Matches(lp2.v) {
		return false
	}

	return true
}
1240132
func Eq(a interface{}, b interface{}) bool {
	av := reflect.ValueOf(a)
	bv := reflect.ValueOf(b)

	switch av.Kind() {
	case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
		panic("Eq called on unsupported type")
	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
		return av.Int() == bv.Int()
	case reflect.String:
		return av.String() == bv.String()
	}
	return false
}
1101652
func (o *AdvancedOption) Equal(o2 *AdvancedOption) bool {
	if o2 == nil {
		return o.value == 0
	}
	return o.value == o2.value
}
286595
func Eq(expectedValue interface{}) *eqMatcher {
	matcher := new(eqMatcher)
	matcher.expectedValue = expectedValue
	return matcher
}
787738
func (o *SafeOption) Equal(o2 *SafeOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
305538
func (sf *ScalarFunction) Equal(ctx sessionctx.Context, e Expression) bool {
	fun, ok := e.(*ScalarFunction)
	if !ok {
		return false
	}
	if sf.FuncName.L != fun.FuncName.L {
		return false
	}
	return sf.Function.equal(fun.Function)
}
1266965
func (o *ClickAnalyticsOption) Equal(o2 *ClickAnalyticsOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
429541
func (o *GetRankingInfoOption) Equal(o2 *GetRankingInfoOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
306943
func (a *TickLaterAction) Equal(o *TickLaterAction) bool {
	return a.TickNonce == o.TickNonce && a.When.Equal(o.When)
}
1295661
func (o *AutoGenerateObjectIDIfNotExistOption) Equal(o2 *AutoGenerateObjectIDIfNotExistOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
1316492
func eq(lhs Expression, rhs interface{}) BooleanExpression {
	return checkBoolExpType(EQ_OP, lhs, rhs, false)
}
1036101
func (a *AggFuncDesc) Equal(ctx sessionctx.Context, other *AggFuncDesc) bool {
	if a.HasDistinct != other.HasDistinct {
		return false
	}
	return a.baseFuncDesc.equal(ctx, &other.baseFuncDesc)
}
245570
func Equal(a1, a2 interface{}) bool {
	if a1 == nil || a2 == nil {
		return a1 == a2
	}
	v1 := reflect.ValueOf(a1)
	v2 := reflect.ValueOf(a2)
	if v1.Type() != v2.Type() {
		return false
	}
	return deepValueEqual(v1, v2, make(map[visit]bool), 0)
}
55177
func (c *Condition) AndEqual(column string, value interface{}) *Condition {
	expr := column + " = ?"
	c.And(expr, value)
	return c
}
1093983
func (o *OffsetOption) Equal(o2 *OffsetOption) bool {
	if o2 == nil {
		return o.value == 0
	}
	return o.value == o2.value
}