1
0
Fork 0
mirror of synced 2024-10-03 19:43:32 +13:00

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