-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.go
72 lines (68 loc) · 2.01 KB
/
const.go
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package mgoc
const (
KeyIn = "$in"
KeyEqual = "$eq"
KeyAnd = "$and"
KeyOr = "$or"
KeyGreaterThan = "$gt"
KeyGreaterThanEqual = "$gte"
KeyLessThan = "$lt"
KeyLessThanEqual = "$lte"
KeyNotEqual = "$ne"
KeyExists = "$exists"
KeyRegex = "$regex"
KeySet = "$set"
KeyElemMatch = "$elemMatch"
KeyMatch = "$match"
KeyGroup = "$group"
KeyHaving = "$having"
KeyProject = "$project"
KeySort = "$sort"
KeySkip = "$skip"
KeyLimit = "$limit"
KeySum = "$sum"
KeyAll = "$all"
KeyNear = "$near"
KeyGeoNear = "$geoNear"
KeyGeoWithin = "$geoWithin"
KeyCenter = "$center"
KeyCenterSphere = "$centerSphere"
KeyGeoIntersects = "$geoIntersects"
KeyNearSphere = "$nearSphere"
KeyGeoMetry = "$geometry"
KeyMaxDistance = "$maxDistance"
KeyMax = "$max"
KeyMin = "$min"
KeyAvg = "$avg"
KeyMod = "$mod"
KeyAbs = "$abs"
KeyUnwind = "$unwind"
KeyRound = "$round"
)
const (
toBool = "$toBool"
toDecimal = "$toDecimal"
toDouble = "$toDouble"
toInt = "$toInt"
toLong = "$toLong"
toDate = "$toDate"
toString = "$toString"
toObjectId = "$toObjectId"
toLower = "$toLower"
toUpper = "$toUpper"
)
const (
columnNameType = "type"
columnNameCoordinates = "coordinates"
columnNameNear = "near"
columnNameDistanceField = "distanceField"
columnNameMaxDistance = "maxDistance"
columnNameIncludeLocs = "includeLocs"
columnNameSpherical = "spherical"
)
const (
defaultConnectTimeoutSeconds = 3 // connect timeout seconds
defaultWriteTimeoutSeconds = 60 // write timeout seconds
defaultReadTimeoutSeconds = 60 // read timeout seconds
defaultPrimaryKeyName = "_id" // database primary key name
)