作者 yangfu

fix: some optimize

... ... @@ -53,7 +53,7 @@ func (tableService *TableService) TablePreview(ctx *domain.Context, cmd *command
return nil, factory.FastError(err)
}
response.Fields = dataTable.Fields
response.Data = domain.GripData(domain.ToFieldData(dataTable.Fields, pageData(cmd.PageNumber, cmd.PageSize, dataTable.Data), false), int64(len(dataTable.Data)))
response.Data = domain.GripData(domain.ToFieldData(dataTable.Fields, pageData(cmd.Where.PageNumber, cmd.Where.PageSize, dataTable.Data), false), int64(len(dataTable.Data)))
default:
var options = starrocks.QueryOptions{
Table: table,
... ... @@ -77,7 +77,7 @@ func (tableService *TableService) TablePreview(ctx *domain.Context, cmd *command
switch table.TableType {
case domain.CalculateSet.ToString():
response.Fields = dataTable.Fields
response.Data = domain.GripData(domain.ToFieldData(dataTable.Fields, pageData(cmd.PageNumber, cmd.PageSize, dataTable.Data), false), int64(len(dataTable.Data)))
response.Data = domain.GripData(domain.ToFieldData(dataTable.Fields, pageData(cmd.Where.PageNumber, cmd.Where.PageSize, dataTable.Data), false), int64(len(dataTable.Data)))
default:
response.Load(table, dataTable, domain.ObjectMetaTable)
}
... ...