Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does the web2py database abstraction layer support datastore transactions and query cursors? Or what datastore features it doesn't support?

(apparently the documentation doesn't mention any datastore feature it doesn't support but the last time I checked it did not support at least transactions)



I don't know, I haven't had to do transactions. Another advantage of the web2py DAL is that it doesn't have any dependencies. It's just a single file which could be used by any other web framework to decouple from BigTable and enhance portability. An Argentinian developer shows how easy it is to use the web2py DAL with Bottle:

http://martin.tecnodoc.com.ar/default/post/2011/05/25/21_bot...


It should be added to the documentation which datastore features it doesn't support, to warn users and avoid that the GAE support is misinterpreted as bad advertisement.


You can use the GAE datastore transaction with the web2py DAL but it does not provide an API with it, you have to use the GAE function for the transaction and than inside you can use DAL syntax. DAL automatically creates one cursor for you per http request. Each request has its own. It does not provide APIs to make your own cursors.


I think you're confusing the general idea of cursors with datastore cursors, which require a query and can't be created "per request", but "per query". See:

http://code.google.com/appengine/docs/java/datastore/queries...


Sorry I misunderstood. Web2py has not API for it but it should be easy to add. If you open a ticket on google code, it will done sooner than later. ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: