Changes between Version 17 and Version 18 of NonSqlBackends
- Timestamp:
- Aug 19, 2009, 6:50:44 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NonSqlBackends
v17 v18 13 13 14 14 In some DB systems the primary key is a string. Currently, AutoField assumes that it's always an Integer. 15 16 Implementing an auto-increment field in SimpleDB would be extremely difficult. I would say impossible, actually. The eventual consistency model just doesn't support it. For the persistence layers I have written on top of SimpleDB, I use a UUID (type 4) as the ID of the object. --garnaat 15 17 16 18 = Model = … … 53 55 query.count() will be problematic since a scalable count() method doesn't exist in app engine (does it exist in SimpleDB?). Perhaps this will be alleviated by cursors/bookmarks, but I suspect we'll have to address this some other way. An automatic sharded counter in the manager would allow for an "almost accurate" count in most situations. It would certainly be good enough for the most popular use case, "how many pages of results do I have?" 54 56 57 SimpleDB supports count() directly. --garnaat 58 55 59 The sharded counter can only be used for counting a very specific query, so you'd either have to specify all possible queries upfront or manage the counter manually. --wkornewald