You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What do you think about using a Repository design pattern, where we have a Repository interface providing the data access methods, and a Repository implementation that holds the reference to the pgPool instance?
@bajtos In light of the recent discussion of moving the database access layer: Do we want to proceed with the repository design pattern. The way I see it, we would still need to either have very specific read functions in the repository class or we use a generic method (similar to loadDeals) and only provide constant strings that defined the specific query details in the data layer. Something like this:
See what I did in piece-indexer:
https://github.com/filecoin-station/piece-indexer/blob/main/repository/lib/redis-repository.js
There is nothing wrong with your functional-programming approach here, it's a valid direction too.
Originally posted by @bajtos in #39 (comment)
The text was updated successfully, but these errors were encountered: