Guillermo Polito wrote:
AFAIR, PharoDatabaseAccessor was meant to work with SqueakDBX/DBXTalk
driver. No other driver should use it. At the time Garage did not even
exist.

So I'd say that you should not use PharoDatabaseAccessor with another
driver than the one it was originally mean to? I do not know exactly
your setup, I was not following this thread.

Really I cannot tell much more. This was really long time ago.

Great to know!

I am not using it consciously, though. System somehow selects it and uses it in the background (I just do MyDescriptorSystem sessionForLogin: myLoginObject; and before that I set GarageGlorpDrive to be the default).

This seems to be the actual fix (make Glorp with Garage not use PharoDatabaseAccessor).

Herby


On Sun, Aug 6, 2017 at 12:20 AM, Herby Vojčík <he...@mailbox.sk
<mailto:he...@mailbox.sk>> wrote:

    Esteban A. Maringolo wrote:

        Herby,

        I regularly use `session login`, but I don't use SQLite in
        Pharo, but I
        do in VisualWorks and it works just fine.
        Maybe if there is a bug we should fix it. Even with a no-op method.

        Regards!

        Esteban A. Maringolo


    It's hard. The problem is

    PharoDatabaseAccessor >> encoding
              ^self connection queryEncoding

    which overrides parent, which is atm:

    encoding
    "The connection is specific to the dialect;  some dialects will need
    to override this method."

             ^connection encoding

    The former was added at GuillermoPolito.73 back in 2011 (and the
    latter was the same back then). It probably fixed something, but I
    don't see any implementors of queryEncoding atm (definitely not in
    Garage). From the diff it is clear lots of databases and drivers
    have gone. Now, why was it change for Pharo (and does it need to be
    changed in 2017)?

    Ccing Guillermo Polito.

    Herby

    P.S.: I wonder how it is that no one actually had problem with this?
    This predictably fails on `session login` on pharo, unless
    queryEncoding is somehow magically present without seeing it in
    source code for other platforms?


        2017-08-05 15:52 GMT-03:00 Herby Vojčík <he...@mailbox.sk
        <mailto:he...@mailbox.sk>
        <mailto:he...@mailbox.sk <mailto:he...@mailbox.sk>>>:

             Alistair Grant wrote:

                 Hi Herby,

                 On 5 August 2017 at 18:09, Herby
        Vojčík<he...@mailbox.sk <mailto:he...@mailbox.sk>
        <mailto:he...@mailbox.sk <mailto:he...@mailbox.sk>>>  wrote:

                     Hello!

                     First of all, what is preferred way to (first time)
        login
                     into database? I
                     had the impression that `aDatabaseAccessor login`
        is sorta
                     low-level, and
                     one should do `session login` (after all, it is
        session you
                     get to work
                     with, not an accessor).

                     But with Garage SQLite, `session login`, when
        accessor is
                     not logged, always
                     fails with "MessageNotUnderstood:
                     GASqlite3Driver>>queryEncoding".

                     Should one not use `session login` at all, then (when
                     accessor is logged, it
                     just does nothing, if it isn't, it connects the
        accessor,
                     but tries to do
                     some additional work which always fails)?

                     Herby


                   From memory this is caused by differences between
        VisualWorks
                 and Pharo.

                 Anyway, it is discussed and resolved in:

        http://forum.world.st/Glorp-SQLite3-issue-td4899792.html
        <http://forum.world.st/Glorp-SQLite3-issue-td4899792.html>
        <http://forum.world.st/Glorp-SQLite3-issue-td4899792.html
        <http://forum.world.st/Glorp-SQLite3-issue-td4899792.html>>


             Doesn't look like solved to me. Anyway, at least I know it
        is known
             for year and no-one seemed to see it as a bug.

             I think it is one (you cannot just send queryEncoding where
        no class
             implements it and be fine, imo).

             So what is the state of `session login`? Is it meant to be
        used, or
             everyone just took a step down to low-level and uses `accessor
             login` instead? :-(


                 Cheers,
                 Alistair


             Thanks, Herby






--

        

Guille Polito


Research Engineer

French National Center for Scientific Research - _http://www.cnrs.fr_



*Web:* _http://guillep.github.io_

*Phone: *+33 06 52 70 66 13



Reply via email to