mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 12:34:58 -04:00
Drop support for sqlite<3.22 as well
This commit is contained in:
parent
abade34633
commit
3ada9b4264
6 changed files with 14 additions and 92 deletions
|
@ -36,17 +36,7 @@ def _stub_db_engine(**kwargs) -> BaseDatabaseEngine:
|
|||
|
||||
class TupleComparisonClauseTestCase(unittest.TestCase):
|
||||
def test_native_tuple_comparison(self):
|
||||
db_engine = _stub_db_engine(supports_tuple_comparison=True)
|
||||
db_engine = _stub_db_engine()
|
||||
clause, args = make_tuple_comparison_clause(db_engine, [("a", 1), ("b", 2)])
|
||||
self.assertEqual(clause, "(a,b) > (?,?)")
|
||||
self.assertEqual(args, [1, 2])
|
||||
|
||||
def test_emulated_tuple_comparison(self):
|
||||
db_engine = _stub_db_engine(supports_tuple_comparison=False)
|
||||
clause, args = make_tuple_comparison_clause(
|
||||
db_engine, [("a", 1), ("b", 2), ("c", 3)]
|
||||
)
|
||||
self.assertEqual(
|
||||
clause, "(a >= ? AND (a > ? OR (b >= ? AND (b > ? OR c > ?))))"
|
||||
)
|
||||
self.assertEqual(args, [1, 1, 2, 2, 3])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue