You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/08 01:50:23 UTC

[GitHub] [airflow] zhongjiajie commented on issue #7903: Add conn_name and get_connection to dbapi_hook

zhongjiajie commented on issue #7903: Add conn_name and get_connection to dbapi_hook
URL: https://github.com/apache/airflow/pull/7903#issuecomment-610706420
 
 
   And for now, the solution two pass CI, and I think it work.
   
   The question is, should we take solution one and change `get_connection` in `dbapi_hook` to property `connection`? If we use solution one, subclass of `dbapi_hook` have to use `self.connection` to get connection which is different from subclass from `base_hook`(using `get_connection`)
   
   But if we take solution two, `get_connection` don't pass `mypy` check, and `self.get_connection` and `DbApiHook.get_connection` call different method, I think it will confuse user when calling it

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services