如何删除 Google App Engine 中的所有数据存储? [英] How to delete all datastore in Google App Engine?

查看:27
本文介绍了如何删除 Google App Engine 中的所有数据存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何删除 Google App Engine 中的所有数据存储区?

Does anyone know how to delete all datastore in Google App Engine?

推荐答案

如果您谈论的是实时数据存储,请打开您应用的仪表板(登录 appengine)然后打开数据存储 -->数据查看器,选择要删除的表的所有行并点击删除按钮(您必须为所有表执行此操作).您可以通过 remote_api 以编程方式执行相同操作(但我从未使用过它).

If you're talking about the live datastore, open the dashboard for your app (login on appengine) then datastore --> dataviewer, select all the rows for the table you want to delete and hit the delete button (you'll have to do this for all your tables). You can do the same programmatically through the remote_api (but I never used it).

如果您在谈论 开发数据存储,您只需删除以下文件:"./WEB-INF/appengine-generated/local_db.bin".下次运行开发服务器时会再次为您生成该文件,您将拥有一个清晰的数据库.

If you're talking about the development datastore, you'll just have to delete the following file: "./WEB-INF/appengine-generated/local_db.bin". The file will be generated for you again next time you run the development server and you'll have a clear db.

确保事后清理您的项目.

Make sure to clean your project afterwards.

这是当您开始使用 Google 应用程序引擎时会派上用场的小问题之一.您会发现自己将对象持久化到数据存储中,然后更改持久化实体的 JDO 对象模型,最终得到过时的数据,这将使您的应用程序崩溃.

This is one of the little gotchas that come in handy when you start playing with the Google Application Engine. You'll find yourself persisting objects into the datastore then changing the JDO object model for your persistable entities ending up with obsolete data that'll make your app crash all over the place.

这篇关于如何删除 Google App Engine 中的所有数据存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆