google-cloud-datastore

Is it possible to start two dev_appserver.py connecting to the same google cloud datastore emulator?

余生长醉 提交于 2019-11-27 16:21:04
Use case: I am developing an appengine standard application in python, and another one in go. I'd like to have the entities from both the applications in the same datastore. Is that possible? When I start the first dev_appserver.py with the flag --support_datastore_emulator=true , and with a specific --datastore_path , the gcloud beta emulators datastore env-init command fails with a ERROR: (gcloud.beta.emulators.datastore.env-init) Unable to find env.yaml in the data_dir [~/.config/gcloud/emulators/datastore]. Please ensure you have started the appropriate emulator. Yes, it is possible, but

Google App Engine error: NeedIndexError: no matching index found

那年仲夏 提交于 2019-11-27 15:52:43
问题 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

How to make case insensitive filter queries with Google App Engine?

懵懂的女人 提交于 2019-11-27 15:30:43
I am working on a GAE Django Project where I have to implementing the search functionality, I have written a query and it fetches the data according to the search keyword. portfolio = Portfolio.all().filter('full_name >=',key).filter('full_name <',unicode(key) + u'\ufffd') The issue with this query is, that it is case sensitive. Is there any way through which I can make it to work, without depending upon the case of the keyword? Please suggest. Thanks in advance. You need to store normalized versions of your data at write time, then use the same normalization to search. Store the data either

App Engine datastore does not support operator OR

牧云@^-^@ 提交于 2019-11-27 15:21:39
I am trying to query the google datastore for something like (with pm --> persistanceManager): String filters = "( field == 'value' || field == 'anotherValue' )"; Query query = pm.newQuery(myType.class, filters); When I execute - I am getting back: App Engine datastore does not support operator OR . What's the best approach in people experience for this kind of queries? Any help appreciated! Perform multiple queries. The Datastore, like all other databases, isn't able to efficiently execute disjunctions. Unlike other databases, it exposes this difficulty to the user, to make it clear that what

GWT with JDO problem

回眸只為那壹抹淺笑 提交于 2019-11-27 14:11:09
问题 I just start playing with GWT I'm having a really hard time to make GWT + JAVA + JDO + Google AppEngine working with DataStore. I was trying to follow different tutorial but had no luck. For example I wend to these tutorials: TUT1 TUT2 I was not able to figure out how and what i need to do in order to make this work. Please look at my simple code and tell me what do i need to do so i can persist it to the datastore: 1. ADDRESS ENTITY package com.example.rpccalls.client; import java.io

How to create local copy of GAE datastore?

跟風遠走 提交于 2019-11-27 11:47:38
问题 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. 回答1: 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

How do I define a unique property for a Model in Google App Engine?

人走茶凉 提交于 2019-11-27 11:02:55
I need some properties to be unique. How can I achieve this? Is there something like unique=True ? I'm using Google App Engine for Python. There's no built-in constraint for making sure a value is unique. You can do this however: query = MyModel.all(keys_only=True).filter('unique_property', value_to_be_used) entity = query.get() if entity: raise Exception('unique_property must have a unique value!') I use keys_only=True because it'll improve the performance slightly by not fetching the data for the entity. A more efficient method would be to use a separate model with no fields whose key name

Store Photos in Blobstore or as Blobs in Datastore - Which is better/more efficient /cheaper?

巧了我就是萌 提交于 2019-11-27 10:45:22
I have an app where each DataStore Entity of a specific kind can have a number of photos associated with it. (Imagine a car sales website - one Car has multiple photos) Originally since all the data is being sourced from another site, I was limited to having to store the photos as DataStore Blobs, but now that its possible to write BlobStore items programatically, I'm wondering if I should change my design and store the photos as BlobStore items? So, the question is: Is it 'better' to store the photos in the Blobstore, or as Blobs in the Datastore? Both are possible solutions, but which would

Can I access Datastore entities of my other Google App Engine Applications

☆樱花仙子☆ 提交于 2019-11-27 09:16:39
As we know, in Google App engine, for each registered email account, we are allowed to make 10 applications. Now, I need to share entities among the applications. Is this possible? If yes, how is it implemented? Marvin Pinto No, this cannot be done. However, as Nick Johnson points out, you can use remote_api to do what you need. Are you sure you really need to do this? Don't forget, you can have multiple versions of an application running against the same datastore. Only 1 version of the app is your "default" and gets your non appspot.com domain name, but you can have completely different

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

我们两清 提交于 2019-11-27 09:00:18
问题 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