sea-orm icon indicating copy to clipboard operation
sea-orm copied to clipboard

Use `BitVec` and `BitArray` from `bitvec` crate for `Bit` and `VarBit` column types

Open bismitpanda opened this issue 1 year ago • 1 comments

Description

Sea ORM uses Vec<u8> for Bit and VarBit with length greater than 1 and bool for length 1 or none. But it should use bitvec::vec::BitVec for VarBit and bitvec::array::BitArray for Bit. Also for postgres types like Inet (can use std::net::IpAddr), Cidr and MacAddress

Steps to Reproduce

  1. Use a schema with data type Bit or VarBit
  2. Run migration
  3. Generate scheme

Expected Behavior

generates field with type BitVec or BitArray

Actual Behavior

generates field with type String

Reproduces How Often

Everytime

Workarounds

No idea

Versions

sea-orm version: 1.1.0 OS: Ubuntu 24.04 Database: Postgres 16 Rust version: 1.84 (nightly)

bismitpanda avatar Nov 07 '24 17:11 bismitpanda

Any updates on this?

bismitpanda avatar Dec 01 '24 11:12 bismitpanda