Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-django-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-django-backend
Commits
29d8e150
Verified
Commit
29d8e150
authored
4 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
Sorting
parent
ee5a131c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
djaosdb/caosdb_client.py
+3
-1
3 additions, 1 deletion
djaosdb/caosdb_client.py
with
3 additions
and
1 deletion
djaosdb/caosdb_client.py
+
3
−
1
View file @
29d8e150
...
@@ -43,7 +43,6 @@ class FindResult(Result):
...
@@ -43,7 +43,6 @@ class FindResult(Result):
upper
=
(
skip
+
limit
if
skip
is
not
None
and
limit
is
not
None
else
upper
=
(
skip
+
limit
if
skip
is
not
None
and
limit
is
not
None
else
limit
)
limit
)
# todo sort
if
columns
is
not
None
:
if
columns
is
not
None
:
self
.
_results
=
[]
self
.
_results
=
[]
for
row
in
rows
[
skip
:
upper
]:
for
row
in
rows
[
skip
:
upper
]:
...
@@ -51,6 +50,9 @@ class FindResult(Result):
...
@@ -51,6 +50,9 @@ class FindResult(Result):
else
:
else
:
self
.
_results
=
rows
self
.
_results
=
rows
if
sort
:
self
.
_results
.
sort
(
key
=
lambda
x
:
x
[
sort
[
0
][
0
]],
reverse
=
sort
[
0
][
1
]
<
0
)
def
__iter__
(
self
):
def
__iter__
(
self
):
return
iter
(
self
.
_results
)
return
iter
(
self
.
_results
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment