mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 22:25:19 +00:00
refactor(headless): 使用 ColumnReq 请求对象替换 getColumnsBySql引入 ColumnReq 请求对象以统一请求参数,并在 DatabaseController 中替换 getColumnsBySql 方法以使用此对象。相应地,更新 service.ts 中的函数以匹配新端点 listColumnsBySql,并在 SqlDetail.tsx 中调用更新后的函数。 (#1678)
This commit is contained in:
@@ -18,7 +18,7 @@ import { isFunction } from 'lodash';
|
||||
import FullScreen from '@/components/FullScreen';
|
||||
import SqlEditor from '@/components/SqlEditor';
|
||||
import type { TaskResultItem, TaskResultColumn } from '../data';
|
||||
import { executeSql, getColumnsBySql } from '@/pages/SemanticModel/service';
|
||||
import { executeSql, listColumnsBySql } from '@/pages/SemanticModel/service';
|
||||
|
||||
import SqlParams from './SqlParams';
|
||||
import styles from '../style.less';
|
||||
@@ -249,7 +249,7 @@ const SqlDetail: React.FC<IProps> = ({
|
||||
sqlVariables: sqlParams,
|
||||
});
|
||||
|
||||
const { code: getColumnCode, data: getColumnData } = await getColumnsBySql({
|
||||
const { code: getColumnCode, data: getColumnData } = await listColumnsBySql({
|
||||
sql: value,
|
||||
databaseId: currentDatabaseItem.key,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user