feat(oracle): add SYSDBA authentication support

Switch oracle-rs to t8y2/oracle-rs fork with SYSDBA support.
Add sysdba field to ConnectionConfig and a checkbox in the
Oracle connection dialog to enable connecting as SYS with
SYSDBA privileges.
This commit is contained in:
t8y2 committed 2026-05-06 13:23:56 +08:00
1 parent 746a4c491a
commit e315c4ad36
8 files changed
+60 -5

No files matched your search

+10 -2
View File
@@ -6,8 +6,16 @@ use crate::types::{ColumnInfo, DatabaseInfo, ForeignKeyInfo, IndexInfo, QueryRes
pub type OracleClient = Connection;
pub async fn connect(host: &str, port: u16, service: &str, user: &str, pass: &str) -> Result<OracleClient, String> {
let config = Config::new(host, port, service, user, pass);
pub async fn connect(
host: &str,
port: u16,
service: &str,
user: &str,
pass: &str,
sysdba: bool,
) -> Result<OracleClient, String> {
let mut config = Config::new(host, port, service, user, pass);
config.sysdba = sysdba;
tokio::time::timeout(connection_timeout(), Connection::connect_with_config(config))
.await
.map_err(|_| format!("Oracle connection timed out ({CONNECTION_TIMEOUT_SECS}s)"))?