google-cloud-datastore

multiple filters vs OR , ndb query

泪湿孤枕 提交于 2019-12-07 15:09:52
问题 What is the difference between these queries: With consequent filters: qry1 = Account.query() # Retrieve all Account entitites qry2 = qry1.filter(Account.userid >= 40) # Filter on userid >= 40 qry3 = qry2.filter(Account.userid < 50) # Filter on userid < 50 as well Using ndb.OR: qry = Article.query(ndb.OR(Account.userid >= 40, Account.userid < 50)) Using ndb.AND: qry = Article.query(ndb.AND(Account.userid >= 40, Account.userid < 50)) 回答1: The first query does an AND. Thus, only the entities

writing then reading entity does not fetch entity from datastore

走远了吗. 提交于 2019-12-07 14:40:53
问题 I am having the following problem. I am now using the low-level google datastore API rather than JDO, that way I should be in a better position to see exactly what is happening in my code. I am writing an entity to the datastore and shortly thereafter reading it from the datastore using Jetty and eclipse. Sometimes the written entity is not being read. This would be a real problem if it were to happen in production code. I am using the 2.0 RC2 API. I have tried this several times, sometimes

Understanding Cost Estimate for Google Cloud Platform MicroServices Architecture Design

若如初见. 提交于 2019-12-07 14:24:24
问题 I'm redesigning a monolith application into a MicroServices architecture and am hoping to use Google Cloud Platform (GCP) to host the entire solution. I'm having a very hard time understanding their costing breakdown, and am concerned that my costs will be uncontrollable after I build it. This is for a personal project but I'm hoping will have many users after I launch so I want to get the underlying architecture right and at the same time have reasonable costs initially when I launch. Here

How to connect a GAE app and a GCE app to the same datastore locally?

筅森魡賤 提交于 2019-12-07 13:00:06
问题 I am running into an issue similar to this one. I have a GAE app and a GCE app that seem to work fine once in the cloud but I am having trouble getting my local environment working so that both of them access the same datastore. I have setup the local datastore as described in the link above except my code looks like this (I had to build it this way in order to get it working in the cloud): print("Connecting to datastore - " + datasetId); // Get credentials form GCE if not local. Credential

How can I programmatically determine which Datastore indexes are in error?

怎甘沉沦 提交于 2019-12-07 12:59:51
问题 When I run update_indexes on Google Datastore I get the message below. It is telling me to determine which indexes are in error by looking at the GUI, then delete these indexes. I have 51 erroneous indexes out of 200, and copying them out of the GUI is not feasible. (Edit: By laboriously removing and adding indexes from the datastore-indexes.xml, we identified the one problematic index.) Good devops procedure demands that we do this sort of thing automatically. How does one determine which

HAS ANCESTOR and HAS DESCENDANT clauses in google cloud datastore

和自甴很熟 提交于 2019-12-07 12:56:11
问题 I'm studying the Google Cloud Datastore GQL grammar - specifically the HAS ANCESTOR and HAS DESCENDANT comparison operators. Giving the following Person entities: Amy Fred, parent = Amy Laura, parent = Amy Paul Agnes ... Would the GQL queries below produce the same output? SELECT * FROM Person WHERE key_name='Fred' HAS ANCESTOR KEY('Person', 'Amy') SELECT * FROM Person WHERE KEY('Person', 'Amy') HAS DESCENDANT key_name='Fred' If so, I don't understand the existence of HAS DESCENDANT clause.

Saving blobs with Google Endpoint

三世轮回 提交于 2019-12-07 11:13:06
问题 I have an app that allows users to save blobs in the blobstore. I have a schema that does so presently, but I am interested in something simpler and less twisted. For context, imagine my app allows users to upload the picture of an animal with a paragraph describing what the animal is doing. Present schema User calls my endpoint api to save the paragraph and name of the animal in entity Animal . Note: The Animal entity actually has 4 fields ( name , paragraph , BlobKey , and blobServingUrl as

Google App Engine Datastore Data Privacy

送分小仙女□ 提交于 2019-12-07 10:29:25
问题 I'm playing around with the Google App Engine and the Datastore. Really amazing stuff going on over there. But I couldn't help and wonder what Google is allowed to do with the data my application is storing in there Datastore. Can someone explain it in simple worlds? Thanks 回答1: Google App Engine is governed by Google's general Privacy Policy. They promise not to share information outside of Google except in certain circumstances (court order, etc.), and they restrict access to only employees

App Engine query in admin datastore viewer returning different results than programmatic query

六月ゝ 毕业季﹏ 提交于 2019-12-07 08:52:26
问题 I'm flummoxed. I noticed today that some data I thought should be present in my production appengine app wasn't showing up. I connected to the app via the remote console and ran the queries manually. Sure enough it looked like I only had 15 of the 101 rows I was expecting to see. Then I went to my admin console at appengine.google.com and fired up the datastore viewer with the following query: SELECT * FROM Assignment where game = KEY('Game', '201212-foo') and player = KEY('Player', 'player

Google Cloud Datastore / Mobile Backend Starter - Permissions failure on update/updateAll calls

微笑、不失礼 提交于 2019-12-07 08:27:00
问题 Using the Mobile Backend Starter (MBS) Android classes (those distributed as a sample project when creating a new project in Google Dev Console and demoed at Google I/O 2013) I'm able to insert new entities to the cloud datastore via calls to CloudBackendMessaging.insertAll or .updateAll. The latter will create entities if none exist so seems functionally identical to insert for new records. The insertion/creation works fine. However when I attempt to update existing entries in the datastore,