(y *QueryResult)
| 227 | } |
| 228 | |
| 229 | func (x *QueryResult) Equal(y *QueryResult) bool { |
| 230 | if x == y { |
| 231 | return true |
| 232 | } |
| 233 | if x == nil || y == nil { |
| 234 | return x == nil && y == nil |
| 235 | } |
| 236 | if len(x.ColumnNames) != len(y.ColumnNames) { |
| 237 | return false |
| 238 | } |
| 239 | for i := 0; i < len(x.ColumnNames); i++ { |
| 240 | if x.ColumnNames[i] != y.ColumnNames[i] { |
| 241 | return false |
| 242 | } |
| 243 | } |
| 244 | if len(x.ColumnTypeNames) != len(y.ColumnTypeNames) { |
| 245 | return false |
| 246 | } |
| 247 | for i := 0; i < len(x.ColumnTypeNames); i++ { |
| 248 | if x.ColumnTypeNames[i] != y.ColumnTypeNames[i] { |
| 249 | return false |
| 250 | } |
| 251 | } |
| 252 | if len(x.Rows) != len(y.Rows) { |
| 253 | return false |
| 254 | } |
| 255 | for i := 0; i < len(x.Rows); i++ { |
| 256 | if !x.Rows[i].Equal(y.Rows[i]) { |
| 257 | return false |
| 258 | } |
| 259 | } |
| 260 | if x.RowsCount != y.RowsCount { |
| 261 | return false |
| 262 | } |
| 263 | if x.Error != y.Error { |
| 264 | return false |
| 265 | } |
| 266 | if p, q := x.Latency, y.Latency; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) { |
| 267 | return false |
| 268 | } |
| 269 | if x.Statement != y.Statement { |
| 270 | return false |
| 271 | } |
| 272 | if !x.GetPostgresError().Equal(y.GetPostgresError()) { |
| 273 | return false |
| 274 | } |
| 275 | if !x.GetSyntaxError().Equal(y.GetSyntaxError()) { |
| 276 | return false |
| 277 | } |
| 278 | if !x.GetPermissionDenied().Equal(y.GetPermissionDenied()) { |
| 279 | return false |
| 280 | } |
| 281 | if !x.GetCommandError().Equal(y.GetCommandError()) { |
| 282 | return false |
| 283 | } |
| 284 | if len(x.Messages) != len(y.Messages) { |
| 285 | return false |
| 286 | } |
nothing calls this directly
no test coverage detected