betodealmeida commented on code in PR #36529:
URL: https://github.com/apache/superset/pull/36529#discussion_r2619850078


##########
superset-core/src/superset_core/api/models.py:
##########
@@ -75,6 +84,83 @@ def backend(self) -> str:
     def data(self) -> dict[str, Any]:
         raise NotImplementedError
 
+    def execute(
+        self,
+        sql: str,
+        options: QueryOptions | None = None,
+    ) -> QueryResult:
+        """
+        Execute SQL synchronously.
+
+        :param sql: SQL query to execute

Review Comment:
   <del>One concern I have here: is `sql` a single statement, or can it have 
multiple statements? I think we need to support both, because some databases 
don't support sessions, so queries like these must be executed in a single 
block:</del>
   
   ```sql
   SET foo=1;  -- needed for the next statement
   SELECT * FROM t;
   ```
   
   <del>But some database drivers don't support multiple statements, so we need 
to send them one-by-one.</del>
   
   Edit: nevermind, I found the logic later.



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