[entropy.db.sql] retrieveTreeUpdatesActions, listAllTreeUpdatesActions: order results by date
This commit is contained in:
@@ -2003,6 +2003,7 @@ class EntropyRepositoryBase(TextInterface, EntropyRepositoryPluginStore):
|
||||
audience.
|
||||
List all the available "treeupdates" (package names/slots changes
|
||||
directives) actions.
|
||||
Actions must be sorted by date (FLOAT).
|
||||
|
||||
@keyword no_ids_repos: if True, it will just return a tuple of 3-length
|
||||
tuples containing ((command, branch, unix_time,), ...)
|
||||
@@ -2018,6 +2019,7 @@ class EntropyRepositoryBase(TextInterface, EntropyRepositoryPluginStore):
|
||||
audience.
|
||||
Return all the available "treeupdates (package names/slots changes
|
||||
directives) actions for provided repository.
|
||||
Actions must be sorted by date (FLOAT).
|
||||
|
||||
@param repository: repository identifier
|
||||
@type repository: string
|
||||
|
||||
@@ -2581,11 +2581,12 @@ class EntropySQLRepository(EntropyRepositoryBase):
|
||||
if no_ids_repos:
|
||||
cur = self._cursor().execute("""
|
||||
SELECT command, branch, date FROM treeupdatesactions
|
||||
ORDER BY CAST(date AS FLOAT)
|
||||
""")
|
||||
else:
|
||||
cur = self._cursor().execute("""
|
||||
SELECT idupdate, repository, command, branch, date
|
||||
FROM treeupdatesactions
|
||||
FROM treeupdatesactions ORDER BY CAST(date AS FLOAT)
|
||||
""")
|
||||
return tuple(cur)
|
||||
|
||||
@@ -2597,7 +2598,7 @@ class EntropySQLRepository(EntropyRepositoryBase):
|
||||
|
||||
cur = self._cursor().execute("""
|
||||
SELECT command FROM treeupdatesactions WHERE
|
||||
repository = ? ORDER BY date""", params)
|
||||
repository = ? ORDER BY CAST(date AS FLOAT)""", params)
|
||||
return self._cur2tuple(cur)
|
||||
|
||||
def bumpTreeUpdatesActions(self, updates):
|
||||
|
||||
Reference in New Issue
Block a user