[SqueakDBX] Character encoding and pooling in SqueakDBX and Glorp
Mariano Martinez Peck
marianopeck at gmail.com
Sat Sep 11 16:47:28 UTC 2010
Few more things:
1) PSAutomaticEncoding >> encoderFor: anObject
| encoding |
encoding := anObject queryEncoding.
^TextConverter newForEncoding: encoding.
I think it would be better to be:
PSAutomaticEncoding >> encoderFor: aConnection
| encoding |
encoding := aConnection queryEncoding.
^TextConverter newForEncoding: encoding.
Since object DNU queryEncodying, but DBXConnection.
2) testUTF8IsDetected fails because there is no implementor of
runScenario
3) TO integrate it, I was thnking I can put the classes of
'EncodingStrategy' into a new 'OpenDBX-Core-Encoding'
And the tests in 'OpenDBX-Core-Tests-Encoding'
In addition, I have to rename PSAclassName to DBXAclassName. Do you agree
with this?
cheers
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/20100911/3b45aa03/attachment.htm
More information about the SqueakDBX
mailing list