google-cloud-datastore

How can I have dynamic properties in go on the google app engine datastore

心已入冬 提交于 2019-11-29 02:44:54
I want to do something like the Expando Model that python supports on app engine. Sometimes you don't want to declare your properties ahead of time. A special model subclass, Expando, changes the behavior of its entities so that any attribute assigned (as long as it doesn't start with an underscore) is saved to the Datastore. How can I do this in Go? Note beforehand: There are 2 APIs. The one with import path appengine/datastore uses channels as arguments. The other with import path google.golang.org/appengine/datastore uses slices. Adjust the example below to your case. See this question for

Google App Engine error: NeedIndexError: no matching index found

醉酒当歌 提交于 2019-11-29 01:23:52
I'm having trouble with Google's App engine indexes. When running my app via the GoogleAppEngineLauncher, the app is working fine. When deploying the app, I get the following error: NeedIndexError: no matching index found. The suggested index for this query is: - kind: Bar ancestor: yes properties: - name: rating direction: desc The error is generated after this line of code: bars = bar_query.fetch(10) Before the above line of code, it reads: bar_query = Bar.query(ancestor=guestbook_key(guestbook_name)).order(-Bar.rating) My index.yaml file contains the exact "suggested" index below #

Appengine Search API vs Datastore

荒凉一梦 提交于 2019-11-29 00:45:33
问题 I am trying to decide whether I should use App-engine Search API or Datastore for an App-engine Connected Android Project. The only distinction that the google documentation makes is ... an index search can find no more than 10,000 matching documents. The App Engine Datastore may be more appropriate for applications that need to retrieve very large result sets. Given that I am already very familiar with the Datastore: Will someone please help me, assuming I don't need 10,000 results? Are

Filtering by entity key name in Google App Engine on Python

人盡茶涼 提交于 2019-11-29 00:35:34
问题 On Google App Engine to query the data store with Python, one can use GQL or Entity.all() and then filter it. So for example these are equivalent gql = "SELECT * FROM User WHERE age >= 18" db.GqlQuery(gql) and query = User.all() query.filter("age >=", 18) Now, it's also possible to query things by key name. I know that in GQL you do it like this gql = "SELECT * FROM User WHERE __key__ >= Key('User', 'abc')" db.GqlQuery(gql) But how would you now use filter to do the same? query = User.all()

Secure Google Cloud Functions http trigger with auth

ぐ巨炮叔叔 提交于 2019-11-28 21:06:55
I am trying out Google Cloud Functions today following this guide: https://cloud.google.com/functions/docs/quickstart I created a function with an HTTP trigger, and was able to perform a POST request to trigger a function to write to Datastore. I was wondering if there's a way I can secure this HTTP endpoint? Currently it seems that it will accept a request from anywhere/anyone. When googling around, I see most results talk about securing things with Firebase. However, I am not using the Firebase service here. Would my options be either let it open, and hope no one knows the URL endpoint

Looking for opinions on using Objectify-appengine instead of JDO in GAE-J [closed]

南笙酒味 提交于 2019-11-28 19:14:14
I've been slowly and a bit painfully working my way up the datastore/JDO learning curve in GAE. Recently I've found a framework called Objectify that is supposed to be somewhere between the very-simple Datastore native API and the complex JDO. I've been reading up on it and it does seem attractive. What I want to know is, if anyone has much experience with Objectify... How mature is it? Is there much of a user community? Is it ready for heavy-lifting primetime? Could it be abandoned? There doesn't seem to be much discussion of Objectify here or on the web in general, which makes me nervous

How to create local copy of GAE datastore?

情到浓时终转凉″ 提交于 2019-11-28 18:43:45
I want to make client version of GAE app that store exact data of online version.(myapp.appspot.com) If i can use sdk instead, is any library or tools to sync online and sdk version? I try using bulkloader but i can't load downloaded data to local SDK? Please help. See the docs for details on how to download and upload your entire datastore. Simply bulk download from production, then bulk upload to your local datastore. Bear in mind, however, that the local datastore is not designed to handle large volumes of data - you may run into performance or memory issues. Olivier.Roger As explained in

How would you design an AppEngine datastore for a social site like Twitter?

馋奶兔 提交于 2019-11-28 15:07:03
I'm wondering what would be the best way to design a social application where members make activities and follow other member's activities using Google AppEngine. To be more specific lets assume we have these entities: Users who have friends Activities which represent actions made by users (lets say each has a string message and a ReferenceProperty to its owner user, or it can use parent association via appengine's key) The hard part is following your friend's activities, which means aggregating the latest activities from all your friends. Normally, that would be a join between the Activities

Google Cloud Bigtable vs Google Cloud Datastore

末鹿安然 提交于 2019-11-28 14:58:17
问题 What is the difference between Google Cloud Bigtable and Google Cloud Datastore / App Engine datastore, and what are the main practical advantages/disadvantages? AFAIK Cloud Datastore is build on top of Bigtable. 回答1: Based on experience with Datastore and reading the Bigtable docs, the main differences are: Bigtable was originally designed for HBase compatibility, but now has client libraries in multiple languages. Datastore was originally more geared towards Python/Java/Go web app

How can I upload an thumbnail image (blob) at the same time as an Entity into a datastore in google app engine?

你说的曾经没有我的故事 提交于 2019-11-28 14:45:54
I Just started using google app engine today, and I have fallen in love with endpoints. I made one very easily that will store an object in the datastore that just has a few string values. But I also want a small thumbnail image to go along with that datastore entity. I understand how to upload blobs from android using an HttpServlet. I was thinking of using the id of the datastore entity as the image's name in the blobstore, but I dont know how to connect the two events since I would upload the Entity to the datastore, and then the blob after that request. Does anyone know how I can get an