summaryrefslogtreecommitdiff
path: root/system/db/content.go
diff options
context:
space:
mode:
Diffstat (limited to 'system/db/content.go')
-rw-r--r--system/db/content.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/system/db/content.go b/system/db/content.go
index f1969b5..3e22a68 100644
--- a/system/db/content.go
+++ b/system/db/content.go
@@ -246,12 +246,17 @@ func Query(namespace string, opts QueryOptions) [][]byte {
continue
}
+ if cur >= start {
+ break
+ }
+
if i >= opts.Count {
break
}
posts = append(posts, v)
i++
+ cur++
}
case "desc":
@@ -261,12 +266,17 @@ func Query(namespace string, opts QueryOptions) [][]byte {
continue
}
+ if cur >= end {
+ break
+ }
+
if i >= opts.Count {
break
}
posts = append(posts, v)
i++
+ cur++
}
}