Persist columns in views
This commit is contained in:
parent
82e2385099
commit
28f4aef07f
|
@ -1,11 +1,5 @@
|
||||||
import * as setup from "./utilities"
|
import * as setup from "./utilities"
|
||||||
import {
|
import { FieldType, SortOrder, SortType, Table, ViewV2 } from "@budibase/types"
|
||||||
FieldType,
|
|
||||||
SortDirection,
|
|
||||||
SortType,
|
|
||||||
Table,
|
|
||||||
ViewV2,
|
|
||||||
} from "@budibase/types"
|
|
||||||
import { generator, structures } from "@budibase/backend-core/tests"
|
import { generator, structures } from "@budibase/backend-core/tests"
|
||||||
|
|
||||||
function priceTable(): Table {
|
function priceTable(): Table {
|
||||||
|
@ -36,9 +30,10 @@ describe("/v2/views", () => {
|
||||||
query: { allOr: false, equal: { field: "value" } },
|
query: { allOr: false, equal: { field: "value" } },
|
||||||
sort: {
|
sort: {
|
||||||
field: "fieldToSort",
|
field: "fieldToSort",
|
||||||
order: SortDirection.DESCENDING,
|
order: SortOrder.DESCENDING,
|
||||||
type: SortType.STRING,
|
type: SortType.STRING,
|
||||||
},
|
},
|
||||||
|
columns: ["name"],
|
||||||
}
|
}
|
||||||
|
|
||||||
afterAll(setup.afterAll)
|
afterAll(setup.afterAll)
|
||||||
|
|
|
@ -23,6 +23,7 @@ export interface ViewV2 extends Document {
|
||||||
order?: SortOrder
|
order?: SortOrder
|
||||||
type?: SortType
|
type?: SortType
|
||||||
}
|
}
|
||||||
|
columns?: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ViewSchema = ViewCountOrSumSchema | ViewStatisticsSchema
|
export type ViewSchema = ViewCountOrSumSchema | ViewStatisticsSchema
|
||||||
|
|
Loading…
Reference in New Issue