refactor: assistant support all sqlbot datasource #467

This commit is contained in:
junjun
2025-11-27 17:41:02 +08:00
committed by Junjun
parent 955c9becbf
commit 3a12e4d700
+6 -6
View File
@@ -271,15 +271,15 @@ def get_ds_engine(ds: AssistantOutDsSchema) -> Engine:
def get_out_ds_conf(ds: AssistantOutDsSchema, timeout:int=30) -> str:
conf = {
"host":ds.host,
"port":ds.port,
"username":ds.user,
"password":ds.password,
"database":ds.dataBase,
"host":ds.host or '',
"port":ds.port or 0,
"username":ds.user or '',
"password":ds.password or '',
"database":ds.dataBase or '',
"driver":'',
"extraJdbc":ds.extraParams or '',
"dbSchema":ds.db_schema or '',
"timeout":timeout
"timeout":timeout or 30
}
conf["extraJdbc"] = ''
return aes_encrypt(json.dumps(conf))