Persist columns in views

This commit is contained in:
Adria Navarro 2023-07-18 15:47:37 +02:00
parent 82e2385099
commit 28f4aef07f
2 changed files with 4 additions and 8 deletions

View File

@ -1,11 +1,5 @@
import * as setup from "./utilities"
import {
FieldType,
SortDirection,
SortType,
Table,
ViewV2,
} from "@budibase/types"
import { FieldType, SortOrder, SortType, Table, ViewV2 } from "@budibase/types"
import { generator, structures } from "@budibase/backend-core/tests"
function priceTable(): Table {
@ -36,9 +30,10 @@ describe("/v2/views", () => {
query: { allOr: false, equal: { field: "value" } },
sort: {
field: "fieldToSort",
order: SortDirection.DESCENDING,
order: SortOrder.DESCENDING,
type: SortType.STRING,
},
columns: ["name"],
}
afterAll(setup.afterAll)

View File

@ -23,6 +23,7 @@ export interface ViewV2 extends Document {
order?: SortOrder
type?: SortType
}
columns?: string[]
}
export type ViewSchema = ViewCountOrSumSchema | ViewStatisticsSchema