summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Bogorodskiy <bogorodskiy@gmail.com>2023-03-12 15:31:01 +0100
committerRoman Bogorodskiy <bogorodskiy@gmail.com>2023-03-12 15:42:29 +0100
commitd7e9a5115318743509c3aaf3b582a316eb9c5716 (patch)
tree3758a9cbaacaf738ef850baf29a9d6fdd3ac17f9
parentb65984f92014d7bcdeada913b0ef0086936198fe (diff)
downloadqutebrowser-d7e9a5115318743509c3aaf3b582a316eb9c5716.tar.gz
qutebrowser-d7e9a5115318743509c3aaf3b582a316eb9c5716.zip
browser: history: fix queries for when DQS disabled
Recently the FreeBSD port of sqlite has DQS feature disabled by default. Without this feature enabled, it's not allowed to use double quotes for string literals. As such quoting is used in the history.py module, qutebrowser fails to work on such configurations. The fix is to use single quotes instead. ref: #7596
-rw-r--r--qutebrowser/browser/history.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/qutebrowser/browser/history.py b/qutebrowser/browser/history.py
index d2046345f..595bd1c03 100644
--- a/qutebrowser/browser/history.py
+++ b/qutebrowser/browser/history.py
@@ -217,19 +217,19 @@ class WebHistory(sql.SqlTable):
self.create_index('HistoryIndex', 'url')
self.create_index('HistoryAtimeIndex', 'atime')
self._contains_query = self.contains_query('url')
- self._between_query = self.database.query('SELECT * FROM History '
- 'where not redirect '
- 'and not url like "qute://%" '
- 'and atime > :earliest '
- 'and atime <= :latest '
- 'ORDER BY atime desc')
-
- self._before_query = self.database.query('SELECT * FROM History '
- 'where not redirect '
- 'and not url like "qute://%" '
- 'and atime <= :latest '
- 'ORDER BY atime desc '
- 'limit :limit offset :offset')
+ self._between_query = self.database.query("SELECT * FROM History "
+ "where not redirect "
+ "and not url like 'qute://%' "
+ "and atime > :earliest "
+ "and atime <= :latest "
+ "ORDER BY atime desc")
+
+ self._before_query = self.database.query("SELECT * FROM History "
+ "where not redirect "
+ "and not url like 'qute://%' "
+ "and atime <= :latest "
+ "ORDER BY atime desc "
+ "limit :limit offset :offset")
def __repr__(self):
return utils.get_repr(self, length=len(self))