Skip to content

Commit

Permalink
support registry when distinct
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangz222 committed Dec 14, 2020
1 parent 6364a58 commit e4c235f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ package qmgo
import (
"context"
"fmt"
"go.mongodb.org/mongo-driver/bson/bsoncodec"
"net/url"
"strings"
"time"

"github.com/qiniu/qmgo/options"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/bsoncodec"
"go.mongodb.org/mongo-driver/mongo"
opts "go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/mongo/readpref"
Expand Down Expand Up @@ -130,8 +130,9 @@ func Open(ctx context.Context, conf *Config, o ...options.ClientOptions) (cli *Q

// Client creates client to mongo
type Client struct {
client *mongo.Client
conf Config
client *mongo.Client
conf Config

registry *bsoncodec.Registry
}

Expand Down
2 changes: 1 addition & 1 deletion collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ package qmgo
import (
"context"
"fmt"
"go.mongodb.org/mongo-driver/bson/bsoncodec"
"reflect"
"strings"

"github.com/qiniu/qmgo/middleware"
"github.com/qiniu/qmgo/operator"
opts "github.com/qiniu/qmgo/options"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/bsoncodec"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/x/bsonx"
Expand Down
2 changes: 1 addition & 1 deletion database.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ package qmgo

import (
"context"
"go.mongodb.org/mongo-driver/bson/bsoncodec"

opts "github.com/qiniu/qmgo/options"
"go.mongodb.org/mongo-driver/bson/bsoncodec"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)
Expand Down
2 changes: 1 addition & 1 deletion query.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ package qmgo
import (
"context"
"fmt"
"go.mongodb.org/mongo-driver/bson/bsoncodec"
"reflect"

"github.com/qiniu/qmgo/middleware"
"github.com/qiniu/qmgo/operator"
qOpts "github.com/qiniu/qmgo/options"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/bsoncodec"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)
Expand Down

0 comments on commit e4c235f

Please sign in to comment.