schema_reverse_engineer/
error.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum SchemaReverseEngineerError {
5 #[error("Database connection error: {0}")]
6 Connection(String),
7
8 #[error("Database introspection error: {0}")]
9 Introspection(String),
10
11 #[error("Unsupported column type: {0}")]
12 UnsupportedColumnType(String),
13
14 #[error(
15 "table '{0}' has unique keys and/or indexes but no primary key -- the schema-rs XML \
16 format requires a <primary> element whenever <keys> is present, so these cannot be \
17 represented. Add a primary key to the table, or drop its unique keys/indexes, before \
18 reverse-engineering it."
19 )]
20 PkLessTableHasKeys(String),
21
22 #[error("IO error: {0}")]
23 Io(#[from] std::io::Error),
24}