MCPcopy Create free account
hub / github.com/Cyinx/einx / SetMode

Method SetMode

db/mongodb/mongodb.go:88–97  ·  view source on GitHub ↗
(mode int, refresh bool)

Source from the content-addressed store, hash-verified

86}
87
88func (this *MongoDBMgr) SetMode(mode int, refresh bool) {
89 status := mgo.Monotonic
90 if mode == Strong {
91 status = mgo.Strong
92 } else {
93 status = mgo.Monotonic
94 }
95
96 this.session.SetMode(status, refresh)
97}
98
99func (this *MongoDBMgr) Insert(collection string, doc interface{}) error {
100 if this.session == nil {

Callers 1

StartMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected