-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Is your feature request related to a problem? Please describe.
The table methods are currently situated in the api.py file, this makes it not lean.
Describe the solution you'd like
There are two possible options:
- Import classes from
ether_sqllibrary, then connecting these classes to their respective tables in the current psql. To add more methods we can inherit the class fromether_sqland add methods in them.
from ether_sql.models import Blocks
class ApiBlocks(Blocks):
connect_to_table('blocks')
@classmethod
def current_blockNumber():
logic_of_method
- The second option is not relying on
ether_sqllibrary but connecting to the table as implemented inand implementing the methods on this class directly.Line 29 in 6268ef1
Blocks=ss.get_table_object('blocks')
I would prefer option 1 since, we can then reuse the ether_sqlfunctions as well.
Metadata
Metadata
Assignees
Labels
No labels