Simplify db ORM method names
This commit is contained in:
@ -38,7 +38,7 @@ class Category(BaseORM):
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def list_categories(db_manager, filter_query=None):
|
||||
def list(db_manager, filter_query=None):
|
||||
cursor = db_manager.get_cursor()
|
||||
where = ""
|
||||
if filter_query is not None:
|
||||
@ -120,7 +120,7 @@ class Activity(BaseORM):
|
||||
self.conn.commit()
|
||||
|
||||
@staticmethod
|
||||
def list_activities(db_manager, filter_query=None):
|
||||
def list(db_manager, filter_query=None):
|
||||
cursor = db_manager.get_cursor()
|
||||
where = ""
|
||||
if filter_query is not None:
|
||||
@ -195,7 +195,7 @@ class Fact(BaseORM):
|
||||
super().__init__(db_manager, "facts", id, activity_id=activity_id)
|
||||
|
||||
@staticmethod
|
||||
def list_facts(db_manager):
|
||||
def list(db_manager):
|
||||
cursor = db_manager.get_cursor()
|
||||
cursor.execute("SELECT * FROM facts")
|
||||
rows = cursor.fetchall()
|
||||
|
Reference in New Issue
Block a user