Genetic string searches Re: VChar vs VText

Ed Kleban Ed at Kleban.com
Wed Nov 30 10:51:11 CST 2005




On 11/30/05 10:22 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

> On 11/30/05 6:04 PM, "Ed Kleban" <Ed at Kleban.com> wrote:
> 
>> Is there currently a way to do a search that uses a multi-bit field such as
>> a short or a long as a Mask with logical operations?  From what I've seen
>> the answer is "no", and the fact that you can have calculated boolean fields
>> doesn't really offer an alternative that's either viable or valuable from my
>> perspective.
> 
> We need add 
> 
>     WHERE fld & mask
> 
> Is this what you ask for ?
> 

What I asked for (and would like to see some day eventually) was:

>> VField.FindMasked(
>>     inMask as Integer, inKeep as Integer, inSelection as VSet )
>>     as VBitSet
>> 
>> VField.FindMaskedAsArraySet(
>>     inMask as Integer, inKeep as Integer, inSelection as VSet  )
>>     as VArraySet
>> 
>> VField.FindFirstMasked(
>>     inMask as Integer, inKeep as Integer, inSelection as VSet )
>>      as Integer // Returns RecID
>> 
>> High-order bits of the inMask argument would be truncated to the size of the
>> VField.  The inKeep argument would be one of:
>> 
>> EVKeep.includeExactMatches
>> EVKeep.excludeExactMatches
>> EVKeep.includePartialMatches
>> EVKeep.excludePartialMatches

But if we can do this much sooner in SQL, that's great.

Perhaps this translates to:

WHERE "(fld & mask) = mask"         // EVKeep.includeExactMatches
WHERE "(fld & mask) <> 0"           // EVKeep.includePartialMatches
WHERE "not ((fld & mask) = mask"    // EVKeep.excludeExactMatches
WHERE "not ((fld & mask) <> 0)"     // EVKeep.excludePartialMatches

I would also request that if they are some magic symbols like "|", "^", "-",
and "~" for OR, XOR, DIFFERENCE, and [1's complement negate] that are also
already in the kernel and can be enabled along with "&" for AND that it
would be great to have those as well....

But I'll happily take what I can get and be a very happy camper if I can use
"&" in the manner noted above.







More information about the Valentina mailing list