mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-08-01 08:52:11 +08:00
support table online edit
This commit is contained in:
@ -150,14 +150,14 @@ public class TableController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/query")
|
||||
public DataResult<TableVO> query(@Valid TableDetailQueryRequest request) {
|
||||
public DataResult<Table> query(@Valid TableDetailQueryRequest request) {
|
||||
TableQueryParam queryParam = rdbWebConverter.tableRequest2param(request);
|
||||
TableSelector tableSelector = new TableSelector();
|
||||
tableSelector.setColumnList(true);
|
||||
tableSelector.setIndexList(true);
|
||||
DataResult<Table> tableDTODataResult = tableService.query(queryParam, tableSelector);
|
||||
TableVO tableVO = rdbWebConverter.tableDto2vo(tableDTODataResult.getData());
|
||||
return DataResult.of(tableVO);
|
||||
return tableService.query(queryParam, tableSelector);
|
||||
//TableVO tableVO = rdbWebConverter.tableDto2vo(tableDTODataResult.getData());
|
||||
//return DataResult.of(tableVO);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -150,4 +150,9 @@ public class ColumnVO {
|
||||
private Boolean generatedColumn;
|
||||
|
||||
|
||||
private String extent;
|
||||
|
||||
|
||||
private String editStatus;
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,8 @@ package ai.chat2db.server.web.api.controller.rdb.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import ai.chat2db.spi.model.TableColumn;
|
||||
import ai.chat2db.spi.model.TableIndex;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@ -25,12 +27,12 @@ public class TableVO {
|
||||
/**
|
||||
* 列
|
||||
*/
|
||||
private List<ColumnVO> columnList;
|
||||
private List<TableColumn> columnList;
|
||||
|
||||
/**
|
||||
* 索引
|
||||
*/
|
||||
private List<IndexVO> indexList;
|
||||
private List<TableIndex> indexList;
|
||||
|
||||
/**
|
||||
* 是否已经被固定
|
||||
|
Reference in New Issue
Block a user