스크롤 기능 포함
This commit is contained in:
27
backend-node/src/interfaces/DatabaseConnector.ts
Normal file
27
backend-node/src/interfaces/DatabaseConnector.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { ConnectionTestResult, TableInfo } from '../types/externalDbTypes';
|
||||
|
||||
export interface ConnectionConfig {
|
||||
host: string;
|
||||
port: number;
|
||||
database: string;
|
||||
user: string;
|
||||
password: string;
|
||||
connectionTimeoutMillis?: number;
|
||||
queryTimeoutMillis?: number;
|
||||
ssl?: boolean | { rejectUnauthorized: boolean };
|
||||
}
|
||||
|
||||
export interface QueryResult {
|
||||
rows: any[];
|
||||
rowCount?: number;
|
||||
fields?: any[];
|
||||
}
|
||||
|
||||
export interface DatabaseConnector {
|
||||
connect(): Promise<void>;
|
||||
disconnect(): Promise<void>;
|
||||
testConnection(): Promise<ConnectionTestResult>;
|
||||
executeQuery(query: string): Promise<QueryResult>;
|
||||
getTables(): Promise<TableInfo[]>;
|
||||
getColumns(tableName: string): Promise<any[]>; // 특정 테이블의 컬럼 정보 조회
|
||||
}
|
||||
Reference in New Issue
Block a user