Skip to content

Conversation

luan
Copy link

@luan luan commented Sep 25, 2025

Adds handling of all unsigned types for Type<Any> as well as i8 (via TINYINT).

Support for SQLite is done by downcasting from unsigned to signed. u8, u16, and u32 all fit in completely in one type.

u64 is not available (easily) in SQLite, so I've intentionally let it fall through to:

            _ => unreachable!("BUG: missing mapping for {val:?}"),

That seems undesirable, so I'm looking for input on what would be best for the u64 case.

Is this a breaking change?

No. Behavior is additive and fixes issues with using Any with unsigned ints only.

@luan luan force-pushed the luan/unsigned-any branch 2 times, most recently from 36fffcb to 572bf75 Compare September 25, 2025 01:10
@luan luan force-pushed the luan/unsigned-any branch from 572bf75 to 3620c80 Compare September 25, 2025 01:11
@luan luan marked this pull request as draft September 25, 2025 01:29
@luan
Copy link
Author

luan commented Sep 25, 2025

Welp, I just realized while going through the CI errors that UNSIGNED is not a thing in standard Postgres which explains why y'all didn't have this in Any to begin with. I don't feel like it's my place to decide to do the same "hack" I did for SQLite on postgres so going to leave this alone as a draft for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant