Magma collection - where:

Facundo Vozzi facundov79 at gmail.com
Mon Nov 15 13:06:35 UTC 2010


Udo,
yes I understand you. My problem is that my magma collection wasn't empty
when I added the index. So now I need send noteOldKesFor: to each and
set again its name (each name: each name), I think.

CU,
Facu

On Mon, Nov 15, 2010 at 7:04 AM, Udo Schneider <udo.schneider at homeaddress.de
> wrote:

> Facu,
>
> Can't check at the moment. But take a look at
> http://wiki.squeak.org/squeak/2639
>
> IMHO using MagmaSession>>#noteOldKeysFor: (check "Index updating" on the
> webpage) and (if needed) MagmaCollection>>#slowlyDo:commitEvery: (check
> "Batch operations" on the webpage) should do the trick.
>
> CU,
>
> Udo
>
>
>
> On 14.11.10 20:54, Facundo Vozzi wrote:
>
>> Udo,
>> I works perfectly with new customers but It doesn't with old customers
>> that I was added before add the MaSearchStringIndex on #name attribute.
>> Can I rebuild index on MagmaCollection?
>>
>> Thanks you,
>> Facu
>>
>> On Sun, Nov 14, 2010 at 5:49 AM, Udo Schneider
>> <udo.schneider at homeaddress.de <mailto:udo.schneider at homeaddress.de>>
>> wrote:
>>
>>    Facu,
>>
>>
>>        So, my question is: Can I use where: for this funcionality or I
>>        need use
>>        select:? If you think that where: is appropiate, Do I need
>>        create a new
>>        king of index to reach that?
>>
>>    I added the following method in MagmaCollectionReader which should
>>    fullfill your needs:
>>
>>    read: attributeSymbol beginsWith: aKey
>>            ^ self read: attributeSymbol from: aKey upTo: aKey
>>    maAlphabeticalNext
>>
>>    This allows you to write your original select: based call as
>>
>>    self customers where: [:reader | reader read: #name beginsWith:
>>    firstsLetterOfName asUppercase]
>>
>>
>>    CU,
>>
>>    Udo
>>
>>    _______________________________________________
>>    Magma mailing list
>>    Magma at lists.squeakfoundation.org
>>    <mailto:Magma at lists.squeakfoundation.org>
>>
>>    http://lists.squeakfoundation.org/mailman/listinfo/magma
>>
>>
>>
>>
>> _______________________________________________
>> Magma mailing list
>> Magma at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/magma
>>
>
>
> _______________________________________________
> Magma mailing list
> Magma at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/magma/attachments/20101115/626bad77/attachment.htm


More information about the Magma mailing list