Add descriptions

This commit is contained in:
Erik Johnston 2016-02-03 16:22:35 +00:00
parent 33c71c3a4b
commit b84d59c5f0
4 changed files with 5 additions and 1 deletions

View File

@ -276,7 +276,8 @@ class ApplicationServiceTransactionStore(SQLBaseStore):
"application_services_state", "application_services_state",
dict(as_id=service.id), dict(as_id=service.id),
["state"], ["state"],
allow_none=True allow_none=True,
desc="get_appservice_state",
) )
if result: if result:
defer.returnValue(result.get("state")) defer.returnValue(result.get("state"))

View File

@ -39,6 +39,7 @@ class KeyStore(SQLBaseStore):
table="server_tls_certificates", table="server_tls_certificates",
keyvalues={"server_name": server_name}, keyvalues={"server_name": server_name},
retcols=("tls_certificate",), retcols=("tls_certificate",),
desc="get_server_certificate",
) )
tls_certificate = OpenSSL.crypto.load_certificate( tls_certificate = OpenSSL.crypto.load_certificate(
OpenSSL.crypto.FILETYPE_ASN1, tls_certificate_bytes, OpenSSL.crypto.FILETYPE_ASN1, tls_certificate_bytes,

View File

@ -134,6 +134,7 @@ class RegistrationStore(SQLBaseStore):
}, },
retcols=["name", "password_hash", "is_guest"], retcols=["name", "password_hash", "is_guest"],
allow_none=True, allow_none=True,
desc="get_user_by_id",
) )
def get_users_by_id_case_insensitive(self, user_id): def get_users_by_id_case_insensitive(self, user_id):

View File

@ -564,6 +564,7 @@ class StreamStore(SQLBaseStore):
table="events", table="events",
keyvalues={"event_id": event_id}, keyvalues={"event_id": event_id},
retcols=("stream_ordering", "topological_ordering"), retcols=("stream_ordering", "topological_ordering"),
desc="get_topological_token_for_event",
).addCallback(lambda row: "t%d-%d" % ( ).addCallback(lambda row: "t%d-%d" % (
row["topological_ordering"], row["stream_ordering"],) row["topological_ordering"], row["stream_ordering"],)
) )