외부 DB 연결 설정 및 쿼리 처리 로직 보완

This commit is contained in:
dohyeons
2025-11-25 14:57:48 +09:00
parent ace80be8e1
commit 080188b419
2 changed files with 27 additions and 11 deletions

View File

@@ -290,8 +290,13 @@ export class ExternalDbConnectionAPI {
static async getTableColumns(connectionId: number, tableName: string): Promise<ApiResponse<any[]>> {
try {
console.log("컬럼 정보 API 요청:", `${this.BASE_PATH}/${connectionId}/tables/${tableName}/columns`);
// 컬럼 메타데이터 조회는 외부 DB 성능/네트워크 영향으로 오래 걸릴 수 있으므로
// 기본 30초보다 넉넉한 타임아웃을 사용
const response = await apiClient.get<ApiResponse<any[]>>(
`${this.BASE_PATH}/${connectionId}/tables/${tableName}/columns`,
{
timeout: 120000, // 120초
},
);
console.log("컬럼 정보 API 응답:", response.data);
return response.data;