michael-s-molina commented on code in PR #36529:
URL: https://github.com/apache/superset/pull/36529#discussion_r2619762946


##########
superset/models/core.py:
##########
@@ -1276,6 +1276,38 @@ def purge_oauth2_tokens(self) -> None:
             DatabaseUserOAuth2Tokens.id == self.id
         ).delete()
 
+    def execute(
+        self,
+        sql: str,
+        options: Any | None = None,
+    ) -> Any:
+        """
+        Execute SQL synchronously.
+
+        :param sql: SQL query to execute
+        :param options: QueryOptions with execution settings
+        :returns: QueryResult with status, data, and metadata
+        """
+        from superset.sql.execution import SQLExecutor
+
+        return SQLExecutor(self).execute(sql, options)
+
+    def execute_async(
+        self,
+        sql: str,
+        options: Any | None = None,
+    ) -> Any:
+        """
+        Execute SQL asynchronously via Celery.
+
+        :param sql: SQL query to execute
+        :param options: QueryOptions with execution settings
+        :returns: AsyncQueryHandle for tracking the query
+        """
+        from superset.sql.execution import SQLExecutor
+
+        return SQLExecutor(self).execute_async(sql, options)

Review Comment:
   Way to small for extraction.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to