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
2 answers

Sort Google App Engine

I wish to get a list of Appointments from GAE under a specific Merchant and sort according the the date time it was made (dateLog): PersistenceManager pm = PMF.get().getPersistenceManager(); String query = "select from " +…
Melvin
  • 105
  • 1
  • 2
  • 8
0
votes
2 answers

App Engine: Filter for Choosing Entities with a Specific Item Present in their ListProperties

I need to filter entities based on one of their ListProperties having a certain element present. So kind of like: entities.filter('listProp IN ',element) except where listProp and element are reversed if you see what I mean. Anyone know how to…
citronic
  • 9,868
  • 14
  • 51
  • 74
0
votes
1 answer

Use variable to get property value

I want be able to get values from my database using a variable, the last line is what I'm trying to achieve. class Data(db.Model): property = db.StringProperty() data = Data(property = 'value') data.put() query = db.GqlQuery("SELECT * FROM…
AshClarke
  • 2,990
  • 5
  • 21
  • 27
0
votes
1 answer

Query/GqlQuery .order() restricting the result set?

I just noticed a strange result from a query that I have trouble understanding. It appears as if adding an order() to a Query is limiting the results I get back. Here is my interaction: >>> SomeModel.all().filter('action =',…
JasonSmith
  • 72,674
  • 22
  • 123
  • 149
0
votes
2 answers

Querying the Google App Engine Datastrore

I am trying to learn how to work with Google App Engine, I'm looking at their datastore example for querying here I have never done SQL, GQL or the like. So can someone please break down this string and explain what each part is doing? # GqlQuery…
EasilyBaffled
  • 3,822
  • 10
  • 50
  • 87
0
votes
3 answers

Unable to get results when passing a string via parameter substitution in gql query

I am able to properly pass a string variable to the gqlquery through parameter substitution, here's the code i've tried to use; user_name = self.request.get('username') #retrieved from UI p = models.UserDetails.all().filter('user_name = ',…
Arun
  • 43
  • 2
  • 10
0
votes
1 answer

module to abstract limitations of GQL

I am after a Python module for Google App Engine that abstracts away limitations of the GQL. Specifically I want to store big files (> 1MB) and retrieve all records for a model (> 1000). I have my own code that handles this at present but would…
hoju
  • 28,392
  • 37
  • 134
  • 178
0
votes
3 answers

GQL Queries - Retrieving specific data from query object

I'm building a database using Google Datastore. Here is my model... class UserInfo(db.Model): name = db.StringProperty(required = True) password = db.StringProperty(required = True) email = db.StringProperty(required = False) ...and below is my…
0
votes
2 answers

How to do UPDATE and DELETE on GAE db using python?

I have a beginner question. I was reading the GAE reference and I only saw "SELECT" operation. I would need the counterparts of SQL's UPDATE and DELETE but all I could figure is this: DELETE: .filter from the table to get to an item then call…
Barney Szabolcs
  • 11,846
  • 12
  • 66
  • 91
0
votes
1 answer

Is there a concat function in GQL?

Is there a concat function in Google Query Language? Given table X FName |LName --------|------ Bob |Smith Larry |Potts Ask query: Select Concat(FName, LName) from X I would like: BobSmith LarryPotts Any ideas on how to achive this?
Connor Albright
  • 723
  • 4
  • 13
  • 29
0
votes
0 answers

Use GQL to delete database that are one week old in google app engine

Wondering if GQL could let me delete datas that are one week or older using gql, been finding work around with this, and it just seems to be a lot of hassel. I have a database in google app engine, table name Tracker, consist of id, and int, the…
0
votes
1 answer

formatting GQL query

I am trying to implement this example in my app: https://developers.google.com/appengine/docs/python/datastore/structuring_for_strong_consistency I keep getting an error that says: BadQueryError: Parse Error: "IS" can only be used when comparing…
user1369195
  • 93
  • 2
  • 4
0
votes
1 answer

How can I find entities which have an empty StringListProperty?

Given this model: class TestModel(db.Model): names = db.StringListProperty(required=False) I want to find entities that have an empty names property, so I tried this: TestModel.all().filter('names ==', []) But it raises the exception:…
Matt Faus
  • 6,321
  • 2
  • 27
  • 43
0
votes
1 answer

Using GQL to get all new results since the previous result

I'm pretty useless when it comes to queries, I'm wondering what's the correct structure for this problem. Clients are sent data including the key of the object, they use the key to tell the server what was the most recent object they downloaded. I…
monkeymad2
  • 153
  • 1
  • 11
0
votes
1 answer

DATE COMPARISON in GOOGLE APP ENGINE DATASTORE / PYTHON

I am trying to fetch records after a certain date. I used the below in code: qstr = "SELECT * FROM Comment where date > '"+str(max_date)+"' order by date desc limit 10" comments = db.GqlQuery(qstr) I have the console log I have qStr as…