Home > Software design >  Update Text property for all entities in Datastore Google App Engine with GQL
Update Text property for all entities in Datastore Google App Engine with GQL

Time:01-12

I need to update all the entities in Datastore that meet certain criteria, but the property I want to modify is Text Type and it already has a JSON value, like this:

Property Name: default_values Type: String Value: {"text1":"", "path1":"", "text2": "", "path2": ""}

And I need to update the Value with something like this:

Value: {"text1":"", "path1":"", "image1":"", "text2": "", "path2": "", "image2": ""}

How can I do the UPDATE in Google Query Language for this case?

CodePudding user response:

Cloud Datastore's GQL does not support update statements. You'll need to read, modify, & write each entity. If you have a lot of entities, you should look into using Cloud Dataflow for processing all the entities.

  •  Tags:  
  • Related