Note that dbName is not used here, while we use it in the internal version from which this comes from. Maybe make this take a ConnectionSpec instead?