타입스크립트 에러 수정

This commit is contained in:
kjs
2025-12-01 15:30:25 +09:00
parent da6ac92391
commit b1b9e4ad93
7 changed files with 151 additions and 33 deletions

View File

@@ -16,7 +16,6 @@ import {
UpdateBatchConfigRequest,
} from "../types/batchTypes";
import { BatchExternalDbService } from "./batchExternalDbService";
import { DbConnectionManager } from "./dbConnectionManager";
export class BatchService {
/**
@@ -475,7 +474,13 @@ export class BatchService {
try {
if (connectionType === "internal") {
// 내부 DB 테이블 조회
const tables = await DbConnectionManager.getInternalTables();
const tables = await query<TableInfo>(
`SELECT table_name, table_type, table_schema
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE'
ORDER BY table_name`
);
return {
success: true,
data: tables,
@@ -509,7 +514,13 @@ export class BatchService {
try {
if (connectionType === "internal") {
// 내부 DB 컬럼 조회
const columns = await DbConnectionManager.getInternalColumns(tableName);
const columns = await query<ColumnInfo>(
`SELECT column_name, data_type, is_nullable, column_default
FROM information_schema.columns
WHERE table_schema = 'public' AND table_name = $1
ORDER BY ordinal_position`,
[tableName]
);
return {
success: true,
data: columns,
@@ -543,7 +554,9 @@ export class BatchService {
try {
if (connectionType === "internal") {
// 내부 DB 데이터 조회
const data = await DbConnectionManager.getInternalData(tableName, 10);
const data = await query<any>(
`SELECT * FROM ${tableName} LIMIT 10`
);
return {
success: true,
data,