Add connect factory method to Db class