Support directly inserting pgtype.Bits into a column of type BIT(n) using named args
- Dominant language
- Go
- Stars
- 14.3k
- Forks
- 1.1k
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 11
Description
**Is your feature request related to a problem? Please describe.**
Right now if i try and directly insert pgtype.Bits into column of type BIT(n) using named args i get an incorrect binary type error. as a solution im converting my pgtype.Bits into strings of "1"s and "0"s like "1010011...1111001"
**Describe the solution you'd like**
Ideally pgtype.Bits -> Bit(n) is supported. scanning from a query result into a pgtype.bits works funnily enough (BIT(n) -> pgtype.Bits)
Contributor guide
Research direction
Start by locating the pgtype.Bits encoding path and the named-argument parameter conversion for PostgreSQL BIT(n), then compare them with the existing BIT(n)-to-pgtype.Bits scan path. Done means a pgtype.Bits value can be inserted directly into a BIT(n) column through named arguments without an incorrect binary type error, with coverage for the conversion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100