MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / detail

Method detail

src/sql/src/pure/error.rs:64–103  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

62
63impl PgSourcePurificationError {
64 pub fn detail(&self) -> Option<String> {
65 match self {
66 Self::DanglingTextColumns { items } => Some(format!(
67 "the following tables are referenced but not added: {}",
68 itertools::join(items, ", ")
69 )),
70 Self::DatabaseMissingFilteredSchemas {
71 database: _,
72 schemas,
73 } => Some(format!(
74 "missing schemas: {}",
75 itertools::join(schemas.iter(), ", ")
76 )),
77 Self::UserLacksUsageOnSchemas { schemas } => Some(format!(
78 "user lacks USAGE privileges for schemas {}",
79 schemas.join(", ")
80 )),
81 Self::UserLacksSelectOnTables { tables } => Some(format!(
82 "user lacks SELECT privileges for tables {}",
83 tables.join(", ")
84 )),
85 Self::BypassRLSRequired { tables } => Some(format!(
86 "user must have BYPASSRLS attribute to read tables {}",
87 tables.join(", "),
88 )),
89 Self::NotTablesWReplicaIdentityFull { items } => {
90 Some(format!("referenced items: {}", items.join(", ")))
91 }
92 Self::UnrecognizedTypes { cols } => Some(format!(
93 "the following columns contain unsupported types:\n{}",
94 itertools::join(
95 cols.into_iter()
96 .map(|(col, Oid(oid))| format!("{} (OID {})", col, oid)),
97 "\n"
98 )
99 )),
100 Self::InvalidConnection(e) => e.detail(),
101 _ => None,
102 }
103 }
104
105 pub fn hint(&self) -> Option<String> {
106 match self {

Callers

nothing calls this directly

Calls 2

to_string_with_causesMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected