Revert "Expose the db connection "

This reverts commit 372a3cfeb31580a154cfaf0e8559a8d99e1be137.