diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2021-05-25 00:32:25 +0200 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2021-05-25 00:32:25 +0200 |
commit | acea55225e340078dabeffe9b6aaa05f34bdc99d (patch) | |
tree | 3e7b543a2a878aae2af8943f5785bd97b2339eaf | |
parent | c696aba65a00b791b061398ed451e33fb7678ca0 (diff) |
history: Add explicit ORDER BY to get_entry
Should be the default behaviour though.
-rw-r--r-- | saneterm/history.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/saneterm/history.py b/saneterm/history.py index 038a4f9..29e0c34 100644 --- a/saneterm/history.py +++ b/saneterm/history.py @@ -73,7 +73,7 @@ class History(): self.__cur.execute(""" SELECT entry FROM history WHERE exe=:exe AND ( SELECT count(*) FROM history WHERE exe=:exe ) >= :offset - LIMIT 1 OFFSET + ORDER BY rowid ASC LIMIT 1 OFFSET (( SELECT count(*) FROM history WHERE exe=:exe ) - :offset); """, {"exe": exe, "offset": offset}) |