Add collation option to collection.Create() by feliixx · Pull Request #37 · globalsign/mgo (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

@feliixx

fix #29

@feliixx

fix #29

@domodwyer

Thanks @feliixx!

You've made a huge contribution adding all the 3.4.X features and this is another great PR - thank you so much for taking the time to contribute! It's truly appreciated :)

Dom

domodwyer

domodwyer added a commit that referenced this pull request

Sep 18, 2017

@domodwyer

Create a new method to drop all the indexes of a collection in a single call

fix #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"

Fix #30.

Thanks to @feliixx for the time and effort.

If all tests pass, the builds for mongo earlier than 2.6 are still failing. Running a clean up fixes the issue.

See:

fix #29

fixes #31

domodwyer added a commit that referenced this pull request

Oct 11, 2017

@domodwyer

Conflicts:

README.md

cluster.go

session.go

session_test.go

domodwyer added a commit that referenced this pull request

Oct 11, 2017

@domodwyer

Create a new method to drop all the indexes of a collection in a single call

fix #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"

Fix #30.

Thanks to @feliixx for the time and effort.

If all tests pass, the builds for mongo earlier than 2.6 are still failing. Running a clean up fixes the issue.

See:

fix #29

fixes #31

Fixes #43

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.

domodwyer added a commit that referenced this pull request

Oct 22, 2017

@domodwyer

Conflicts:

README.md

bson/decode.go

domodwyer added a commit that referenced this pull request

Nov 6, 2017

@domodwyer

Create a new method to drop all the indexes of a collection in a single call

fix #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"

Fix #30.

Thanks to @feliixx for the time and effort.

If all tests pass, the builds for mongo earlier than 2.6 are still failing. Running a clean up fixes the issue.

See:

fix #29

fixes #31

Fixes #43

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.

This change remove full BSON decoding on:

fix #51

libi pushed a commit to libi/mgo that referenced this pull request

Dec 1, 2022

@domodwyer

Create a new method to drop all the indexes of a collection in a single call

fix #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"

Fix globalsign#30.

Thanks to @feliixx for the time and effort.

If all tests pass, the builds for mongo earlier than 2.6 are still failing. Running a clean up fixes the issue.

See:

fix globalsign#29

fixes globalsign#31

libi pushed a commit to libi/mgo that referenced this pull request

Dec 1, 2022

@domodwyer

Create a new method to drop all the indexes of a collection in a single call

fix #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"

Fix globalsign#30.

Thanks to @feliixx for the time and effort.

If all tests pass, the builds for mongo earlier than 2.6 are still failing. Running a clean up fixes the issue.

See:

fix globalsign#29

fixes globalsign#31

Fixes globalsign#43

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.

libi pushed a commit to libi/mgo that referenced this pull request

Dec 1, 2022

@domodwyer

Create a new method to drop all the indexes of a collection in a single call

fix #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"

Fix globalsign#30.

Thanks to @feliixx for the time and effort.

If all tests pass, the builds for mongo earlier than 2.6 are still failing. Running a clean up fixes the issue.

See:

fix globalsign#29

fixes globalsign#31

Fixes globalsign#43

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.

This change remove full BSON decoding on:

fix globalsign#51

bozaro added a commit to bozaro/mgo that referenced this pull request

Jul 3, 2025

@bozaro

…utdown-error

Close socket immediately after server_shutdown error

Labels

2 participants

@feliixx @domodwyer