简体   繁体   English

在不知道祖先的情况下从数据存储表中删除实体

[英]Delete entities from a datastore table without knowing ancestor

Is it possible to delete entities from a datastore table without knowing their ancestor? 是否可以在不知道其祖先的情况下从数据存储表中删除实体? I wish to delete all entities older than a specific date, but there are many different ancestors. 我希望删除所有早于特定日期的实体,但是有许多不同的祖先。

Provided you have indexed them to be queried by date, you can query the entities by date. 如果已按日期对它们进行了索引,则可以按日期查询实体。

The query will return the entities of interest. 查询将返回感兴趣的实体。 You can find out the ancestor of a given entity from its key - the ancestor's key is part of the entity's key. 您可以从其键中找到给定实体的祖先-祖先的键是实体键的一部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有办法使用 Python3 (WITHOUT Dataflow) 从 Datastore 命名空间中删除所有实体? - Is there a way to delete all entities from a Datastore namespace Using Python3 (WITHOUT Dataflow)? GAE和数据存储-使用python过滤和删除实体 - GAE & datastore - filter and delete entities with python 如何在不知道索引的情况下从 numpy 数组中删除对象 - How to delete an object from a numpy array without knowing the index 部分祖先在从AppEngine数据存储区删除之前提取 - partial ancestor fetches before deletion from the AppEngine datastore 通过getattr获取数据存储对象而不知道其类 - Get a datastore object by getattr without knowing its class 根据索引删除,不知道它在哪里 - Delete based on index, without knowing where it is 批量处理数据存储祖先查询 - Batching datastore ancestor-queries GAE数据存储区,如何在没有祖先或已知实体密钥的情况下自动查询和插入? - GAE datastore, how to atomically query and insert without ancestor or known entity key? 如何在不知道其位置的情况下从 2D Numpy 数组中删除元素 - How to delete an element from a 2D Numpy array without knowing its position 如何从Google数据存储中删除所有条目? - How to delete all the entries from google datastore?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM