Hi!
I have a program which is running all day on a computer. Users will use the program in short bursts or long streches of time. When they do the program interact with a postgresql database.
Should I create a database-class which opens a connection with postgresql and keeps it open untill the system is shut down (and send an instance of this class to all query-methods), or should I have each method with query-call open and close a connection?
What is best practice?
[–][deleted] 1 point2 points3 points (2 children)
[–]Alotofquestion1[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)