Re: [go-nuts] SetSafe default value in mgo session

2016-08-05 Thread Debraj Manna
Yeah I already asked it in mgo-users forum . I did not get any response from there. So asked it in this forum as I saw quite a few mgo related discussion in golang-nuts

Re: [go-nuts] SetSafe default value in mgo session

2016-08-05 Thread Kiki Sugiaman
Then the answer to your question is the answer to the following question: Is there a difference between not calling getLastError at all and calling getLastError(0, 0)? It's now a mongodb question and not a Go question anymore. Feel free to ask that of course. But if you're not getting the

Re: [go-nuts] SetSafe default value in mgo session

2016-08-05 Thread Serhat Şevki Dinçer
There is the difference of (not) calling https://docs.mongodb.com/v3.0/reference/method/db.getLastError/ This is possibly a better place to ask this: https://groups.google.com/forum/m/#!forum/mgo-users -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] SetSafe default value in mgo session

2016-08-05 Thread Debraj Manna
I know this. I am asking about the functionality of the mgo driver while calling SetSafe(nil) & SetSafe({})? How mgo will behave in both the cases while doing a write to Mongo? On Fri, Aug 5, 2016 at 11:09 AM, Kiki Sugiaman wrote: > {} gives you a pointer to a new instance

Re: [go-nuts] SetSafe default value in mgo session

2016-08-04 Thread Kiki Sugiaman
{} gives you a pointer to a new instance of Safe with zero value for all its fields. https://tour.golang.org/basics/12 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an

[go-nuts] SetSafe default value in mgo session

2016-08-04 Thread DM
Can someone explain me the difference between the default value of SetSafe() which is {}and SetSafe(nil)? As per the mgo godoc :- If the safe parameter is nil, the session is put in unsafe mode, and writes become fire-and-forget, without