Few more things:<br><br>1) PSAutomaticEncoding >> encoderFor: anObject <br> | encoding |<br> encoding := anObject queryEncoding.<br> ^TextConverter newForEncoding: encoding.<br><br><br>I think it would be better to be:<br>
<br> PSAutomaticEncoding >> encoderFor: aConnection<br> | encoding |<br>
encoding := aConnection queryEncoding.<br> ^TextConverter
newForEncoding: encoding.<br><br>Since object DNU queryEncodying, but DBXConnection.<br><br><br>2) testUTF8IsDetected fails because there is no implementor of runScenario<br><br>3) TO integrate it, I was thnking I can put the classes of 'EncodingStrategy' into a new 'OpenDBX-Core-Encoding'<br>
And the tests in 'OpenDBX-Core-Tests-Encoding'<br><br>In addition, I have to rename PSAclassName to DBXAclassName. Do you agree with this?<br><br>cheers<br><br>mariano<br><br><div class="gmail_quote">On Sat, Sep 11, 2010 at 5:49 PM, Mariano Martinez Peck <span dir="ltr"><<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thanks Panu. I am looking at the code right now. I will give you my feedback. Thanks a lot :)<br>
<br>Two little questions...<br><br>1) If I DON'T want encoding, it says I don't need to do anything. It just doesn't encode because of the <br>
<br><br> ^ encoder isNil ifTrue:[aString] ifFalse:[ encoder convertToSystemString: aString].<br><br>or the<br><br><br> ^ encoder isNil ifTrue:[aByteArray ] ifFalse: [encoder convertFromSystemString: aByteArray].<br>
<br>I am right ? then....if we do that check with the nil...I don't need to set the Null encoder, isn't it ?<br><br>2) To set a particular encoding for SqueakDBX the way to do this is something like this:<br><br>
connectionSettings := DBXConnectionSettings<br> host: '127.0.0.1'<br> port: '5432'<br> database: 'sodbxtest'<br> userName: 'sodbxtest'<br> userPassword: 'sodbxtest'<br>
encodingStrategy: PSAutomaticEncoding new. "or any other encoder"<br><br> conn := DBXConnection platform: DBXPostgresPlatform new settings: connectionSettings.<br> ......<br><br>is this correct?<br>
<br>And for Glorp it is something like:<br><br> login := Login new<br> database: PostgreSQLPlatform new;<br> username: 'sodbxtest';<br> password: 'sodbxtest';<br> connectString: '127.0.0.1_sodbxtest';<br>
encodingStrategy: PSAutomaticEncoding new.<br><br>is this correct ?<br><br><br>3) How did you run both, SqueakDBX and GlorpDBX tests?<br><br>To squeakDBX did you modify DBXPostgreFacility >> createConnection and set there the encoder?<br>
<br>And for Glorp you changed DBXGlorpMainBackendTestPostgresql >> glorpBackendFacility ?<br><br>BTW....I will be en ESUG next week....will you be there?<br><br>Thanks!<br><font color="#888888"><br>mariano</font><div>
<div></div><div class="h5"><br><br><br><div class="gmail_quote">
On Fri, Sep 10, 2010 at 11:17 AM, Panu Suominen <span dir="ltr"><<a href="mailto:panu.j.m.suominen@gmail.com" target="_blank">panu.j.m.suominen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
2010/9/7 Panu Suominen <<a href="mailto:panu.j.m.suominen@gmail.com" target="_blank">panu.j.m.suominen@gmail.com</a>>:<br>
<div>> 2010/9/6 Mariano Martinez Peck <<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>>:<br>
>> Hi Panu. This is really cool. I have did a quick view and seems pretty good.<br>
>> I couldn't test it yet but I will do it and let you know. If everything is<br>
>> fine, I will commit it.<br>
><br>
> The package naming is not very good. And at least psencoding package<br>
> does not depend on the packages it should.<br>
<br>
</div>Ok. I think I got it right this time. encoding-changes.1.cs contains<br>
changes that were required to Glorp, SqueakDBX and such. They are done<br>
on the version 1.2 of GlorpDBX.<br>
<br>
EncodingStrategy change set contains couple of classes that can be<br>
used to set how encoding should be determined. This change set is not<br>
required to make the<br>
GlorpDBX and friend work. It is only needed if one wants to control<br>
what encoding should be used.<br>
<br>
--<br>
<font color="#888888">Panu<br>
</font></blockquote></div><br>
</div></div></blockquote></div><br>