Re: [sqlite] Collation & blobs

2008-06-12 Thread Alex Katebi
I can still keep my routes in text presentation notation like 1.1.0.0/16 or
fe80::/16.
Thanks,
-Alex

On Thu, Jun 12, 2008 at 7:32 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote:

>
> On Jun 12, 2008, at 6:35 PM, Alex Katebi wrote:
>
> >   The custom sqlite3_create_collation( ) is a perfect solution for
> > implementing an Internet Protocol Routing Table.
> > But I am not sure if SQLite will call a custom collation function if
> > column
> > values are blobs. In other word, are blobs considered for collation?
> >
>
> Blob always sort in memcmp() order.  The sorting rules for SQLite are
> (and always have been):
>
>  1.  NULLs sort first
>  2.  Numbers sort next in numerical order (floating point values
> and integers interleave as appropriate).
>  3.  Text sorts next in the order determined by the collating
> sequence
>  4.  BLOBs sort last in memcmp() order.
>
>
>
> D. Richard Hipp
> [EMAIL PROTECTED]
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Collation & blobs

2008-06-12 Thread D. Richard Hipp

On Jun 12, 2008, at 6:35 PM, Alex Katebi wrote:

>   The custom sqlite3_create_collation( ) is a perfect solution for
> implementing an Internet Protocol Routing Table.
> But I am not sure if SQLite will call a custom collation function if  
> column
> values are blobs. In other word, are blobs considered for collation?
>

Blob always sort in memcmp() order.  The sorting rules for SQLite are  
(and always have been):

  1.  NULLs sort first
  2.  Numbers sort next in numerical order (floating point values  
and integers interleave as appropriate).
  3.  Text sorts next in the order determined by the collating  
sequence
  4.  BLOBs sort last in memcmp() order.



D. Richard Hipp
[EMAIL PROTECTED]



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


[sqlite] Collation & blobs

2008-06-12 Thread Alex Katebi
   The custom sqlite3_create_collation( ) is a perfect solution for
implementing an Internet Protocol Routing Table.
But I am not sure if SQLite will call a custom collation function if column
values are blobs. In other word, are blobs considered for collation?

   One can format a blob with route mask length in the first byte followed
by the destination address bytes.

Thanks,
-Alex
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users