feat(dameng): full DM8 database support

Adds Dameng DM8 explain/autotrace support and user-management SQL support, with backend autotrace safety checks and escaped CREATE USER SQL.
This commit is contained in:
Quinlevi authored and GitHub committed 2026-06-08 02:07:00 +08:00
1 parent a5659d7637
commit 897e6998fd
22 files changed
+1154 -55

No files matched your search

+8 -1
View File
@@ -96,13 +96,14 @@ pub enum AgentMethod {
ExecuteQueryPage,
FetchQueryPage,
CloseQuerySession,
GetExplainInfo,
ExecuteTransaction,
Disconnect,
Shutdown,
}
impl AgentMethod {
pub const ALL: [Self; 20] = [
pub const ALL: [Self; 21] = [
Self::Handshake,
Self::Connect,
Self::TestConnection,
@@ -120,6 +121,7 @@ impl AgentMethod {
Self::ExecuteQueryPage,
Self::FetchQueryPage,
Self::CloseQuerySession,
Self::GetExplainInfo,
Self::ExecuteTransaction,
Self::Disconnect,
Self::Shutdown,
@@ -144,6 +146,7 @@ impl AgentMethod {
Self::ExecuteQueryPage => "execute_query_page",
Self::FetchQueryPage => "fetch_query_page",
Self::CloseQuerySession => "close_query_session",
Self::GetExplainInfo => "get_explain_info",
Self::ExecuteTransaction => "execute_transaction",
Self::Disconnect => "disconnect",
Self::Shutdown => "shutdown",
@@ -542,6 +545,10 @@ impl AgentDriverClient {
self.call_method_with_timeout(AgentMethod::FetchQueryPage, params, timeout_duration).await
}
pub async fn get_explain_info<T: DeserializeOwned + Send + 'static>(&mut self, params: Value) -> Result<T, String> {
self.call_method(AgentMethod::GetExplainInfo, params).await
}
pub async fn close_query_session<T: DeserializeOwned + Send + 'static>(
&mut self,
session_id: &str,