实现 Redis 的查询功能
This commit is contained in:
1 parent
5aa5ed9cee
commit
7de0de2313
19 files changed
+160
-20
No files matched your search
@@ -257,6 +257,7 @@ pub async fn redis_execute_command(
|
||||
connection_id: String,
|
||||
db: u32,
|
||||
command: String,
|
||||
skip_safety_check: Option<bool>,
|
||||
) -> Result<RedisCommandResult, String> {
|
||||
// In read-only mode, only allow safe read commands through the raw command interface
|
||||
if let Some(name) = dbx_core::query::connection_readonly_name(&state, &connection_id).await {
|
||||
@@ -268,7 +269,14 @@ pub async fn redis_execute_command(
|
||||
));
|
||||
}
|
||||
}
|
||||
dbx_core::redis_ops::redis_execute_command_core(&state, &connection_id, db, &command).await
|
||||
dbx_core::redis_ops::redis_execute_command_core(
|
||||
&state,
|
||||
&connection_id,
|
||||
db,
|
||||
&command,
|
||||
skip_safety_check.unwrap_or(false),
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
|
||||
Reference in new issue
Block a user