Questions tagged [gqlquery]

129 questions
1
vote
1 answer

Google Cloud Datastore date field getting converted automatically

I've got a table called Person with three columns: id name registeredDate Where registeredDate is LocalDateTime. I am trying to write a query using Query By GQl as following: Select * from person I'm getting the following data output Id name …
1
vote
0 answers

JUnit for GQL Query

Please can you help me writing junits for below method, public Map> getEntitiesUsingAncestorKey(Key ancestorKey) { QueryResults queryResults; StringBuffer queryString = new StringBuffer(); …
SJ12
  • 13
  • 2
1
vote
1 answer

OR Condition Return Error in GQL ( Google app engine) Why?

When i use the OR condion in GQL it return error messege tht "BadQueryError: Parse Error: Expected no additional symbols at symbol OR . Why? db.GqlQuery("Select * from vendor where access='public' OR organisation_id='"+ orgid +"'")
Nijin Narayanan
  • 2,269
  • 2
  • 27
  • 46
1
vote
1 answer

Google AppEngine complex WHERE condition

I want to have a condition something like start_time <= start_time_input <= end_time OR start_time <= end_time_input <= end_time OR (start_time_input <= start_time AND end_time <= end_time_input ) The 2 ways as identified in the docs (…
Gaurav Toshniwal
  • 3,552
  • 2
  • 24
  • 23
1
vote
2 answers

GqlQuery and ID

I try to build a GqlQuery and get an entity by the specified ID, but I get the error "IndexError: The query returned fewer than 1 results". A DataStore is not empty. At the Datastore Viewer I've found the necessary ID. My code is placed below: from…
starter
  • 169
  • 2
  • 10
1
vote
0 answers

GQL union not retuning values

GQL union query not getting me the results Below is what I've done, type Body { content: Content } union Content = TextContent | BannerContent type TextContent { text: String } type BannerContent { banners: [Banner] } Front End…
aw3123
  • 139
  • 5
  • 18
1
vote
3 answers

One to Many Database Setup in Google App Engine

class Student(db.Model): teacher = db.ReferenceProperty(Teacher, collection_name='students') name = db.StringProperty(required=True) zip_code = db.IntegerProperty(required=True) square_footage = db.IntegerProperty(required=True) …
David Rinck
  • 6,637
  • 4
  • 45
  • 60
1
vote
1 answer

BigQuery optimisation query with filtering on nested array of STRUCT fields and grouping back

I'm trying to figure out how to write GQL (Google SQL) query to filter deeply nested structure and after that nest it again and leave first of records for STRUCT properties on the same level with ARRAY. I prepared a schema sample WITH Sale AS…
Ray
  • 1,788
  • 7
  • 55
  • 92
1
vote
2 answers

GQL query with multiple condition on one List field

I want to get object, which listfield contains 'foo', 'bar' and 'foobar' strings. Can I do query like this SELECT * FROM Entity WHERE listfield = 'foo' AND listfield = 'bar' AND listfiled = 'foobar' where listfield = StringListProperty() ?
1
vote
4 answers

How do you query the set of Users in Google App Domain within your Google App Engine project?

If you have a Google App Engine project you can authenticate based on either a) anyone with a google account or b) a particular google app domain. Since you can connect these two entities I would assume there is some way to query the list of users…
Rahul Malik
  • 201
  • 4
  • 9
1
vote
1 answer

delete() takes exactly 2 arguments (0 given) - Google App Engine Datastore Delete

I have an Event table with fields: class Event(db.Model): """ Event Model """ account = db.UserProperty(required=True) event_id = db.StringProperty(required=True) Here is the delete function: @staticmethod def delete(account, …
ssk
  • 9,045
  • 26
  • 96
  • 169
1
vote
1 answer

How to get the URL-safe key for Entities from GAE Datastore using Admin Console in the result list?

I'm trying to find an easy way to get data from GAE datastore using the cloud console. I can use GQL Query from https://console.cloud.google.com/datastore/entities/query . The result list contains keys but not URL-safe keys. I wasn't able to find…
1
vote
1 answer

Counting the number of distinct strings given by a GQL Query in Python

Suppose I have the following GQL database, class Signatories(db.Model): name = db.StringProperty() event = db.StringProperty() This database holds information regarding events that people have signed up for. Say I have the following…
1
vote
1 answer

Google Cloud Datastore - Java - GQLQuery Cursors

I'm a bit confused about how to properly pass a cursor in a GQL query. Here is what I have so far: DatastoreV1.GqlQuery.Builder query =…
1
vote
1 answer

GQL Reference for Appengine

Anyone have a good reference guide for GQL (query language for google appengine datastore)? I find the reference guide on the google appengine site very limited with examples
1 2 3
8 9