|
@@ -125,7 +125,6 @@ def get_job_jdbc_datasources_info(db: Session, ds_id: int):
|
|
def update_job_jdbc_datasources(db: Session, ds_id: int, update_item: schemas.JobJdbcDatasourceUpdate):
|
|
def update_job_jdbc_datasources(db: Session, ds_id: int, update_item: schemas.JobJdbcDatasourceUpdate):
|
|
if update_item.jdbc_password and update_item.jdbc_password != '':
|
|
if update_item.jdbc_password and update_item.jdbc_password != '':
|
|
update_item.jdbc_password = decode_base64(update_item.jdbc_password)
|
|
update_item.jdbc_password = decode_base64(update_item.jdbc_password)
|
|
- print(update_item.jdbc_password)
|
|
|
|
ds, update_item = _format_datasource(db, update_item)
|
|
ds, update_item = _format_datasource(db, update_item)
|
|
con_result = ds.is_connect()
|
|
con_result = ds.is_connect()
|
|
if not con_result:
|
|
if not con_result:
|
|
@@ -166,3 +165,7 @@ def get_job_jdbc_datasource(db: Session, ds_id: int):
|
|
if not db_item:
|
|
if not db_item:
|
|
raise Exception('未找到该数据源')
|
|
raise Exception('未找到该数据源')
|
|
return db_item
|
|
return db_item
|
|
|
|
+
|
|
|
|
+def get_job_jdbc_datasource_table_location(db: Session, db_name: str, table_name: str, ds_id: int):
|
|
|
|
+ ds, item = _format_datasource(db, None, ds_id)
|
|
|
|
+ return ds.get_table_info(table_name,db_name)
|