On Tue, Jun 19, 2012 at 1:33 PM, Anthony <abasta...@gmail.com> wrote:
> I'm not sure it's feasible or desirable for the DAL to try to normalize
> every last behavior across all database backends. What exactly would you
> have the DAL do differently in this case?

Actually what I'm looking for is in the documentation, not the code,
so I don't know yet if there is anything I want the DAL to do
differently.


> web2py is just using the Python standard library sqlite3 module. According
> to the docs, it looks like it does not default to autocommit mode.

"It looks like" is my problem here! :-)

I'm looking for The Book to tell me what to expect.
If it doesn't tell me, then I don't know if the current behaviour
(once I discover it) will be carried forward to future versions of
Web2py as part of the backwards compatibility promise, or, if the
current behaviour is just a quirk of the current implementation that
might change and which could bite me if I  rely on it.

Can I count on the DAL setting or not setting autocommit mode? How do
I have any way of knowing if changing that "behind the DAL's back"
would break anything or not. Does the DAL even care?

Since the DAL is trying to abstract away details about particular DB
engines so that Web2py users can write code that "doesn't care", it
also needs to say (for each DB Engine) what assumptions it is
making... that is, what matters to it and what doesn't. It's perfectly
fine to say, for each DB Engine, what configurations/settings/etc.
that Web2py 'cares about' and which it doesn't.


> At some point, it might be worth doing some testing to see if you get the
> behavior you want. If you do db.commit() as in the example, I suspect it
> will be fine (assuming traffic levels aren't too high).

Indeed, I'll have to do that anyways.

Thanks,
    --Doug

Reply via email to