mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 08:24:55 -04:00
Rename database classes to make some sense (#8033)
This commit is contained in:
parent
0a86850ba3
commit
a7bdf98d01
337 changed files with 1408 additions and 1323 deletions
|
@ -323,7 +323,7 @@ class UpsertManyTests(unittest.HomeserverTestCase):
|
|||
|
||||
self.table_name = "table_" + hs.get_secrets().token_hex(6)
|
||||
self.get_success(
|
||||
self.storage.db.runInteraction(
|
||||
self.storage.db_pool.runInteraction(
|
||||
"create",
|
||||
lambda x, *a: x.execute(*a),
|
||||
"CREATE TABLE %s (id INTEGER, username TEXT, value TEXT)"
|
||||
|
@ -331,7 +331,7 @@ class UpsertManyTests(unittest.HomeserverTestCase):
|
|||
)
|
||||
)
|
||||
self.get_success(
|
||||
self.storage.db.runInteraction(
|
||||
self.storage.db_pool.runInteraction(
|
||||
"index",
|
||||
lambda x, *a: x.execute(*a),
|
||||
"CREATE UNIQUE INDEX %sindex ON %s(id, username)"
|
||||
|
@ -354,9 +354,9 @@ class UpsertManyTests(unittest.HomeserverTestCase):
|
|||
value_values = [["hello"], ["there"]]
|
||||
|
||||
self.get_success(
|
||||
self.storage.db.runInteraction(
|
||||
self.storage.db_pool.runInteraction(
|
||||
"test",
|
||||
self.storage.db.simple_upsert_many_txn,
|
||||
self.storage.db_pool.simple_upsert_many_txn,
|
||||
self.table_name,
|
||||
key_names,
|
||||
key_values,
|
||||
|
@ -367,7 +367,7 @@ class UpsertManyTests(unittest.HomeserverTestCase):
|
|||
|
||||
# Check results are what we expect
|
||||
res = self.get_success(
|
||||
self.storage.db.simple_select_list(
|
||||
self.storage.db_pool.simple_select_list(
|
||||
self.table_name, None, ["id, username, value"]
|
||||
)
|
||||
)
|
||||
|
@ -381,9 +381,9 @@ class UpsertManyTests(unittest.HomeserverTestCase):
|
|||
value_values = [["bleb"]]
|
||||
|
||||
self.get_success(
|
||||
self.storage.db.runInteraction(
|
||||
self.storage.db_pool.runInteraction(
|
||||
"test",
|
||||
self.storage.db.simple_upsert_many_txn,
|
||||
self.storage.db_pool.simple_upsert_many_txn,
|
||||
self.table_name,
|
||||
key_names,
|
||||
key_values,
|
||||
|
@ -394,7 +394,7 @@ class UpsertManyTests(unittest.HomeserverTestCase):
|
|||
|
||||
# Check results are what we expect
|
||||
res = self.get_success(
|
||||
self.storage.db.simple_select_list(
|
||||
self.storage.db_pool.simple_select_list(
|
||||
self.table_name, None, ["id, username, value"]
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue