From 1ea1db1d3d6eaaf0390cce08ec2813bc2a0e2033 Mon Sep 17 00:00:00 2001 From: Jonathan Zernik Date: Wed, 20 Oct 2021 15:29:56 -0500 Subject: [PATCH] Remove old commented methods in db class (#1661) --- squeaknode/db/squeak_db.py | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/squeaknode/db/squeak_db.py b/squeaknode/db/squeak_db.py index 82c07db4..8ecaffcd 100644 --- a/squeaknode/db/squeak_db.py +++ b/squeaknode/db/squeak_db.py @@ -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(