> Using a composite key like this means a user's events are guaranteed to be > serialized.
Guaranteed to be serialized should be: Fully scalable and serialized as much possible given the limitations of non-ascending ids, and clock skew in the distributed system. Robin On Jan 15, 8:10 am, Robin B <robi...@gmail.com> wrote: > Transactions and list properties are also not supported, until > transactions are officially added to web2py, you can still do > transactions this way: > > from google.appengine.ext import db as google_db > def mytxn(db,id): > record = db(db.table.id==id).select()[0] > record.update_record(count=record.count+1) > return record.count > count = google_db.run_in_transaction(mytxn,arg1,arg2) > > Many of the SQL stuff like lower(), upper() is not supported, in > August GAE added a special field called __key__ that can be used in > queries on GAE, so sorting by id could be added to web2py. However, > ids on GAE are not guaranteed to be ascending, because of sharding, > ids can be assigned out of order. As far as timestamps go, they could > have up to a second or more of skew between machines, so it is best to > use a composite key for ordering (timestamp + user_id + > user_sequential_counter). Using a composite key like this means a > user's events are guaranteed to be serialized. > > Robin > > On Jan 15, 6:23 am, "Markus Gritsch" <m.grit...@gmail.com> wrote: > > > Hi, > > > is there some detailed information available on which DAL subset is > > available on GAE? > > > The web2py book says that "You cannot perform complex queries on the > > datastore, in particular there are no JOIN, OR, LIKE, IN, and > > DATE/DATETIME operators". > > > I used a query with an orderby=~db.person.id which did not work on > > GAE. Although tables do have an id column which can be uses to select > > a row, it cannot be used for orderby. I worked around this by an > > additional datetime column, however, I wonder which other stuff does > > also not work on GAE. > > > Kind regards, > > Markus > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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 -~----------~----~----~----~------~----~------~--~---