mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-18 16:02:15 +01:00
Max is not a function
This commit is contained in:
parent
f67d60496a
commit
45488e0ffa
1 changed files with 1 additions and 1 deletions
|
@ -148,7 +148,7 @@ class DataStore(RoomMemberStore, RoomStore,
|
||||||
def _get_cache_dict(self, db_conn, table, entity_column, stream_column, max_value):
|
def _get_cache_dict(self, db_conn, table, entity_column, stream_column, max_value):
|
||||||
sql = (
|
sql = (
|
||||||
"SELECT %(entity)s, MAX(%(stream)s) FROM %(table)s"
|
"SELECT %(entity)s, MAX(%(stream)s) FROM %(table)s"
|
||||||
" WHERE %(stream)s > max(? - 100000, 0)"
|
" WHERE %(stream)s > ? - 100000"
|
||||||
" GROUP BY %(entity)s"
|
" GROUP BY %(entity)s"
|
||||||
" ORDER BY MAX(%(stream)s) DESC"
|
" ORDER BY MAX(%(stream)s) DESC"
|
||||||
" LIMIT 10000"
|
" LIMIT 10000"
|
||||||
|
|
Loading…
Reference in a new issue