Feature request: Collation settings on connection level

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Jun 19 05:01:36 CDT 2007


On 19/6/07 12:30 PM, "Bart Pietercil" <bart.pietercil at gmail.com> wrote:

Hi Bart,

> Table Structure is like this
> 
> T1 Languages(fld_Lang)
> T2 Modules(fld_mod_id, some other fields with non-language related
> info (numbers,ids,...))
> 
> T3 Modules_Translated
> (id,fk_modid,fk_language_id,title,description,......)
> 
> 
> Now the german speaking person logs in and retrieves  a module AND
> the appropriate (in german language id) Modules_Translated.
> Same for the french guy (retrieves the french records)
> 
> now I need the Modules Translated german result set order collation
> 'german', and the Modules_Translated french result set collated french.
> 
> 
> Even in a less complicated setting where user first and lastnames are
> stored, the french guy when retrieving this records expect them to be
> ordered 'the french way' and a german wants the 'german' way (don't
> get me started on 'the greek way' :-))
> 
> 
> now for this last example I think your suggestion works
> TIP:
>      you can make virtual field (Table Method) and specify
>      for it other location, then its index will be DIFFERENT.
>      Payment for this -- overhead to maintain this index.
> 
> I don't really see how I can specify for a field a collation but will
> look into it
> 
> 
> I understand your problem, but I am sure I worked with databases
> (don't remember which one) that permitted me to define indexes for a
> given collation and let me specify what index to use when doing a sort.

No problems here for Valentina also.

You make Table Method,

    fld2 = tbl.CreateVarCharField( "fld2", 2044, fIndexed, "fld1" )

"fld1" - is FORMULA, i.e. Value of fld2 virtual field will be
            the same as fld1.

And now you say:

    fld2.CollationAttribute( ... )

This 2 steps effectively just create on disk ONE MORE index,
Which now will work by this new collation.

And now you CAN CHOOSE what index to use in what query.
In fact you do this via name of field

    ORDER BY fld1   -- German

    ORDER BY fld2   -- French



-- 
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]




More information about the Valentina mailing list