Setting Unique

Ed Kleban Ed at Kleban.com
Sun Nov 20 09:27:38 CST 2005




On 11/20/05 8:32 AM, "Ed Kleban" <Ed at kleban.com> wrote:

> 
> On 11/20/05 8:04 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:
> 
>> On 11/20/05 4:00 PM, "Ed Kleban" <Ed at Kleban.com> wrote:
>> 
>>>>> So I can set first the unique and then the indexed flags, and look to
>>>>> catch
>>>>> any error that may be thrown, and then check the value of the unique flag?
>>>>>  
>>>> 
>>>> Yes. 
>>>> 
>>>> Just not remember, what exactly flag will be set OFF by Valentina 2
>>> 
>>> Pardon?  Are you saying that you don't remember whether in Valentina 2 if
>>> the unique flag will be turned off if the data turns out to not be unique?
>>> 
>>> Or did you mean something else?
>> 
>> Can be 2 case-sensitive  here:
>> 
>>     flag fUnique is set OFF
>>     flag fIndexed is set OFF
>> 
>> Not sure how it is implemented.
>> 
>> It needs to check sources and tests
>>   
> 
> Case sensitive?  Sorry, I don't understand.
> But I believe you're saying you're not sure and would have to check the
> source to really know what's going on or how it will behave.
> 
> If you find out some day, I'd be delighted to know.
> 
> Thanks!
> --Ed

Ah, I think I get it.  You're saying you're not sure whether when the
database detects that the field contents is not unique whether it clears the
fUnique flag or cleas the fIndexed flag, or both.   So if I care I should
check them both.   

If that's what you mean, I understand.

No rush on looking it up.  I can code as above if I care, and I likely
wont'.  I'll know in advance with 100% accuracy whether the field contents
I'm providing are indeed unique or not.  I was just curious how Valentina
handled this.   Only thing I really need to know, you've already told me.
Namely that if I disable fIndexed and fUnique before filling the table and
then turn them back on afterwards that:

1) It's faster than filling the table with both these turned on, and

2) It will immediately reindex the data again once these bits are set.

That's all I really need for coding on my end.

Thanks!
--Ed
 




More information about the Valentina mailing list