> Turn your Database class into a state machine with an uninitialized and a connected state. Then have a Database.connect()
It's a bad advice. It's preferred instead to have a connect function returning a database instance in a successful case or an error otherwise.