-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
Copy pathschemaInsights.fixture.ts
78 lines (76 loc) · 2.28 KB
/
schemaInsights.fixture.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Copyright 2022 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.
import { SchemaInsightsViewProps } from "./schemaInsightsView";
export const SchemaInsightsPropsFixture: SchemaInsightsViewProps = {
schemaInsights: [
{
type: "DropIndex",
database: "db_name",
indexDetails: {
table: "table_name",
indexID: 1,
indexName: "index_name",
schema: "public",
lastUsed:
"This index has not been used and can be removed for better write performance.",
},
},
{
type: "DropIndex",
database: "db_name2",
indexDetails: {
table: "table_name2",
indexID: 2,
indexName: "index_name2",
schema: "public",
lastUsed:
"This index has not been used in over 9 days, 5 hours, and 3 minutes and can be removed for better write performance.",
},
},
{
type: "CreateIndex",
database: "db_name",
query: "CREATE INDEX ON test_table (another_num) STORING (num);",
execution: {
statement: "SELECT * FROM test_table WHERE another_num > _",
summary: "SELECT * FROM test_table",
fingerprintID: "\\xc093e4523ab0bd3e",
implicit: true,
},
},
{
type: "CreateIndex",
database: "db_name",
query: "CREATE INDEX ON test_table (yet_another_num) STORING (num);",
execution: {
statement: "SELECT * FROM test_table WHERE yet_another_num > _",
summary: "SELECT * FROM test_table",
fingerprintID: "\\xc093e4523ab0db9o",
implicit: false,
},
},
],
schemaInsightsDatabases: ["db_name", "db_name2"],
schemaInsightsTypes: ["DropIndex", "CreateIndex"],
schemaInsightsError: null,
sortSetting: {
ascending: false,
columnTitle: "insights",
},
filters: {
database: "",
schemaInsightType: "",
},
hasAdminRole: true,
refreshSchemaInsights: () => {},
onSortChange: () => {},
onFiltersChange: () => {},
refreshUserSQLRoles: () => {},
};