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

Google App Engine: Storing images in database (Python)

I'm creating an ecommerce platform on Google App Engine using Python. For that, I need to store the details of the products I will be offering in a separate entity, which will also include an image of every individual product. Now, how do I store…
Manas Chaturvedi
  • 5,210
  • 18
  • 52
  • 104
0
votes
1 answer

Querying on datetimes in google app engine

I am not able to query on datetime fields in google app engine. I am trying to run the following query - SELECT * FROM Email WHERE cmp_id='52d836ed1057c341b800013a' AND pushed_to_crm=TRUE AND ss_time >= DATETIME('2014-01-17 00:00:00') I am sure…
Siddharth
  • 5,009
  • 11
  • 49
  • 71
0
votes
1 answer

Google App Engine Datastore: Extracting data using GQL query

I'm currently playing with the Google App Engine datastore, and trying to extract some data from my applications database using GQL. import os import re import random import hashlib import hmac from string import letters import webapp2 import…
Manas Chaturvedi
  • 5,210
  • 18
  • 52
  • 104
0
votes
2 answers

Simple Question: How to get current date in Java to be used in GQL query?

I have a Users table that has an element called "date". I would like to make these pseudocode queries work in Java: select * from Users WHERE date=today and also select * from Users WHERE date "in this hour" How can I write the queries? I am using…
chris
  • 20,791
  • 29
  • 77
  • 90
0
votes
1 answer

Explicitly positive integer in Google Cloud Datastore

I was studing the Google Cloud Datastore GQL grammar and behavior when I found the "explicity positive integer" concept. Someone could tell me an example of its usability? I think that with an example I could understand better the importance and use…
lorenagmad
  • 89
  • 1
  • 4
0
votes
1 answer

Error in or operator for query in GAE datastore

I have a table in Google app engine datastore. It has 3 columns A,B and C. I need to retrieve all the rows that contain val in either column A, B or C. I am writing a standard sql query like select * from table where A = val or B = val or C = val.…
0
votes
2 answers

GQL with two tables

Hello i am doing a very small application in google appengine and i use python. My problem is that i have two tables using de db.model ("clients" and "requests"). The table "client" has got the email and name fields and the table "requests" has got…
0
votes
1 answer

GQL query ReferenceProperty for objects with no references

I have the following models, where one Thing can have multiple Action: class Thing(polymodel.PolyModel): create_date = db.DateTimeProperty(required=True) class Action(db.Model): thing = db.ReferenceProperty(Thing, collection_name='action') …
Tzach
  • 12,889
  • 11
  • 68
  • 115
0
votes
1 answer

GqlQuery by ID always returns None result

My code is intended to: Retrieve a user_id from a cookie, if it exists. Query the datastore using the user_id to retrieve the user record. Finally, if a record is found, it displays a welcome message. (signup is passed to a template) I cannot get…
Hess
  • 130
  • 4
0
votes
1 answer

Google App Engine: IN filter and argument position

I have a table where one of the columns contains a list. I want to know if it is possible to select all rows where the list contains a specific element. More concretely, I have a guests column containing a list of strings and I want to know if a…
0
votes
1 answer

gql query on date

How do I apply a GQL query such that it lists the user_name in the UserInformation model table of those who have logged in within the last 3 days?
Mayur
  • 1
  • 1
0
votes
2 answers

Possible to create keys as ancestors without using db.model class?

I'm creating a database where I have the following hierarchy: Subject -> Topics -> Pages. I know that there will only ever be two subjects. Arts and Science lets say. Is it possible for me to create a topic where I set the parent key to a string…
Alxander
  • 323
  • 1
  • 3
  • 9
0
votes
1 answer

google app engine OR filter

I want to do an OR filter within google app engine. For example: class MyModel(db.Model): name = db.StringPropery() description = db. StringPropery() The following will return all "MyModel" instances with name = steve AND description =…
jonmiddleton
  • 1,122
  • 14
  • 16
0
votes
1 answer

GqlQuery returns random results

I'm writing a quite simple web application based on Google's Application Engine. It's the first time I'm working with Python and Google's datastore. The application should display some questions on its home page. Those questions are stored in a…
offz
  • 223
  • 1
  • 2
  • 6
0
votes
0 answers

Google App Engine Datastore multi-valued properties matches only when having > 1 values

I have a data table as follows. When I execute the GQL from the Admin Console: SELECT * FROM DbFeed WHERE broadcasterAccountNames='gmnexuss@gmail.com' The result I got is only 1 row, which is the one with id=10001. What's wrong with it? Why…