mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 15:25:32 +00:00
15 lines
232 B
Rust
15 lines
232 B
Rust
use sqlx::Sqlite;
|
|
use sqlx_test::test_type;
|
|
|
|
#[derive(Debug, PartialEq, sqlx::Type)]
|
|
#[repr(u32)]
|
|
enum Origin {
|
|
Foo = 1,
|
|
Bar = 2,
|
|
}
|
|
|
|
test_type!(origin_enum<Origin>(Sqlite,
|
|
"1" == Origin::Foo,
|
|
"2" == Origin::Bar,
|
|
));
|