[SqueakDBX] Character encoding and pooling in SqueakDBX and Glorp

Mariano Martinez Peck marianopeck at gmail.com
Sat Sep 25 18:31:29 UTC 2010


Ok....finally today I had some time and I integrate all changes and updated
the Metacello configurations.  I would really appreaciate if you could take
a look and let me know if you find it good also. I run the tests with and
without encoding and seems to work.

I didn't integrate testUTF8IsDetected since it depends in mocks...if you
then come up with a new version just let me know.

To install SqueakDBX only:

Gofer new
    squeaksource: 'MetacelloRepository';
    package: 'ConfigurationOfSqueakDBX';
    load.

and then   (ConfigurationOfSqueakDBX project version: '1.3') load.

And for GlorpDBX+SqueakDBX:

Gofer new
    squeaksource: 'MetacelloRepository';
    package: 'ConfigurationOfGlorpDBX';
    load.

and then   (ConfigurationOfGlorpDBX project version: '1.3') load.

Thanks

Mariano


On Sat, Sep 11, 2010 at 5:49 PM, Mariano Martinez Peck <
marianopeck at gmail.com> wrote:

> Thanks Panu. I am looking at the code right now. I will give you my
> feedback. Thanks a lot :)
>
> Two little questions...
>
> 1) If I DON'T want encoding, it says I don't need to do anything. It just
> doesn't encode because of the
>
>
>     ^ encoder isNil ifTrue:[aString] ifFalse:[ encoder
> convertToSystemString: aString].
>
> or the
>
>
>     ^ encoder isNil ifTrue:[aByteArray ] ifFalse: [encoder
> convertFromSystemString: aByteArray].
>
> I am right ?   then....if we do that check with the nil...I don't need to
> set the Null encoder, isn't it ?
>
> 2)  To set a particular encoding for SqueakDBX the way to do this is
> something like this:
>
>     connectionSettings := DBXConnectionSettings
>             host: '127.0.0.1'
>             port: '5432'
>             database: 'sodbxtest'
>             userName: 'sodbxtest'
>             userPassword: 'sodbxtest'
>             encodingStrategy: PSAutomaticEncoding new.  "or any other
> encoder"
>
>     conn := DBXConnection platform: DBXPostgresPlatform new settings:
> connectionSettings.
>  ......
>
> is this correct?
>
> And for Glorp it is something like:
>
>     login := Login new
>         database: PostgreSQLPlatform new;
>         username: 'sodbxtest';
>         password: 'sodbxtest';
>         connectString: '127.0.0.1_sodbxtest';
>         encodingStrategy: PSAutomaticEncoding new.
>
> is this correct ?
>
>
> 3) How did you run both, SqueakDBX and GlorpDBX tests?
>
> To squeakDBX did you modify DBXPostgreFacility >> createConnection    and
> set there the encoder?
>
> And for Glorp you changed DBXGlorpMainBackendTestPostgresql >>
> glorpBackendFacility   ?
>
> BTW....I will be en ESUG next week....will you be there?
>
> Thanks!
>
> mariano
>
>
>
> On Fri, Sep 10, 2010 at 11:17 AM, Panu Suominen <
> panu.j.m.suominen at gmail.com> wrote:
>
>> 2010/9/7 Panu Suominen <panu.j.m.suominen at gmail.com>:
>> > 2010/9/6 Mariano Martinez Peck <marianopeck at gmail.com>:
>> >> Hi Panu. This is really cool. I have did a quick view and seems pretty
>> good.
>> >> I couldn't test it yet but I will do it and let you know. If everything
>> is
>> >> fine, I will commit it.
>> >
>> > The package naming is not very good. And at least psencoding package
>> > does not depend on the packages it should.
>>
>> Ok. I think I got it right this time. encoding-changes.1.cs contains
>> changes that were required to Glorp, SqueakDBX and such. They are done
>> on the version 1.2 of GlorpDBX.
>>
>> EncodingStrategy change set contains couple of classes that can be
>> used to set how encoding should be determined. This change set is not
>> required to make the
>> GlorpDBX and friend work. It is only needed if one wants to control
>> what encoding should be used.
>>
>> --
>> Panu
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20100925/c2653d88/attachment.htm


More information about the SqueakDBX mailing list