aboutsummaryrefslogtreecommitdiffstats
path: root/models/db/search.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/db/search.go')
-rw-r--r--models/db/search.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/models/db/search.go b/models/db/search.go
index 37565f45e1..e0a1b6bde9 100644
--- a/models/db/search.go
+++ b/models/db/search.go
@@ -26,8 +26,10 @@ const (
SearchOrderByForksReverse SearchOrderBy = "num_forks DESC"
)
-const (
- // Which means a condition to filter the records which don't match any id.
- // It's different from zero which means the condition could be ignored.
- NoConditionID = -1
-)
+// NoConditionID means a condition to filter the records which don't match any id.
+// eg: "milestone_id=-1" means "find the items without any milestone.
+const NoConditionID int64 = -1
+
+// NonExistingID means a condition to match no result (eg: a non-existing user)
+// It doesn't use -1 or -2 because they are used as builtin users.
+const NonExistingID int64 = -1000000