Binary Links

Joakim Schramm joakim at astrocalc.com
Sun Apr 30 16:28:52 CDT 2006


 

> -----Original Message-----
> From: valentina-bounces at lists.macserve.net 
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of 
> Ruslan Zasukhin
> Sent: 30 April 2006 16:09
> To: valentina at lists.macserve.net
> Subject: Re: Binary Links
> 
> On 4/30/06 5:01 PM, "Joakim Schramm" <joakim at astrocalc.com> wrote:
> 
> >> 
> >>> Just a small question before dig into set up my binary 
> links. Can I 
> >>> setup 2 or more links from the one side so I kind of get 
> it like a 
> >>> WERE A=This AND B=That ? Well I might get it more as I get
> >> along the
> >>> road, but was just thinking of this one in setting
> >> conitions on 2 or more tables...
> >> 
> >> You ask if you can have several binary links between 2 tables?
> >> YES. 
> > 
> > SAME 2 tables? 
> 
> yes
> 
> > It will then act as Field1Val AND Field2Val critera, or OR or etc. 
> > depending on function used to return RecSet/Item?
> 
> Not exactly
> 
> Let you have on left table T1 some record with RecID = 555
> 
> THIS record by link1 is linked to such records of right table T2
>         { 7 9 11 13 15 }
> 
> And THIS record also is linked by link2 to record of right table T2
>         { 9 13 17 21 }
> 
> You have function 
> 
>     set1 = link1.FindLinked( 555, T1, T2 )
> 
>     set2 = link2.FindLinked( 555, T1, T2 )
> 
> Now you have 2 sets.
> 
> So you want "WERE A=This AND B=That" then you simple do intresection
> 
>     set3 = set1.intersect( set2 )  // => { 9, 13 }
> 
> Works ?
> 
Ok I think I get it, BUT HOW do I get anything out if the returned BitSet???
I can only see it have these methods intersection etc. but no way to iterate
the records or read a value?

I have searched the docs over and over but just can't find it but I must be
missing something. Probably due not used to work with this.

Joakim
> 
> --
> Best regards,
> 
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
> 
> Valentina - Joining Worlds of Information http://www.paradigmasoft.com
> 
> [I feel the need: the need for speed]
> 
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> 



More information about the Valentina mailing list