Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-datastore
Commits
9550a82b
Unverified
Commit
9550a82b
authored
Mar 22, 2019
by
Michael Avila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only apply NaiveOffset and NaiveLimit when appropriate
parent
2cec99fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
mount/mount.go
mount/mount.go
+9
-1
No files found.
mount/mount.go
View file @
9550a82b
...
...
@@ -262,7 +262,15 @@ func (d *Datastore) Query(q query.Query) (query.Results, error) {
Close
:
queries
.
close
,
})
return
query
.
NaiveLimit
(
query
.
NaiveOffset
(
qr
,
offset
),
q
.
Limit
),
nil
if
offset
>
0
{
qr
=
query
.
NaiveOffset
(
qr
,
offset
)
}
if
q
.
Limit
>
0
{
qr
=
query
.
NaiveLimit
(
qr
,
q
.
Limit
)
}
return
qr
,
nil
}
func
(
d
*
Datastore
)
Close
()
error
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment