summary refs log tree commit diff
path: root/synapse/storage/search.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-12-02 13:50:43 +0000
committerErik Johnston <erik@matrix.org>2015-12-02 13:50:43 +0000
commit976cb5aaa8e052a27b1dc249798e12c80e8aa329 (patch)
tree7600312c30920f3c9742f8085fe806e0a8ef7a27 /synapse/storage/search.py
parentFix so highlight matching works again (diff)
downloadsynapse-976cb5aaa8e052a27b1dc249798e12c80e8aa329.tar.xz
Throw if unrecognized DB type
Diffstat (limited to 'synapse/storage/search.py')
-rw-r--r--synapse/storage/search.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py
index fd7b688cf5..39f600f53c 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -419,5 +419,8 @@ def _parse_query(database_engine, search_term):
 
     if isinstance(database_engine, PostgresEngine):
         return " & ".join(result + ":*" for result in results)
-    else:
+    elif isinstance(database_engine, Sqlite3Engine):
         return " & ".join(result + "*" for result in results)
+    else:
+        # This should be unreachable.
+        raise Exception("Unrecognized database engine")