Closed GoogleCodeExporter closed 9 years ago
there is nothing wrong with feature enhancement requests. generally, it's best
to split them up (at least into related functionality).
a few comments:
1. i don't understand what you mean by this feature? unique based on what
criteria?
2,3. technically, these aren't really RESTful. that said, i could certainly
see them being useful. i think you could achieve both using a "delete by
query" functionality (2 is just a query with "fin_key=<list of keys>".
Original comment by jahlborn@gmail.com
on 30 Sep 2011 at 12:53
Thanks,
Your right about two and three.
I currently run a query and get the keys I want to delete, then post a DELETE
through each key in a jquery loop. The issues comes if the long list of keys
requires paging (offset) to manage in browser, and also repeating DELETE a
hundred times in separate calls leads to browser timeouts. e.g. "DELETE
"/MyModel/<key"
what would be nice is a simple query, feq_example=entities&DELETE=yes
eg. the backend python returns the keys from query, and does a bulk python
delete (noting the max entities limits for each bulk Python/Datastore request)
or at least a ?delete=<list of keys>, rather than just the available "DELETE
"/MyModel/<key"
For Number 1, I simply meant returning a list of unique values. Since entity
referencing not supported yet, I have the duplicate field in each row. I
currently run the query, and use Javascript to sort and unique what is returned
from the following (to build a menu). e.g.
/rest/Table?include_props=period,ordering=period
Your right though, it is not RESTful, rather just something I wanted to avoid
in the browser if I could.
Dont worry about 1 too much then, but ?delete=<list of keys> would be useful
for bulk deletes, or at least the DELETE method supporting JSON list like bulk
add/updates
Original comment by jayb...@gmail.com
on 7 Oct 2011 at 4:01
so, i've basically implemented 2,3 with delete by query. if implemented like
GET, the base url (no query parameters) means "get all". i'm a little wary of
supporting "delete all", though, seems too easy to shoot yourself in the foot.
Original comment by jahlborn@gmail.com
on 18 Nov 2011 at 3:15
i'm going to implement 2,3 as a general DELETE by query. i'm a little
concerned by the potential danger of this functionality, so there will be 2 new
Dispatcher options: 'enable_delete_query' and 'enable_delete_all' (both
disabled by default).
1. if 'enable_delete_query' is set to True on the Dispatcher, then the rest
server will support query based deletes, e.g.: "DELETE
/rest/Foo?fin_key=<key1>,<key2>" or "DELETE /rest/Foo?feq_author=bob", etc.
2. if 'enable_delete_query' +and+ 'enable_delete_all' are set to True on the
Dispatcher, then the rest server will support "delete all", e.g.: "DELETE
/rest/Foo"
Original comment by jahlborn@gmail.com
on 19 Nov 2011 at 6:08
2,3 are fixed in the trunk and will be in the 1.0.6 release.
if you would like to pursue feature 1, please submit a new feature request with
more details on the functionality you are looking for.
Original comment by jahlborn@gmail.com
on 19 Nov 2011 at 6:16
Original comment by jahlborn@gmail.com
on 6 Jun 2012 at 1:07
Original issue reported on code.google.com by
jayb...@gmail.com
on 30 Sep 2011 at 4:27