Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Development #57

Merged
merged 23 commits into from
Nov 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
de872a6
Merge branch 'master' into development
domodwyer Aug 8, 2017
1519fd3
Merge branch 'master' into development
domodwyer Aug 15, 2017
454da02
add DropAllIndexes() method (#25)
feliixx Aug 30, 2017
93aaa6e
readme: credit @feliixx for #25 (#26)
domodwyer Aug 30, 2017
165af68
send metadata during handshake (#28)
feliixx Sep 6, 2017
a76b1a0
Update README to add appName (#32)
domodwyer Sep 6, 2017
25200e4
add method CreateView() (#33)
feliixx Sep 11, 2017
1f4c10f
readme: credit @feliixx in the README (#36)
domodwyer Sep 11, 2017
934a190
Don't panic on indexed int64 fields (#23)
domodwyer Sep 11, 2017
b37e3c1
Add collation option to collection.Create() (#37)
feliixx Sep 13, 2017
aead58f
Test against MongoDB 3.4.x (#35)
feliixx Sep 15, 2017
950ed5a
Introduce constants for BSON element types (#41)
bozaro Sep 20, 2017
d21a525
bson.Unmarshal returns time in UTC (#42)
Sep 28, 2017
9d743b4
readme: add missing features / credit
domodwyer Sep 28, 2017
c86ed84
Merge pull request #45 from globalsign/feature/update-readme
Sep 28, 2017
97bd0cd
fix golint, go vet and gofmt warnings (#44)
feliixx Oct 6, 2017
fd79249
readme: credit @feliixx (#46)
domodwyer Oct 9, 2017
dba7b4c
Fix GetBSON() method usage (#40)
bozaro Oct 11, 2017
12fb1c2
readme: credit @bozaro (#47)
domodwyer Oct 11, 2017
199dc25
Improve cursorData struct unmarshaling speed (#49)
bozaro Oct 19, 2017
345ab0b
readme: credit @bozaro and @idy (#53)
domodwyer Oct 19, 2017
0454966
do not lock while writing to a socket (#52) (#54)
domodwyer Oct 19, 2017
e10a339
Merge commit '0454966c021aa1737c9680aceef7e2ba26952fe3' into merge
domodwyer Oct 22, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Further PR's (with tests) are welcome, but please maintain backwards compatibili
* Consistently unmarshal time.Time values as UTC ([details](https://github.com/globalsign/mgo/pull/42))
* Enforces best practise coding guidelines ([details](https://github.com/globalsign/mgo/pull/44))
* GetBSON correctly handles structs with both fields and pointers ([details](https://github.com/globalsign/mgo/pull/40))
* Improved bson.Raw unmarshalling performance ([details](https://github.com/globalsign/mgo/pull/49))
* Minimise socket connection timeouts due to excessive locking ([details](https://github.com/globalsign/mgo/pull/52))

---

Expand All @@ -42,6 +44,7 @@ Further PR's (with tests) are welcome, but please maintain backwards compatibili
* @eaglerayp
* @feliixx
* @fmpwizard
* @idy
* @jameinel
* @gazoon
* @mapete94
Expand Down
13 changes: 13 additions & 0 deletions bson/bson_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,19 @@ func testUnmarshal(c *C, data string, obj interface{}) {
err := bson.Unmarshal([]byte(data), zero)
c.Assert(err, IsNil)
c.Assert(zero, DeepEquals, obj)

testUnmarshalRawElements(c, []byte(data))
}

func testUnmarshalRawElements(c *C, data []byte) {
elems := []bson.RawDocElem{}
err := bson.Unmarshal(data, &elems)
c.Assert(err, IsNil)
for _, elem := range elems {
if elem.Value.Kind == bson.ElementDocument || elem.Value.Kind == bson.ElementArray {
testUnmarshalRawElements(c, elem.Value.Data)
}
}
}

type testItemType struct {
Expand Down
Loading