diff --git a/countersql/database.go b/countersql/database.go index 1901fed..7411074 100644 --- a/countersql/database.go +++ b/countersql/database.go @@ -6,11 +6,14 @@ import ( ) // Configuration holds the DSN connection string and a resource Semaphore to limit the number of active connections +// Note: This is a copied design pattern I've used for other projects which had much more data inside a Configuration struct. +// Examples include semaphores and persistent connection pools, which I've stripped out for this project. type Configuration struct { DSN string } // Connection represents a single connection to the database, however there may be many instances / connections +// Note: This is a copied design pattern I've used for other projects which had much more data inside a Connection struct. type Connection struct { DB *sql.DB }