On Mar 27, 2011 10:20 PM, "Darren Duncan" <dar...@darrenduncan.net> wrote:
>
> Nico Williams wrote:
> > User defined types.  There are two types in particular that I'd like
> > to see added:
> >
> >  - Bit strings.  Bit strings are like character strings, but the
> > elements can only be bits.  The key is that bit string length matters
> > when it comes to collation (000 sorts before 0000).  Related
> > sub-types: IP (v4 and 6) addresses (e.g., 10/8 is easily represented
> > as an eight bit long bit string: 00001010, while 10.1.2.3.4 is easily
> > represented as a 32 bit long bit string).
>
> SQLite already has Blobs, and I see those as being exactly the same thing,
which
> is a string of bits.  Maybe you're just wanting more operators so it is
easier
> to introspect or manipulate them?

Blobs are _octet_ strings.  Sure, one could write functions that encode and
manipulate bit strings as blobs were the first octet (or three bits from it)
encodes the remainder of the bit string length div 8.   (SQLite3 would have
to do something similar anyways.  The difference lies in syntax.)

Nico
--
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to