gae-datastore

Google App Engine - Cannot See Children in Datastore Viewer

I have the following kinds/relationships in my datastore: UserAccount 1-to-1 PersistentLogin 1-to-many PersistentLogins They are all in the same entity group and UserAccount is the parent. Should I expect to see the other kinds in the datastore viewer? Currently, I only see UserAccount entities, but I'm pretty confident the other enti...

Filtering records in app-engine (Java)

I have following code running perfectly. It filter records based on single parameter. public List GetOrders(String email) { PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = pm.newQuery(Orders.class); query.setFilter("Email == pEmail"); query.setOrdering("Id desc"); query.declareParame...

How to delete specific record from Google Datastore (in Java) ?

I have some records in datastore, I want to delete a specific record from the table. for example in SQL , we use delete * from table1 where name ="mike" what is the equivalent code in java (I m using Eclipse with Google appengine API plugin)? or any other method to do that? ...

Google App Engine - low-level datastore API flag?

In my GAE-Java app, I'm using the low-level datastore API. Hence I don't need the GAE app instance to load any of the higher level data access libraries such as JPA, JDO, Data Nucleus, etc. Is there a flag that I can set to indicate that I don't want these libraries to be loaded? My motivation to do this is to reduce app instance start...

bulk update/delete entities of different kind in db.run_in_transaction

Here goes pseudo code of bulk update/delete entities of different kind in single transaction. Note that Album and Song entities have AlbumGroup as root entity. (i.e. has same parent entity) class Album: pass class Song: album = db.ReferenceProperty(reference_class=Album,collection_name="songs") def bulk_update_album_group(album): ...

google app engine db.Model in python only display user-defined fields

I'm a python newbie so I apologize in advance if this question has been asked before. I am building out an application in GAE and need to generate a report that contains the values for a user-defined subset of fields. For example, in my db model, CrashReport, I have the following fields: entry_type entry_date instance_id build_id cra...

Google App Engine datastore encoding?

I'm using the GAE datastore for a Java application, and storing some text that will be in numerous languages. In my servlet, I'm first checking to see if there's any data in the data store, and, if not, I'm creating some, similar to the following: ArrayList<Lang> list = new ArrayList<Lang>(); list.add(new Lang("EN", "English", 1)); lis...

Datastore query outputting for Django form instance

Hello! I'm using google appengine and Django. I'm using de djangoforms module and wanted to specify the form instance with the information that comes from the query below. userquery = db.GqlQuery("SELECT * FROM User WHERE googleaccount = :1", users.get_current_user()) form = forms.AccountForm(data=request.POST or None,instance...

Querying the Datastore in python

Greetings! I am trying to work with a single column in the datatstore, I can view and display the contents, like this: q = test.all() q.filter("adjclose =", "adjclose") q = db.GqlQuery("SELECT * FROM test") results = q.fetch(5) for p in results: p1 = p.adjclose print "The value is --> %f" % (p.adjclose) however i need ...

Google App Engine - "java.lang.IllegalArgumentException: datastore transaction or write too big."

When calling DatastoreService.delete(keys) with 400 keys, I'm get this exception: java.lang.IllegalArgumentException: datastore transaction or write too big. I thought the limit on batch deletes was 500 so I am well under the limit. Am I missing something here? Thanks, Keyur ...

Duplicate an AppEngine Query object to create variations of a filter without affecting the base query

In my AppEngine project I have a need to use a certain filter as a base then apply various different extra filters to the end, retrieving the different result sets separately. e.g.: base_query = MyModel.all().filter('mainfilter', 123) Then I need to use the results of various sub queries separately: subquery1 = basequery.filter('sub...

Bulk get of child entities on Google app engine?

On Google App Engine in Python, I have a Visit entity that has a parent of Patient. A Patient may have multiple visits. I need to set the most_recent_visit (and some auxiliary visit data) somewhere for later querying, probably in another child entity that Brett Slatkin might call a "relationship index entity." I wish to do so in a bul...

Show users a list of unique items on Java Google App Engine

I've been going round in circles with what must be a very simple challenge but I want to do it the most efficient way from the start. So, I've watched Brett Slatkin's Google IO videos (2008 & 2009) about building scalable apps including http://www.youtube.com/watch?v=AgaL6NGpkB8 and read the docs but as a n00b, I'm still not sure. I'm t...

Do Blob properties on entities affect query performance?

Hello I'm trying to make my mind on whether to store a binary representation of an entity as its Blob property, or whether I better keep the blobs in some separate 'wrapping' class. Possible impact on memory heap and/or a query execution time are my concerns in the first case, complexity votes against the other one. I know Blobs are no...

Export/Import datastore from/to google app engine

Hej, I want to export the datastore that i have running in app engine into my local "standalone" version of the application. Anyone know how i can do that? I've been looking arround in the app engine dashboard but can't find it. ...

app engine's back referencing is too slow. How can I make it faster?

Google app engine has smart feature named back references and I usually iterate them where the traditional SQL's computed column need to be used. Just imagine that need to accumulate specific force's total hp. class Force(db.Model): hp = db.IntegerProperty() class UnitGroup(db.Model): force = db.ReferenceProperty(reference_class=Fo...

Generating unique number sequence for use as entity key for app engine datastore

Has anyone got any example code for creating a unique number sequence to be used as keys for an entity in a Google app engine datastore? Would like to use sequential order numbers as the key. ...

Emulating a "OR" condition in Datastore.

Hello again, I'm using the Google App Engine with Python (Django). How to emulate "SELECT * FROM bla WHERE touser = common.userstats("key") OR fromuser = common.userstats("key") ORDER BY date ASC"? I was thinking of something like this, but I can't get it in the order I want. recievedlist = models.P1.all() recievedlist.filter(...

App Engine Datastore access

Is it possible to query App Engine's Datastore from outside the cloud, i.e. a client application? I could possibly write an app to be housed within AppStore and query the Datastore returning XML-formatted data; I want to know, however, if there are any Datastore endpoints which would allow me to do it directly. Also, in case it is poss...

Loading child entities with JPA on Google App Engine

I am not able to get child entities to load once they are persisted on Google App Engine. I am certain that they are saving because I can see them in the datastore. For example if I have the following two entities. public class Parent implements Serializable{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Extension...