summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
Diffstat (limited to 'alot')
-rw-r--r--alot/db/manager.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/alot/db/manager.py b/alot/db/manager.py
index 53170f87..14925816 100644
--- a/alot/db/manager.py
+++ b/alot/db/manager.py
@@ -298,6 +298,14 @@ class DBManager(object):
db = Database(path=self.path)
return [t for t in db.get_all_tags()]
+ def get_named_queries(self):
+ """
+ returns the named queries stored in the database.
+ :rtype: dict (str -> str) mapping alias to full query string
+ """
+ db = Database(path=self.path)
+ return {k[6:]: v for k, v in db.get_configs('query.')}
+
def async(self, cbl, fun):
"""
return a pair (pipe, process) so that the process writes