We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e3fe976 + c01b182 commit 3f035a9Copy full SHA for 3f035a9
1 file changed
queries/qm/query_mods.go
@@ -8,7 +8,9 @@ type QueryMod func(q *queries.Query)
8
// Apply the query mods to the Query object
9
func Apply(q *queries.Query, mods ...QueryMod) {
10
for _, mod := range mods {
11
- mod(q)
+ if mod != nil {
12
+ mod(q)
13
+ }
14
}
15
16
@@ -123,13 +125,12 @@ func From(from string) QueryMod {
123
125
124
126
127
-func ForceIndex( index string) QueryMod {
128
+func ForceIndex(index string) QueryMod {
129
return func(q *queries.Query) {
130
queries.SetForceIndex(q, index)
131
132
133
-
134
// Limit the number of returned rows
135
func Limit(limit int) QueryMod {
136
0 commit comments