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::PgSequence => &[
49 "seqrelid",
50 "seqtypid",
51 "seqstart",
52 "seqincrement",
53 "seqmax",
54 "seqmin",
55 "seqcache",
56 "seqcycle",
57 ],
58 Self::InformationEnabledRoles => &["role_name"],
59 };
60 names.iter().map(|name| (*name).into()).collect()
61 }
62}