FindValueAsArraySet ordering
Ed Kleban
Ed at Kleban.com
Fri Dec 16 08:14:20 CST 2005
On 12/16/05 2:50 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:
> On 12/16/05 6:10 AM, "Ed Kleban" <Ed at Kleban.com> wrote:
>
>> Hi Ruslan,
>>
>> I know we've talked about FindLinked, but I don't recall if I've asked about
>> FindValueAsArraySet with an inSet argument. If so I can't find the answer
>> in my email history.
>>
>>
>> If I call FindValueAsArraySet with an inSet argument, what is the order of
>> the elements in the result?
>>
>> Examples seem to work best for us in these discussions:
>>
>> matchValue = 69
>> checkSet = VArraySet with: { 5, 1, 4, 3 }
>> someField has values:
>>
>> Rid someField
>> 1 69
>> 2 69
>> 3 69
>> 4 69
>> 5 21
>>
>> resultVArraySet = someField.FindValueAsArraySet( matchValue, checkSet )
>>
>>
>> Does resultVArraySet = { 1, 4, 3 }
>>
>> or
>>
>> Does resultVArraySet = { 1, 3, 4 }
>
> You know, problems...
>
> As I see FindValueAsArraySet() expect to see CheckSet to be only BitSet.
No! I did not know this!!!!
I know that I discovered, and we agreed, that FindLinked accepts
(inSet as VSet) [and therefore I assumed accepts either a VBitSet or
VArraySet], however it only returns a VBitSet.
But FindValueAsArraySet DOES return a VArraySet, and both every line of
documentation in the Reference manual and the parameters shown by
autocomplete ALL state that the argument it takes is
( inSelection as VSet ).
Are you now telling me that all of these a wrong?
Are you telling me that even though all of these say (inSelection as VSet )
that the API calls check to make sure the VSet argument is actually a
VBitSet and NOT a VArraySet and will in fact fail if the argument is a
VArraySet?
> That was enough for our SQL engine...
> But of course in ideal we should support ArraySet also. This have sense.
> And result will be
> for ArraySet { 1, 4, 3 }
>
> for BitSet { 1 3 4 }
>
> Because algorithm just iterate set forward.
>
Or are you saying that the result will be what you show above eventually but
is different now?
So please confirm Ruslan, are you SURE about this:
> As I see FindValueAsArraySet() expect to see CheckSet to be only BitSet.
More information about the Valentina
mailing list