uqa_sql/catalog/system_relations/
columns.rs1use super::SystemRelation;
10
11impl SystemRelation {
12 pub fn column_names(self) -> Vec<String> {
13 let names: &[&str] = match self {
14 Self::Projected(relation) => {
15 return relation
16 .schema()
17 .into_iter()
18 .map(|(name, _)| name)
19 .collect()
20 }
21 Self::PgDbRoleSetting => &["setdatabase", "setrole", "setconfig"],
22 Self::PgShadow => &[
23 "usename",
24 "usesysid",
25 "usecreatedb",
26 "usesuper",
27 "userepl",
28 "usebypassrls",
29 "passwd",
30 "valuntil",
31 "useconfig",
32 ],
33 Self::PgTablespace => &["oid", "spcname", "spcowner", "spcacl", "spcoptions"],
34 Self::PgCollation => &[
35 "oid",
36 "collname",
37 "collnamespace",
38 "collowner",
39 "collprovider",
40 "collisdeterministic",
41 "collencoding",
42 "collcollate",
43 "collctype",
44 "colllocale",
45 "collicurules",
46 "collversion",
47 ],
48 Self::PgDepend => &[
49 "classid",
50 "objid",
51 "objsubid",
52 "refclassid",
53 "refobjid",
54 "refobjsubid",
55 "deptype",
56 ],
57 Self::PgSequence => &[
58 "seqrelid",
59 "seqtypid",
60 "seqstart",
61 "seqincrement",
62 "seqmax",
63 "seqmin",
64 "seqcache",
65 "seqcycle",
66 ],
67 Self::PgLanguage => &[
68 "oid",
69 "lanname",
70 "lanowner",
71 "lanispl",
72 "lanpltrusted",
73 "lanplcallfoid",
74 "laninline",
75 "lanvalidator",
76 "lanacl",
77 ],
78 Self::InformationEnabledRoles => &["role_name"],
79 };
80 names.iter().map(|name| (*name).into()).collect()
81 }
82}