Remove old commented methods in db class (#1661)

This commit is contained in:
Jonathan Zernik 2021-10-20 15:29:56 -05:00 committed by GitHub
parent ef4bfcf36f
commit 1ea1db1d3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -665,26 +665,6 @@ class SqueakDb:
num_squeaks = row["num_squeaks"]
return num_squeaks
# def number_of_squeaks_with_address_with_block(
# self,
# address: str,
# block_height: int,
# ) -> int:
# """ Get number of squeaks with address with block height. """
# s = (
# select([
# func.count().label("num_squeaks"),
# ])
# .select_from(self.squeaks)
# .where(self.squeaks.c.author_address == address)
# .where(self.squeaks.c.n_block_height == block_height)
# )
# with self.get_connection() as connection:
# result = connection.execute(s)
# row = result.fetchone()
# num_squeaks = row["num_squeaks"]
# return num_squeaks
def number_of_squeaks_with_address_in_block_range(
self,
address: str,
@ -782,19 +762,6 @@ class SqueakDb:
profiles = [self._parse_squeak_profile(row) for row in rows]
return profiles
# def get_following_profiles_from_addreses(self, addresses: List[str]) -> List[SqueakProfile]:
# """ Get all following profiles. """
# s = (
# select([self.profiles])
# .where(self.profiles.c.following)
# .where(self.profiles.c.address.in_(addresses))
# )
# with self.get_connection() as connection:
# result = connection.execute(s)
# rows = result.fetchall()
# profiles = [self._parse_squeak_profile(row) for row in rows]
# return profiles
def get_profile(self, profile_id: int) -> Optional[SqueakProfile]:
""" Get a profile. """
s = select([self.profiles]).where(