ashb commented on code in PR #73414:
URL: https://github.com/apache/airflow/pull/73414#discussion_r4323172919


##########
airflow-core/src/airflow/secrets/metastore.py:
##########
@@ -61,6 +90,36 @@ def get_connection(
             session.expunge(conn)
         return conn
 
+    async def aget_connection(
+        self, conn_id: str, team_name: str | None = None, *, session: 
AsyncSession | None = None
+    ) -> Connection | None:
+        """Get an Airflow Connection from the metadata DB using native async 
I/O."""
+        if session is None:
+            async with create_session_async() as owned_session:
+                return await self.aget_connection(conn_id, 
team_name=team_name, session=owned_session)
+
+        from airflow.models import Connection
+
+        row = (
+            (
+                await session.execute(
+                    select(Connection.__table__)

Review Comment:
   Why this, not `select(Connection)`?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to