Commit c4a7121
authored
Merge Development (#48)
* add DropAllIndexes() method (#25)
Create a new method to drop all the indexes of a collection
in a single call
* readme: credit @feliixx for #25 (#26)
* send metadata during handshake (#28)
fix [#484](https://github.com/go-mgo/mgo/issues/484)
Annotate connections with metadata provided by the
connecting client.
informations send:
{
"aplication": { // optional
"name": "myAppName"
}
"driver": {
"name": "mgo",
"version": "v2"
},
"os": {
"type": runtime.GOOS,
"architecture": runtime.GOARCH
}
}
to set "application.name", add `appname` param in options
of string connection URI,
for example : "mongodb://localhost:27017?appname=myAppName"
* Update README to add appName (#32)
* docs: elaborate on what appName does
* readme: add appName to changes
* add method CreateView() (#33)
Fix #30.
Thanks to @feliixx for the time and effort.
* readme: credit @feliixx in the README (#36)
* Don't panic on indexed int64 fields (#23)
* Stop all db instances after tests (go-mgo#462)
If all tests pass, the builds for mongo earlier than 2.6 are still failing.
Running a clean up fixes the issue.
* fixing int64 type failing when getting indexes and trying to type them
* requested changes relating to case statement and panic
* Update README.md to credit @mapete94.
* tests: ensure indexed int64 fields do not cause a panic in Indexes()
See:
* #23
* https://github.com/go-mgo/mgo/issues/475
* go-mgo#476
* Add collation option to collection.Create() (#37)
- Allow specifying the default collation for the collection when creating it.
- Add some documentation to query.Collation() method.
fix #29
* Test against MongoDB 3.4.x (#35)
* test against MongoDB 3.4.x
* tests: use listIndexes to assert index state for 3.4+
* make test pass against v3.4.x
- skip `TestViewWithCollation` because of SERVER-31049,
cf: https://jira.mongodb.org/browse/SERVER-31049
- add versionAtLeast() method in init.js script to better
detect server version
fixes #31
* Introduce constants for BSON element types (#41)
* bson.Unmarshal returns time in UTC (#42)
* readme: add missing features / credit
* Adds missing collation feature description (by @feliixx).
* Adds missing 3.4 tests description (by @feliixx).
* Adds BSON constants description (by @bozaro).
* Adds UTC time.Time unmarshalling (by @gazoon).
* fix golint, go vet and gofmt warnings (#44)
Fixes #43
* readme: credit @feliixx (#46)
* Fix GetBSON() method usage (#40)
* Fix GetBSON() method usage
Original issue
---
You can't use type with custom GetBSON() method mixed with structure field type and structure field reference type.
For example, you can't create custom GetBSON() for Bar type:
```
struct Foo {
a Bar
b *Bar
}
```
Type implementation (`func (t Bar) GetBSON()` ) would crash on `Foo.b = nil` value encoding.
Reference implementation (`func (t *Bar) GetBSON()` ) would not call on `Foo.a` value encoding.
After this change
---
For type implementation `func (t Bar) GetBSON()` would not call on `Foo.b = nil` value encoding.
In this case `nil` value would be seariazied as `nil` BSON value.
For reference implementation `func (t *Bar) GetBSON()` would call even on `Foo.a` value encoding.
* Minor refactoring
* readme: credit @bozaro (#47)1 parent 3dbb487 commit c4a7121
File tree
33 files changed
+951
-629
lines changed- bson
- dbtest
- internal
- json
- sasl
- scram
- txn
33 files changed
+951
-629
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
583 | | - | |
| 583 | + | |
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
937 | | - | |
| 937 | + | |
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| |||
1080 | 1080 | | |
1081 | 1081 | | |
1082 | 1082 | | |
1083 | | - | |
| 1083 | + | |
1084 | 1084 | | |
1085 | | - | |
| 1085 | + | |
1086 | 1086 | | |
1087 | | - | |
| 1087 | + | |
1088 | 1088 | | |
1089 | 1089 | | |
1090 | 1090 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
60 | 93 | | |
61 | 94 | | |
62 | 95 | | |
| |||
66 | 99 | | |
67 | 100 | | |
68 | 101 | | |
69 | | - | |
| 102 | + | |
70 | 103 | | |
71 | 104 | | |
72 | 105 | | |
73 | 106 | | |
74 | | - | |
| 107 | + | |
75 | 108 | | |
76 | 109 | | |
77 | 110 | | |
| |||
97 | 130 | | |
98 | 131 | | |
99 | 132 | | |
100 | | - | |
| 133 | + | |
101 | 134 | | |
102 | 135 | | |
103 | | - | |
| 136 | + | |
104 | 137 | | |
105 | 138 | | |
106 | 139 | | |
| |||
156 | 189 | | |
157 | 190 | | |
158 | 191 | | |
159 | | - | |
| 192 | + | |
160 | 193 | | |
161 | 194 | | |
162 | 195 | | |
| |||
166 | 199 | | |
167 | 200 | | |
168 | 201 | | |
169 | | - | |
| 202 | + | |
170 | 203 | | |
171 | 204 | | |
172 | 205 | | |
| |||
192 | 225 | | |
193 | 226 | | |
194 | 227 | | |
195 | | - | |
| 228 | + | |
196 | 229 | | |
197 | 230 | | |
198 | 231 | | |
| |||
300 | 333 | | |
301 | 334 | | |
302 | 335 | | |
303 | | - | |
| 336 | + | |
304 | 337 | | |
305 | 338 | | |
306 | 339 | | |
307 | 340 | | |
308 | | - | |
| 341 | + | |
309 | 342 | | |
310 | 343 | | |
311 | 344 | | |
| |||
571 | 604 | | |
572 | 605 | | |
573 | 606 | | |
574 | | - | |
| 607 | + | |
575 | 608 | | |
576 | 609 | | |
577 | | - | |
| 610 | + | |
578 | 611 | | |
579 | | - | |
| 612 | + | |
580 | 613 | | |
581 | 614 | | |
582 | 615 | | |
| |||
600 | 633 | | |
601 | 634 | | |
602 | 635 | | |
603 | | - | |
| 636 | + | |
604 | 637 | | |
605 | | - | |
| 638 | + | |
606 | 639 | | |
607 | 640 | | |
608 | 641 | | |
609 | 642 | | |
| 643 | + | |
| 644 | + | |
610 | 645 | | |
611 | 646 | | |
612 | 647 | | |
| |||
0 commit comments