You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
366 B
17 lines
366 B
package dorm
|
|
|
|
import (
|
|
"context"
|
|
"go.mongodb.org/mongo-driver/mongo"
|
|
)
|
|
|
|
// GetSession 获取会话
|
|
func (cs *MongoSessionOptions) GetSession(ctx context.Context) mongo.Session {
|
|
return cs.session
|
|
}
|
|
|
|
// GetSessionContext 获取会话上下文
|
|
func (cs *MongoSessionOptions) GetSessionContext(ctx context.Context) mongo.SessionContext {
|
|
return cs.sessionContext
|
|
}
|