On Monday 20 August 2007 09:41, Ed Leafe wrote:
> On Aug 20, 2007, at 12:22 PM, johnf wrote:
> > In general Postgres uses implied begins.
>
> As does SQLite.
>
> > I have added
> > def beginTransaction(self, cursor):
> > pass
> > to dbPostgres.py but I'm doing more research.
>
> That's more or less what I did with SQLite:
>
> def beginTransaction(self, cursor):
> """ Begin a SQL transaction. Since pysqlite does an implicit
> 'begin' all the time, simply do nothing.
> """
> dabo.dbActivityLog.write("SQL: begin (implicit, nothing done)")
> pass
>
> > questions:
> > self._connection.begin() how is support to work? I mean self.
> > _connection is
> > the python dapi2 connection right? So self._connection does not have
> > a "begin" as defined in the PEP 249?
>
> That is not a mandatory method of a Connection object. It is
> implemented on some dbapi2 adapters, but apparently not in psycopg2.
>
> > Am I right in saying that at the time dabo calls
> > "beginTransaction" that I
> > have a bizobj associated with the call?
>
> Yes, but not by the time it percolates down to the backend layer.
>
> > If so how would I access the calling
> > bizobj in dbPostgres.py? I think I could just add.
> > bizobj.execute("begin")
>
> This is the backend method signature:
>
> dBackend.beginTransaction(self, cursor):
>
> The cursor passed is what you should use. It is the main cursor's
> AuxCursor, so calling its execute() will not disrupt your dataset.
>
> -- Ed Leafe
> -- http://leafe.com
> -- http://dabodev.com
It appears that beginTransaction is being called on the children - is this
correct? I add a parent, and two children.
I get
begin
insert parent
begin (warning you already have a transaction)
insert child
I'm getting some sort of commit but I don't see it in my postgres logs ( could
be the log is not recording.
app.DatabaseActivityLog = "/home/johnf/dbLog" will turn on the Dabo log -
correct?
--
John Fabiani
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]