-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
35 lines (30 loc) · 760 Bytes
/
Copy pathtypes.go
File metadata and controls
35 lines (30 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package morm
import (
"reflect"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
)
// MongoDB represents the MongoDB client and database information.
type MongoDB struct {
Client *mongo.Client
DBName string
}
// Collect represents a MongoDB collection and model information.
type Collect struct {
collection *mongo.Collection
modelType reflect.Type
modelElemPtr reflect.Value
}
// CollectQueryBuilder represents a query builder for MongoDB operations on a collection.
type CollectQueryBuilder struct {
c *Collect
filter interface{}
skip int64
limit int64
projection bson.D
sort bson.D
method string
popFields []string
value interface{}
pre func(string, func())
}