Can you disable auto_commit so that you have to explicitly declare db.commit() ?

Also, say I have the following

db.table.insert(myfields=...)

and then later in the same request, would a

db.table.select() pull in the newly inserted record, or does the
record need to be committed first?

If I insert data in a long running request, and then another request
comes in that is opened in another thread, does it have access to any
uncommitted data from the other running threads?

-Thadeus





On Sun, Dec 27, 2009 at 3:51 PM, mdipierro <mdipie...@cs.depaul.edu> wrote:
> a request arrives web2py creates a new database connection object
> or pools an existing connection from a connection pool, then it
> creates a cursor object. All db IO in the request is done via the
> cursor object. This is thread-safe in the sense that the cursor is
> only used in one thread. As soon as the request completes, the
> transaction is committed or rolled back and the connection is closed
> or recycled.
>
> You can pass the db object to a thread and use it in another thread
> BUT you must make sure that t

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to