We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a311ac6 commit 9b7c12fCopy full SHA for 9b7c12f
backend/apps/db/engine.py
@@ -1,5 +1,6 @@
1
# Author: Junjun
2
# Date: 2025/5/19
3
+import urllib.parse
4
from typing import List
5
6
from sqlalchemy import create_engine, text, MetaData, Table
@@ -16,7 +17,7 @@ def get_engine_config():
16
17
18
19
def get_engine_uri(conf: DatasourceConf):
- return f"postgresql+psycopg2://{conf.username}:{conf.password}@{conf.host}:{conf.port}/{conf.database}"
20
+ return f"postgresql+psycopg2://{urllib.parse.quote(conf.username)}:{urllib.parse.quote(conf.password)}@{conf.host}:{conf.port}/{urllib.parse.quote(conf.database)}"
21
22
23
def get_engine_conn():
0 commit comments