MCPcopy Create free account
hub / github.com/bytebase/bytebase / Equal

Method Equal

backend/generated-go/v1/sql_service_equal.pb.go:390–439  ·  view source on GitHub ↗
(y *RowValue)

Source from the content-addressed store, hash-verified

388}
389
390func (x *RowValue) Equal(y *RowValue) bool {
391 if x == y {
392 return true
393 }
394 if x == nil || y == nil {
395 return x == nil && y == nil
396 }
397 if x.GetNullValue() != y.GetNullValue() {
398 return false
399 }
400 if x.GetBoolValue() != y.GetBoolValue() {
401 return false
402 }
403 if string(x.GetBytesValue()) != string(y.GetBytesValue()) {
404 return false
405 }
406 if (math.IsNaN(float64(x.GetDoubleValue())) && !math.IsNaN(float64(y.GetDoubleValue())) || !math.IsNaN(float64(x.GetDoubleValue())) && math.IsNaN(float64(y.GetDoubleValue()))) || (!math.IsNaN(float64(x.GetDoubleValue())) && !math.IsNaN(float64(y.GetDoubleValue())) && x.GetDoubleValue() != y.GetDoubleValue()) {
407 return false
408 }
409 if (math.IsNaN(float64(x.GetFloatValue())) && !math.IsNaN(float64(y.GetFloatValue())) || !math.IsNaN(float64(x.GetFloatValue())) && math.IsNaN(float64(y.GetFloatValue()))) || (!math.IsNaN(float64(x.GetFloatValue())) && !math.IsNaN(float64(y.GetFloatValue())) && x.GetFloatValue() != y.GetFloatValue()) {
410 return false
411 }
412 if x.GetInt32Value() != y.GetInt32Value() {
413 return false
414 }
415 if x.GetInt64Value() != y.GetInt64Value() {
416 return false
417 }
418 if x.GetStringValue() != y.GetStringValue() {
419 return false
420 }
421 if x.GetUint32Value() != y.GetUint32Value() {
422 return false
423 }
424 if x.GetUint64Value() != y.GetUint64Value() {
425 return false
426 }
427 if equal, ok := interface{}(x.GetValueValue()).(interface{ Equal(*structpb.Value) bool }); !ok || !equal.Equal(y.GetValueValue()) {
428 return false
429 } else if !proto.Equal(x.GetValueValue(), y.GetValueValue()) {
430 return false
431 }
432 if !x.GetTimestampValue().Equal(y.GetTimestampValue()) {
433 return false
434 }
435 if !x.GetTimestampTzValue().Equal(y.GetTimestampTzValue()) {
436 return false
437 }
438 return true
439}
440
441func (x *Advice) Equal(y *Advice) bool {
442 if x == y {

Callers

nothing calls this directly

Calls 14

GetNullValueMethod · 0.95
GetBoolValueMethod · 0.95
GetBytesValueMethod · 0.95
GetDoubleValueMethod · 0.95
GetFloatValueMethod · 0.95
GetInt32ValueMethod · 0.95
GetInt64ValueMethod · 0.95
GetStringValueMethod · 0.95
GetUint32ValueMethod · 0.95
GetUint64ValueMethod · 0.95
GetValueValueMethod · 0.95
GetTimestampValueMethod · 0.95

Tested by

no test coverage detected