Re: [sqlite] How to index data based on custom comparisons?

2017-12-14 Thread Lifepillar
On 14/12/2017 13:14, Richard Hipp wrote: On 12/14/17, Lifepillar wrote: I am not familiar with virtual tables yet, but I see that they are used, for example, to implement Rtree indexes. Would it be feasible to implement my own index structure as a virtual table and

Re: [sqlite] How to index data based on custom comparisons?

2017-12-14 Thread Lifepillar
On 13/12/2017 22:20, Simon Slavin wrote: On 13 Dec 2017, at 8:34pm, Lifepillar wrote: But, (correct me if I am wrong), if I index the blob column directly, comparisons are based on memcpy(), which in my case is not what I want. Is it possible to create an index that

Re: [sqlite] How to index data based on custom comparisons?

2017-12-14 Thread Richard Hipp
On 12/14/17, Lifepillar wrote: > I am not familiar with virtual tables yet, but I see that they are used, > for example, to implement Rtree indexes. Would it be feasible to > implement my own index structure as a virtual table and use it to index > a blob column in a

Re: [sqlite] How to index data based on custom comparisons?

2017-12-14 Thread Lifepillar
On 14/12/2017 00:02, Keith Medcalf wrote: On Wednesday, 13 December, 2017 13:35, Lifepillar wrote: I am implementing an extension for manipulating IEEE754 decimal numbers. Numbers are stored as blobs using a standard encoding. Numbers that are mathematically equal

Re: [sqlite] How to index data based on custom comparisons?

2017-12-13 Thread Keith Medcalf
On Wednesday, 13 December, 2017 13:35, Lifepillar wrote: >I am implementing an extension for manipulating IEEE754 decimal >numbers. Numbers are stored as blobs using a standard encoding. >Numbers that are mathematically equal may have different >representations,

Re: [sqlite] How to index data based on custom comparisons?

2017-12-13 Thread Simon Slavin
On 13 Dec 2017, at 8:34pm, Lifepillar wrote: > But, (correct me if > I am wrong), if I index the blob column directly, comparisons are > based on memcpy(), which in my case is not what I want. Is it > possible to create an index that somehow uses a custom comparison >

Re: [sqlite] How to index data based on custom comparisons?

2017-12-13 Thread Richard Hipp
On 12/13/17, Lifepillar wrote: > > if I index the blob column directly, comparisons are > based on memcpy(), which in my case is not what I want. Is it > possible to create an index that somehow uses a custom comparison > function instead? No. SQLite always uses