Should you separate model functions, even if they retrieve the fields of data?
Lets say I have an Articles Model that gets Articles from the database.
I have a function, getUserArticles($id)
, that gets the users articles. I have a function, getAllArticles($offset, $limit)
, that gets a list of articles.
Should I leave the two functions separate from one another, or combine them somehow.
The reason I ask is because if I were to alter, add, or remove a field from the query, I would have to do the change in every function. So if I change my mind and decide I no longer want to show the time_added
for every article, I would have to remove it from every function.