Questions tagged [gql]

GQL is a SQL-like language for retrieving entities or keys from Google Cloud Datastore.

GQL is a SQL-like language for retrieving entities or keys from the . While GQL's features are different from those of a query language for a traditional relational database, the GQL syntax is similar to that of SQL.

Resources

537 questions
0
votes
4 answers

App Engine GQL: querying a date range

What would be the App Engine equivalent of this Django statement? return Post.objects.get(created_at__year=bits[0], created_at__month=bits[1], created_at__day=bits[2], …
Jerry Chong
  • 563
  • 2
  • 9
  • 19
0
votes
1 answer

GQL not working when I select a particular field

I have an entity called with columns app, id, params, view, timestamp. When I do a select * in GQL it works fine. Screenshot attached below. However when I try to select only one column I don't see any results. Screenshot attached below. Also…
Sathya
  • 1,076
  • 1
  • 8
  • 17
0
votes
2 answers

How to get the last of each entity in the GAE datastore that starts with 'A', that starts with 'B', etc

I have a GAE datastore with 303 Game() entities. class Game(db.Model): title = db.StringProperty(required = True) slug = db.StringProperty(required = True) category = db.CategoryProperty() description = db.TextProperty(required =…
0
votes
1 answer

Reset count in GQL (Google App Engine)

I'm having a hard time trying to reset my ID/Name column in my google app. Right now it's on 3002, yet there's only 1 other peice of data still in the DB. I'm not even certain how it decided on 300x over like 1,2,3... I'm sure this is a simple…
farina
  • 3,486
  • 6
  • 32
  • 44
0
votes
2 answers

GQL queries (GAE datastore Python): how to retrieve all entities with same tag and all entities containing a substring?

I have a bilingual dictionary database of 60000 pairs stored in GAE that's look like this: date, tag, value date, vis, screw date, vis, screws date, vis à bois, wood screw date, vis à bout pointu, cone point screw date, vis à braser, braze…
user1459604
  • 31
  • 1
  • 1
  • 4
0
votes
1 answer

Google app engine db model static ( class ) variables

In GAP you you create a model, they show it by : class Pet(db.Model): name = db.StringProperty(required=True) type = db.StringProperty(required=True) birthdate = db.DateProperty() weight_in_pounds =…
coredump
  • 3,017
  • 6
  • 35
  • 53
0
votes
1 answer

Google app engine GQL query key

I do not really understand what does the key.from_path() do. If you could explained it a little better and more concise then here. Also, the parent parameter intrigues me .
coredump
  • 3,017
  • 6
  • 35
  • 53
0
votes
1 answer

AttributeError: 'NoneType' object has no attribute 'userName'

reqUser = friends.UserFriends.gql("where udid =:1", str(udid) ).get() reqUserName = reqUser.userName This is my code i want to know how to handle this error, this error comes at line 2
yasir
  • 137
  • 2
  • 14
0
votes
1 answer

Simple data storing / retrieving in GQL on Google AppEngine in Python

I have a problem which probably is a result of me not understanding how GQL works (this is my first day with it). I'm working on Google AppEngine (locally now) using google.appengine.ext.db data storage. I'm simply creating a user with certain ID…
michuk
  • 1,332
  • 1
  • 13
  • 19
0
votes
1 answer

Why use PostalAddress property in Gql?

Possible Duplicate: Why Email, Username, PostalCode, etc as entities in GAE Datastore App Engine Data store has this property "PostalAddress" but what is the purpose of using it? Here it is in the docs:…
user772401
  • 2,754
  • 3
  • 31
  • 50
0
votes
1 answer
0
votes
3 answers

Selecting only the latest post for each url

I have an app on GAE that lets user add\edit posts to any arbitrary path (like a wiki). I am storing all the posts in a single table. The table is structured as follows: class WikiPosts(db.Model): path = db.StringProperty(required = True) …
Nitish Parkar
  • 2,838
  • 1
  • 19
  • 22
0
votes
0 answers

How to insert many entities of different kind at once - App Engine Python

Let's say I get some data from the request: taxi = self.request.get('taxi') address = self.request.get('txtAddress') name = self.request.get('txtName') age = self.request.get('age') Then I insert a 'student' entity: rs_student = Student(name =…
Lucas
  • 1,239
  • 4
  • 15
  • 26
0
votes
2 answers

Simple App Engine Query Invalid

I'm getting an 'Invalid GQL query string' with this seemingly trivial GQL query: SELECT * FROM Event WHERE firstPlayer='glowingEthers' OR secondPlayer='glowingEthers' It works fine when the OR clause is removed, for either property. These…
benjammin
  • 537
  • 5
  • 23
0
votes
2 answers

templating in python with GAE using GQL

I am running python in GAE and am stuck on a few questions related to GQL queries and using templates. When I load the homepage, it triggers this function: class MainPage() def get(self): product_list = Post.gql("ORDER BY product…
Nic Meiring
  • 882
  • 5
  • 16
  • 33