1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.tikv.common.meta;
19
20 import com.fasterxml.jackson.annotation.JsonCreator;
21 import com.fasterxml.jackson.annotation.JsonProperty;
22 import java.io.Serializable;
23 import java.util.ArrayList;
24 import java.util.List;
25 import java.util.stream.Collectors;
26
27 public class TiViewInfo implements Serializable {
28
29
30 private final long viewAlgorithm;
31 private final org.tikv.common.meta.TiUserIdentity userIdentity;
32
33
34 private final long viewSecurity;
35 private final String viewSelect;
36
37
38 private final long viewCheckOpt;
39 private final List<String> viewCols;
40
41 @JsonCreator
42 public TiViewInfo(
43 @JsonProperty("view_algorithm") long viewAlgorithm,
44 @JsonProperty("view_definer") org.tikv.common.meta.TiUserIdentity userIdentity,
45 @JsonProperty("view_security") long viewSecurity,
46 @JsonProperty("view_select") String viewSelect,
47 @JsonProperty("view_checkoption") long viewCheckOpt,
48 @JsonProperty("view_cols") List<org.tikv.common.meta.CIStr> viewCols) {
49 this.viewAlgorithm = viewAlgorithm;
50 this.userIdentity = userIdentity;
51 this.viewSecurity = viewSecurity;
52 this.viewSelect = viewSelect;
53 this.viewCheckOpt = viewCheckOpt;
54 if (viewCols != null) {
55 this.viewCols =
56 viewCols.stream().map(org.tikv.common.meta.CIStr::getO).collect(Collectors.toList());
57 } else {
58 this.viewCols = new ArrayList<>();
59 }
60 }
61 }