appimage: update, update-check and search returning installed applications

This commit is contained in:
Vinicius Moreira
2019-10-08 19:23:49 -03:00
parent a3bccb86f4
commit 8bacae7c2f
4 changed files with 67 additions and 6 deletions

View File

@@ -4,4 +4,5 @@ RELEASE_ATTRS = ('version', 'url_download', 'published_at')
SEARCH_APPS_BY_NAME_OR_DESCRIPTION = "SELECT {} FROM apps".format(','.join(APP_ATTRS)) + " WHERE lower(name) LIKE '%{}%' or lower(description) LIKE '%{}%'"
FIND_APP_ID_BY_NAME_AND_GITHUB = "SELECT id FROM apps WHERE lower(name) = '{}' and lower(github) = '{}'"
FIND_APPS_LATEST_VERSIONS = "SELECT name, github, version, url_download FROM apps WHERE lower(name) IN ({}) AND lower(github) in ({})"
FIND_RELEASES_BY_APP_ID = "SELECT {} FROM releases".format(','.join(RELEASE_ATTRS)) + " WHERE app_id = {} ORDER BY version desc"