22# Date: 2025/7/16
33
44from enum import Enum
5+ from typing import List
56
67from common .utils .utils import equals_ignore_case
78
@@ -15,26 +16,28 @@ def __init__(self, type_name):
1516
1617
1718class DB (Enum ):
18- excel = ('excel' , 'Excel/CSV' , '"' , '"' , ConnectType .sqlalchemy , 'PostgreSQL' )
19- redshift = ('redshift' , 'AWS Redshift' , '"' , '"' , ConnectType .py_driver , 'AWS_Redshift' )
20- ck = ('ck' , 'ClickHouse' , '"' , '"' , ConnectType .sqlalchemy , 'ClickHouse' )
21- dm = ('dm' , '达梦' , '"' , '"' , ConnectType .py_driver , 'DM' )
22- doris = ('doris' , 'Apache Doris' , '`' , '`' , ConnectType .py_driver , 'Doris' )
23- es = ('es' , 'Elasticsearch' , '"' , '"' , ConnectType .py_driver , 'Elasticsearch' )
24- kingbase = ('kingbase' , 'Kingbase' , '"' , '"' , ConnectType .py_driver , 'Kingbase' )
25- sqlServer = ('sqlServer' , 'Microsoft SQL Server' , '[' , ']' , ConnectType .sqlalchemy , 'Microsoft_SQL_Server' )
26- mysql = ('mysql' , 'MySQL' , '`' , '`' , ConnectType .sqlalchemy , 'MySQL' )
27- oracle = ('oracle' , 'Oracle' , '"' , '"' , ConnectType .sqlalchemy , 'Oracle' )
28- pg = ('pg' , 'PostgreSQL' , '"' , '"' , ConnectType .sqlalchemy , 'PostgreSQL' )
29- starrocks = ('starrocks' , 'StarRocks' , '`' , '`' , ConnectType .py_driver , 'StarRocks' )
30-
31- def __init__ (self , type , db_name , prefix , suffix , connect_type : ConnectType , template_name : str ):
19+ excel = ('excel' , 'Excel/CSV' , '"' , '"' , ConnectType .sqlalchemy , 'PostgreSQL' , [])
20+ redshift = ('redshift' , 'AWS Redshift' , '"' , '"' , ConnectType .py_driver , 'AWS_Redshift' , [])
21+ ck = ('ck' , 'ClickHouse' , '"' , '"' , ConnectType .sqlalchemy , 'ClickHouse' , [])
22+ dm = ('dm' , '达梦' , '"' , '"' , ConnectType .py_driver , 'DM' , [])
23+ doris = ('doris' , 'Apache Doris' , '`' , '`' , ConnectType .py_driver , 'Doris' , [])
24+ es = ('es' , 'Elasticsearch' , '"' , '"' , ConnectType .py_driver , 'Elasticsearch' , [])
25+ kingbase = ('kingbase' , 'Kingbase' , '"' , '"' , ConnectType .py_driver , 'Kingbase' , [])
26+ sqlServer = ('sqlServer' , 'Microsoft SQL Server' , '[' , ']' , ConnectType .sqlalchemy , 'Microsoft_SQL_Server' , [])
27+ mysql = ('mysql' , 'MySQL' , '`' , '`' , ConnectType .sqlalchemy , 'MySQL' , ['local_infile' ])
28+ oracle = ('oracle' , 'Oracle' , '"' , '"' , ConnectType .sqlalchemy , 'Oracle' , [])
29+ pg = ('pg' , 'PostgreSQL' , '"' , '"' , ConnectType .sqlalchemy , 'PostgreSQL' , [])
30+ starrocks = ('starrocks' , 'StarRocks' , '`' , '`' , ConnectType .py_driver , 'StarRocks' , [])
31+
32+ def __init__ (self , type , db_name , prefix , suffix , connect_type : ConnectType , template_name : str ,
33+ illegalParams : List [str ]):
3234 self .type = type
3335 self .db_name = db_name
3436 self .prefix = prefix
3537 self .suffix = suffix
3638 self .connect_type = connect_type
3739 self .template_name = template_name
40+ self .illegalParams = illegalParams
3841
3942 @classmethod
4043 def get_db (cls , type , default_if_none = False ):
0 commit comments