How to sort b sequence? FW: Order of returned VArraySet rids when using FindLinked with a VArraySet arg.

Ed Kleban Ed at Kleban.com
Thu Dec 15 08:56:37 CST 2005




On 12/15/05 4:16 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

> 
>> First I get all the children records for a given parent:
>> 
>>     treeRidSet = TblTree.fTreeParent.FindLinked( _
>>                        parentItemRid,TblTree, TblItems )
> 
> treeRidSet -- this is ArraySet. ok
> 
>> What I would like to then do is:
>> 
>>     // Sort records by sequence number:
>>     orderedTreeRidSet = TblTree.Sort( treeRidSet, TblTree.fTreeSeq )
> 
> MISTAKE!
> 
>     treeRidSet -- is set of records for table TblItems.
> 
> So you cannot use it in TblTree.Sort()
>  

Right.... yeah I missed that one.   Ok.  Well, this is a perfectly
reasonable thing to want to do.  So either:

1) Perhaps this is something that falls out of the new  Ordered BinaryLink
scheme you have in mind...  But I don't thinks so.  This looks to be a
desirable operation whether your links are ordered or not.  Or...

2) Sounds like there should be some new method(s) for doing this or some new
optional argument supported by FindLinked, FindLinkdAsBitSet, and
FindLinkedAsArraySet.


> On 12/15/05 3:38 AM, "Ed Kleban" <Ed at Kleban.com> wrote:
>       
>> 1) Do all this much more slowly in SQL.  Yuck.
> 
> I think this is only a way until we give you power of BinaryLink Ordered
>  

Yeah... but this is only one example query of many similar onese.   I need
to be able to have the intermediate cached results at various points so I
can reuse them to do even more complex relation management with less
overhead.  This would just blow up into a huge mess in SQL or be slow as a
dead turtle if each query would have to start from scratch.  It's the inSet
argument that's providing the speed here, and I don't believe SQL supports
that.
  
>> 3) Convince to you write ASAP a FindLinkedAsArraySet method that preserves
>> the same order of records in the VArraySet result as the same order in the
>> passed inSet argument.
> 
> You have see mistake above?
> 
> So you need do 2 such conversions.
> 
>     find items
>     convert to tree
>     sort
>     convert to items
> 
> Now tell me, that BinaryLinks with order beat
> ANYTHING that RDBMS world can offer :-))
> 

BinaryLinks with order beat ANYTHING that RDBMS world can offer

BinaryLinks with order beat ANYTHING that RDBMS world can offer

BinaryLinks with order beat ANYTHING that RDBMS world can offer

BinaryLinks with order beat ANYTHING that RDBMS world can offer

BinaryLinks with order beat ANYTHING that RDBMS world can offer

BinaryLinks with order beat ANYTHING that RDBMS world can offer

BinaryLinks with order beat ANYTHING that RDBMS world can offer

BinaryLinks with order beat ANYTHING that RDBMS world can offer

I guess I better start thinking about the three possible implementations of
Binary links you're debating about, eh?  Care to share the implementation
details or protocol differences you're debating about?







More information about the Valentina mailing list