FEAT: new conection test module

This commit is contained in:
Gabriel Rosa
2022-07-27 08:41:32 -03:00
parent 349ae780a7
commit 037f5cfec0
11 changed files with 340 additions and 11 deletions
@@ -0,0 +1,42 @@
import { Injectable } from '@nestjs/common';
import {
ConnectionTestCredentialsReq,
ConnectionTestCredentialsRes,
ConnectionTestListSchemasReq,
ConnectionTestListSchemasRes,
ConnectionTestListTablesReq,
ConnectionTestListTablesRes,
ConnectionTestPingReq,
ConnectionTestPingRes,
GetTableMetadataReq,
GetTableMetadataRes,
} from './dto/connection-test';
@Injectable()
export class ConnectionTestService {
async connectionTestPing(
body: ConnectionTestPingReq,
): Promise<ConnectionTestPingRes> {
return { operation_result: true };
}
async connectionTestCredentials(
body: ConnectionTestCredentialsReq,
): Promise<ConnectionTestCredentialsRes> {
return { operation_result: true, connection_id: '' };
}
async connectionTestListSchemas(
body: ConnectionTestListSchemasReq,
): Promise<ConnectionTestListSchemasRes> {
return { operation_result: true, schema_list: [] };
}
async connectionTestListTables(
body: ConnectionTestListTablesReq,
): Promise<ConnectionTestListTablesRes> {
return { operation_result: true, table_list: [] };
}
async getTableMetadata(
body: GetTableMetadataReq,
): Promise<GetTableMetadataRes> {
return { table_metadata: [{ columns: [], table_name: '' }] };
}
}