[SqueakDBX] Character encoding and pooling in SqueakDBX and Glorp

Mariano Martinez Peck marianopeck at gmail.com
Tue Aug 24 13:35:40 UTC 2010


On Tue, Aug 24, 2010 at 9:55 AM, Panu Suominen
<panu.j.m.suominen at gmail.com>wrote:

> We have postgresql database using UTF-8 charset and I had problems
> doing queries against the database using umlaut characters.
> It looked like there was no character conversion done to the
> statements going to opendbx api. Or is it that I just did not find it?
>
>
Hi and welcome!

I think there is no conversion in OpenDBX nor in SqueakDBX.
Anyway, I attach Norbert (OpenDBX author). Maybe he can help you with this.


> However I implemented a little fix that encodes strings going and
> coming from OpenDBX and mechanism that queries the
> encoding database uses and attaches this information to the connection.
> Unfortunately the charset query is currently only implemented for
> postgresql (show client_encoding).
> Where should I post these changes? Directly to squeaksource?
>

Yes. So that I can see it. Do you know if it breaks compatibility with other
databases or OS? because SqueakDBX classes like DBXConnection should be
cross-backend.

If you want to can use another new package with your commit.


>
> Also is there a connection pooling facility for SqueakDBX or Glorp?
>
>
Yes, several.

-Check GlorpDBX-ConnectionPool-JohnToohey.4  in SqueakDBX repo.
I am not sure if he could have time to document it...but if he did I can
include it in the website.

-GlorpSeaside is another package but I don't remember were is it.

-Ramon Leon did:
http://onsmalltalk.com/making-a-connection-pool-for-glorp-in-seaside,

- Esteban Lorenzano said
My Pool implementation can be download from here:

http://www.squeaksource.com/Officious (package name: Pool)

it is a very small, very simple (and probably buggy) implementation.
Here are some example of it's use:


       pool :=  (Pool creator: [ self createSession ])
               maxObjects: 10;
               maxRetries: 3;
               waitTimeInMilliseconds: 50;
               yourself.

       session := pool borrow.
       ... your glorp code...
       pool release: session.


Cheers

Mariano



>
> --
> Panu
> _______________________________________________
> SqueakDBX mailing list
> SqueakDBX at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20100824/0fab32f1/attachment.htm


More information about the SqueakDBX mailing list