mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-07-29 10:43:06 +08:00
feat:copy sql
This commit is contained in:
@ -112,6 +112,12 @@ public class TableController extends EmbeddingController {
|
||||
return ListResult.of(tableVOS);
|
||||
}
|
||||
|
||||
@GetMapping("/copy_dml_sql")
|
||||
public DataResult<String> copyDmlSql(@Valid DmlSqlCopyRequest request) {
|
||||
DmlSqlCopyParam queryParam = rdbWebConverter.dmlRequest2param(request);
|
||||
return tableService.copyDmlSql(queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query the table index under the current DB
|
||||
*
|
||||
|
@ -254,4 +254,6 @@ public abstract class RdbWebConverter {
|
||||
public abstract EsTableSchemaRequest req2req(TableBriefQueryRequest request);
|
||||
|
||||
public abstract TablePageQueryParam schemaReq2page(EsTableSchemaRequest request);
|
||||
|
||||
public abstract DmlSqlCopyParam dmlRequest2param(DmlSqlCopyRequest request) ;
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package ai.chat2db.server.web.api.controller.rdb.request;
|
||||
|
||||
import ai.chat2db.server.web.api.controller.data.source.request.DataSourceBaseRequest;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DmlSqlCopyRequest extends DataSourceBaseRequest {
|
||||
|
||||
@NotNull
|
||||
private String tableName;
|
||||
|
||||
private String type;
|
||||
}
|
Reference in New Issue
Block a user