mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 09:56:05 -04:00
Use SequenceGenerator for state group ID allocation
This commit is contained in:
parent
42509b8fb6
commit
3c36ae17a5
4 changed files with 11 additions and 26 deletions
|
@ -154,12 +154,6 @@ class PostgresEngine(BaseDatabaseEngine):
|
|||
def lock_table(self, txn, table):
|
||||
txn.execute("LOCK TABLE %s in EXCLUSIVE MODE" % (table,))
|
||||
|
||||
def get_next_state_group_id(self, txn):
|
||||
"""Returns an int that can be used as a new state_group ID
|
||||
"""
|
||||
txn.execute("SELECT nextval('state_group_id_seq')")
|
||||
return txn.fetchone()[0]
|
||||
|
||||
@property
|
||||
def server_version(self):
|
||||
"""Returns a string giving the server version. For example: '8.1.5'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue