Skip to content

Commit 178744a

Browse files
committed
Add a schema accessor on Type
1 parent f551a86 commit 178744a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/types/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@ macro_rules! make_postgres_type {
150150
Type::Other(ref u) => u.kind(),
151151
}
152152
}
153+
154+
/// The schema of this type.
155+
pub fn schema(&self) -> &str {
156+
match *self {
157+
Type::Other(ref u) => u.schema(),
158+
_ => "pg_catalog",
159+
}
160+
}
153161
}
154162
)
155163
}

0 commit comments

Comments
 (0)