(t *testing.T)
| 450 | } |
| 451 | |
| 452 | func Test_getMongodbTableFields(t *testing.T) { |
| 453 | fields := []*MgoField{ |
| 454 | { |
| 455 | Name: "_id", |
| 456 | Type: "primitive.ObjectID", |
| 457 | ObjectStr: "", |
| 458 | ProtoObjectStr: "", |
| 459 | }, |
| 460 | { |
| 461 | Name: "age", |
| 462 | Type: "int", |
| 463 | ObjectStr: "", |
| 464 | ProtoObjectStr: "", |
| 465 | }, |
| 466 | { |
| 467 | Name: "birthday", |
| 468 | Type: "time.Time", |
| 469 | ObjectStr: "", |
| 470 | ProtoObjectStr: "", |
| 471 | }, |
| 472 | { |
| 473 | Name: "home_address", |
| 474 | Type: "HomeAddress", |
| 475 | ObjectStr: "type HomeAddress struct { Street string `bson:\"street\" json:\"street\"`; City string `bson:\"city\" json:\"city\"`; State string `bson:\"state\" json:\"state\"`; Zip int `bson:\"zip\" json:\"zip\"` } ", |
| 476 | ProtoObjectStr: `message HomeAddress { |
| 477 | string street = 1; |
| 478 | string city = 2; |
| 479 | string state = 3; |
| 480 | int32 zip = 4; |
| 481 | } |
| 482 | `, |
| 483 | }, |
| 484 | { |
| 485 | Name: "interests", |
| 486 | Type: "[]string", |
| 487 | ObjectStr: "", |
| 488 | ProtoObjectStr: "", |
| 489 | }, |
| 490 | { |
| 491 | Name: "is_child", |
| 492 | Type: "bool", |
| 493 | ObjectStr: "", |
| 494 | ProtoObjectStr: "", |
| 495 | }, |
| 496 | { |
| 497 | Name: "name", |
| 498 | Type: "string", |
| 499 | ObjectStr: "", |
| 500 | ProtoObjectStr: "", |
| 501 | }, |
| 502 | { |
| 503 | Name: "numbers", |
| 504 | Type: "[]int", |
| 505 | ObjectStr: "", |
| 506 | ProtoObjectStr: "", |
| 507 | }, |
| 508 | { |
| 509 | Name: "shop_addresses", |
nothing calls this directly
no test coverage detected