Skip to content

Commit

Permalink
export mongo.Client
Browse files Browse the repository at this point in the history
  • Loading branch information
amorist committed Jul 9, 2019
1 parent 60e05e3 commit 929f863
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ func (s *Session) Ping() error {
return s.client.Ping(ctx, readpref.Primary())
}

// Client return mongo Client
func (s *Session) Client() *mongo.Client {
return s.client
}

// DB returns a value representing the named database.
func (s *Session) DB(db string) *Database {
return &Database{database: s.client.Database(db)}
Expand Down

0 comments on commit 929f863

Please sign in to comment.