-
Notifications
You must be signed in to change notification settings - Fork 68
Open
halcyonnouveau/clorinde
#14Description
Getting this error for a CHAR(2) column:
× Couldn't register SQL type.
╭─[./spotpilot-db/queries/site.sql:6:1]
6 │ --
7 │ --! select_one: DbSite
· ─────┬────
· ╰── this query contains an unsupported type (name: country, type: bpchar)
8 │ SELECT
I guess this is because BPCHAR is not mentioned here:
cornucopia/crates/cornucopia/src/type_registrar.rs
Lines 374 to 394 in d1229ae
| Kind::Simple => { | |
| let (rust_name, is_copy) = match *ty { | |
| Type::BOOL => ("bool", true), | |
| Type::CHAR => ("i8", true), | |
| Type::INT2 => ("i16", true), | |
| Type::INT4 => ("i32", true), | |
| Type::INT8 => ("i64", true), | |
| Type::FLOAT4 => ("f32", true), | |
| Type::FLOAT8 => ("f64", true), | |
| Type::TEXT | Type::VARCHAR => ("String", false), | |
| Type::BYTEA => ("Vec<u8>", false), | |
| Type::TIMESTAMP => ("time::PrimitiveDateTime", true), | |
| Type::TIMESTAMPTZ => ("time::OffsetDateTime", true), | |
| Type::DATE => ("time::Date", true), | |
| Type::TIME => ("time::Time", true), | |
| Type::JSON | Type::JSONB => ("serde_json::Value", false), | |
| Type::UUID => ("uuid::Uuid", true), | |
| Type::INET => ("std::net::IpAddr", true), | |
| Type::MACADDR => ("eui48::MacAddress", true), | |
| Type::NUMERIC => ("rust_decimal::Decimal", true), | |
| _ => { |
belohnung
Metadata
Metadata
Assignees
Labels
No labels