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

GraphQL queries in Separate File (gql, graphql)

I am working on project with teachnology combination of React + Postgraphile (GraphQL) + axios(http request to postgraphile server). It has lots of GraphQL queries. Initially started with queries in same file with the other JavaScript and rendering…
Manan
  • 140
  • 2
  • 14
4
votes
1 answer

Hasura graphql query between dates

In my hasura.io database, I have a booking table, where I store bookings with the following properties: id (autoincrement) from (timestamptz) to (timestamptz) description (text) Now, from the UI, when a user makes a booking, I would like to check…
Alejandro Garcia Anglada
  • 2,373
  • 1
  • 25
  • 41
4
votes
2 answers

How to run a Datastore GQL query in Golang?

I have the following query in GQL: "SELECT * FROM Task WHERE Uuid = \"FOOBAR\" ORDER BY CreateTimeMs DESC LIMIT 1" How can I directly run this query in Golang? query := datastore.NewQuery("SELECT * FROM Task WHERE Uuid = \"FOOBAR\" ORDER BY…
Bob van Luijt
  • 7,153
  • 12
  • 58
  • 101
4
votes
1 answer

GQL Projection Query on Embedded Entity

Say I have a User entity with an embedded entity address which contains a house number property and a street property. How can I write a GQL projection query that will filter based on name and return a list of addresses ? Sample Data: The…
Kookz
  • 239
  • 3
  • 12
4
votes
1 answer

Search a string beginning with a prefix in Google App Engine Datastore

I want to search all entities whose name starts with a specific string, is this possible in Datastore? I've tried this: q = datastore.NewQuery("Places").Filter("Name > ", "a") But it doesn't work. If this is not possible, what alternative solution…
Fantasim
  • 876
  • 1
  • 12
  • 32
4
votes
1 answer

Can a GQL query execute an order by over two or more kinds?

I have two entity kinds in my python GAE app - both with similar attributes - and I'd like to query both lists and order the result according to an attribute common to both kinds. So something along the lines of: db.GqlQuery("SELECT * FROM Video1,…
citronic
  • 9,868
  • 14
  • 51
  • 74
4
votes
2 answers

GQL with node.js

Is there a working example of using Google Datastore GQL in Node.js? The examples in the documentation contain a .execute function that doesn't appear to exist. https://cloud.google.com/datastore/docs/concepts/gql I therefore tried using the regular…
sradforth
  • 2,176
  • 2
  • 23
  • 37
4
votes
1 answer

GQL error from Cloud Datastore Viewer for string-encoded key

I'm trying to get entity from Google DataStore using Admin Console. I use SELECT * FROM User where __key__ = KEY('ag9wYWdhbGd1eS1zdGF0aWNyHAsSBUNhY2hlIhEvYnV0dG9ucy9lZGl0LmdpZgw'). In accordance with GQL docs it should work KEY('encoded key') OR…
4
votes
2 answers

Is there a maximum size for index numbers in Google Datastore

I have an application that is storing and indexing numeric fields in Google Datastore. Internally these are being created and indexed using Java/Objectify with the Entity that is being persisted annotated with the @Index annotation for the fields…
4
votes
1 answer

I can't query GQL for 2 properties only wildcard is working

I store comment entity in Datastore and I use Datastore Viewer to see stored data. I can do following queries select * from comment select __key__ from comment select Subject from comment select Comment from comment But I can't query select…
Andrew
  • 1,095
  • 1
  • 8
  • 13
4
votes
3 answers

AppEngine: Query datastore for columns with a hyphen in its name

I'm working on a servlet in Google App Engine. This servlet retrieves the data from the GAE's datastore; everything works fine when querying like "SELECT * FROM...". But when I want to filter it by a certain column, it does not work since the name…
Pablo
  • 81
  • 1
  • 3
4
votes
2 answers

Redirect To Specific URL in Google app engine

I am working in google app engine , i want to redirect browser to the specific URL which is retrived from Datastore. The model of stored URL is like, class WebReference(db.Model): website = db.StringProperty() …
user1847145
4
votes
1 answer

Is there OR operator in GQL?

I don't know if this has been asked here. I saw couple of questions on "like" operator but I'm not sure if that's I'm looking for. Sorry I'm a noob at this. But I am moving from MySQL to Google App Engine and was wondering if there was an OR…
shriek
  • 5,605
  • 8
  • 46
  • 75
4
votes
3 answers

Check if Google App Engine datastore entity has a particular property

I am new with developing web applications with Google App Engine. I wanted to check for entities in my datastore which have a null value set for a list property (db.ListProperty). However, when I tried to check anything against the entity.list GAE…
Abhranil Das
  • 5,702
  • 6
  • 35
  • 42
3
votes
3 answers

How to GROUP BY in App Engine

Is there some way to GROUP BY in App Engine, via GQL or Query methods? I made some research and I've read that there isn't GROUP BY in GQL, and looks like there isn't also in Query class. If is there any resource or any approach to implement with…
rogcg
  • 10,451
  • 20
  • 91
  • 133