mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-15 12:50:47 +02:00
Remove old commented methods in db class (#1661)
This commit is contained in:
parent
ef4bfcf36f
commit
1ea1db1d3d
1 changed files with 0 additions and 33 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue