BinaryLink that keep ORDER -- Let's discuss ?
Ed Kleban
Ed at Kleban.com
Wed Dec 14 10:59:42 CST 2005
On 12/14/05 2:31 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:
> On 12/14/05 1:49 AM, "Ed Kleban" <Ed at Kleban.com> wrote:
>
>>> No, you will get
>>>
>>> { 3, 5, 7, 8, 9 }
>>>
>>>> And when I do a FindLinked( 7, right, left ) I will get an arrayset with:
>>>> { 1, 9, 6, 3, 2 } IN THAT ORDER
>>>
>>> No, you will get
>>>
>>> { 1, 2, 3, 6, 9 }
>>>
>>
>> Ok. That's why I kept asking. I'm glad I did. This is not what I
>> understood you saying before. This suggests that I won't be able to use a
>> Binary link for at least one of my needs. I'll have to keep a separate
>> table of two columns with left links and right links so that I can access
>> the RecId of records in this table and sort based on that. Hopefully the
>> efficiency will be similar to that of using a BinaryLink.
>
> Why you think that such table solve task ????
> Well, it will work only if you NEVER delete records.
Correct. And I never delete records. If did need to delete records I could
presumably add a third field that included linkAddTime for example so I
could sort results based on that. I may end up doing that just so I don't
end up writing this code a third time should I discover I'm wrong and have
to do deletions later. Thanks for pointing that out.
>>> ---------------------
>>> Ed, remember few days ago, I have start talk about
>>>
>>> BinaryLink that keep ORDER.
>>>
>> No, unfortunately I do not remember this. Perhaps you can send me a piece
>> of the email if you still have it.
>
> They was on beta list
>
If you can provide me with a subject line I'd be happy to go back and read
them.
>>> They will do what you want.
>>>
>>> HOW they will do this, I do not know yet, because I see at least 3 ways to
>>> implement, each have own props/cons.
>>>
>> So this is something new that is not available yet?
>> Ok.
>
> Yes.
>
> Point is that this will be in fact BinaryLink which use quite other internal
> structure and algorithms.
>
> And the main: it will work for GENERAL task.
>
> - you can delete records.
>
> - you can insert records [first|last|before|after] another
>
> - you can do searches which use [first|last|before|after] keywords.
>
> - you can CHANGE ORDER of existed items
>
> Here a lots of points and features can be,
> I have start some pages about SQL for such feature.
> Who is interested can read:
>
> http://paradigma.ukrcom.kherson.ua/dokuwiki/doku.php?id=paradigma:public:doc
> umentation:en:vsql:vsql
>
Ah, interesting. I'd hope for API calls as well as SQL, but yes, this
sounds like a good idea.
Thanks
--Ed
More information about the Valentina
mailing list