On Sun, Mar 27, 2011 at 11:33 AM, jeff archer <jarch...@yahoo.com> wrote: >>From: Patrick Earl <pate...@patearl.net> >>Subject: Re: [sqlite] Lack of "decimal" support >> >>If SQLite can't decide on a base-10 format itself, perhaps the answer >>lies in enhancing the API to allow for custom type storage and >>operators. > > So, like a virtual type interface. This would be a nice feature.
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). - Bignums. 64-bit signed integers are not enough :( However, adding user-defined types must not be easy, since, among other things, it means making the lexer run-time pluggable so it can recognize constant value tokens for the new type (unless one is willing to rebuild SQLite every time one adds a type). Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users