I created one table in the Google App Engine. I saved and received data from the Google App Engine. However, I do not know how to delete data from the Google App Engine data store.
An application can delete an object from the data store using an instance of the model or key. The method for deleting an instance of a model instance () removes the corresponding object from the data store. The delete () function receives a key or a list of keys and deletes an entity (or entities) from the data store:
q = db.GqlQuery("SELECT * FROM Message WHERE msg_date < :1", earliest_date) results = q.fetch(10) for result in results: result.delete() # or... q = db.GqlQuery("SELECT __key__ FROM Message WHERE msg_date < :1", earliest_date) results = q.fetch(10) db.delete(results)
Source and further reading:
, :
, .
, python
q = db.GqlQuery("SELECT __key__ FROM Message WHERE create_date < :1", earliest_date) results = q.get() db.delete(results)
Java
pm.deletePersistent(results);
URL- :
http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Deleting_an_Object http://code.google.com/appengine/docs/python/datastore/creatinggettinganddeletingdata.html#Deleting_an_Entity
In java
I assume you have an endpoint:
Somethingendpoint endpoint = CloudEndpointUtils.updateBuilder(endpointBuilder).build();
And then:
endpoint.remove<ModelName>(long ID);
Source: https://habr.com/ru/post/1735776/More articles:Silverlight / WPF. Can I change the tag frequency to CategoryAxis? - chartsHow is the behavior of if- and if if different? expression affects range operator in scalar context? - operator-precedenceDisplay view from another view - ruby | fooobar.comInvoking a delegate question - c #C ++: creating an iterator from bits - c ++Andy Clark "Universal Internet Explorer 6 CSS" vs. Eric Mayer "CSS Reset" - htmlRecommended Web Services Architecture Books / Sites? - design-patternsTransition from class :: DBI to DBIx :: Class - perlsql to select the top 10 records - sqlHow to get interface index from ip addres interface - linuxAll Articles