Hi all. Can anyone tell me why the code below commits rows to the table?
I've read the documentation and I'm not quite sure why it is happening.
# BEGIN CODE SNIPPET
from sqlobject import *
conn = connectionForURI('mysql://user:[EMAIL PROTECTED]/test?debug=1')
class TestTable(SQLObject):
_connection = conn
col1 = StringCol()
col2 = StringCol()
TestTable.createTable(ifNotExists = True)
trans = conn.transaction()
t = TestTable(col1 = 'col1', col2 = 'col2')
trans.rollback()
# END CODE SNIPPET
The console output is below. I expected to see a `BEGIN` or `START
TRANSACTION` somewhere at the beginning of the output, but it is not there.
Is this a bug, or user error :) ?
1/Query : DESCRIBE test_table
2/QueryIns: INSERT INTO test_table (col2, col1) VALUES ('col2', 'col1')
2/QueryOne: SELECT col1, col2 FROM test_table WHERE ((test_table.id) =
(3))
1/ROLLBACK:
Thanks!
jw
--
"Government does not solve problems; it subsidizes them."
Ronald Reagan
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss