raise ProgrammingError if not connection._is_connect()