Identical is the internal implementation for T.Identical. See that comment for details.
(other *InternalType)
| 2354 | // Identical is the internal implementation for T.Identical. See that comment |
| 2355 | // for details. |
| 2356 | func (t *InternalType) Identical(other *InternalType) bool { |
| 2357 | if t.Family != other.Family { |
| 2358 | return false |
| 2359 | } |
| 2360 | if t.Width != other.Width { |
| 2361 | return false |
| 2362 | } |
| 2363 | if t.Precision != other.Precision { |
| 2364 | return false |
| 2365 | } |
| 2366 | if t.TimePrecisionIsSet != other.TimePrecisionIsSet { |
| 2367 | return false |
| 2368 | } |
| 2369 | if t.IntervalDurationField != nil && other.IntervalDurationField != nil { |
| 2370 | if *t.IntervalDurationField != *other.IntervalDurationField { |
| 2371 | return false |
| 2372 | } |
| 2373 | } else if t.IntervalDurationField != nil { |
| 2374 | return false |
| 2375 | } else if other.IntervalDurationField != nil { |
| 2376 | return false |
| 2377 | } |
| 2378 | if t.GeoMetadata != nil && other.GeoMetadata != nil { |
| 2379 | if t.GeoMetadata.ShapeType != other.GeoMetadata.ShapeType { |
| 2380 | return false |
| 2381 | } |
| 2382 | if t.GeoMetadata.SRID != other.GeoMetadata.SRID { |
| 2383 | return false |
| 2384 | } |
| 2385 | } else if t.GeoMetadata != nil { |
| 2386 | return false |
| 2387 | } else if other.GeoMetadata != nil { |
| 2388 | return false |
| 2389 | } |
| 2390 | if t.Locale != nil && other.Locale != nil { |
| 2391 | if !lex.LocaleNamesAreEqual(*t.Locale, *other.Locale) { |
| 2392 | return false |
| 2393 | } |
| 2394 | } else if t.Locale != nil { |
| 2395 | return false |
| 2396 | } else if other.Locale != nil { |
| 2397 | return false |
| 2398 | } |
| 2399 | if t.ArrayContents != nil && other.ArrayContents != nil { |
| 2400 | if !t.ArrayContents.Identical(other.ArrayContents) { |
| 2401 | return false |
| 2402 | } |
| 2403 | } else if t.ArrayContents != nil { |
| 2404 | return false |
| 2405 | } else if other.ArrayContents != nil { |
| 2406 | return false |
| 2407 | } |
| 2408 | if len(t.TupleContents) != len(other.TupleContents) { |
| 2409 | return false |
| 2410 | } |
| 2411 | for i := range t.TupleContents { |
| 2412 | if !t.TupleContents[i].Identical(other.TupleContents[i]) { |
| 2413 | return false |
nothing calls this directly
no test coverage detected