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

GQL Query Not Returning Results on StringProperty Query Test for Equality

class MyEntity(db.Model): timestamp = db.DateTimeProperty() title = db.StringProperty() number = db.FloatProperty() db.GqlQuery("SELECT * FROM MyEntity WHERE title = 'mystring' AND timestamp >= date('2012-01-01') AND timestamp <=…
citronic
  • 9,868
  • 14
  • 51
  • 74
0
votes
2 answers

Google DataStore Query Set

I have a Course entity which contains a Set of Keys to my Tag entity. How would I go about creating a query to get a list of courses with a specific tag? For example, I want to find all the courses tagged with java. Here are my…
KevMo
  • 5,590
  • 13
  • 57
  • 70
0
votes
2 answers

Why is this datastore querying by key returning None?

1) When I perform this query: contract_record = Contract(book_number = 42, initial_page = 420, final_page = 442) contract_record.put() contract_key = contract_record.key() contract = db.GqlQuery("SELECT * FROM Contract WHERE __key__ =…
craftApprentice
  • 2,697
  • 17
  • 58
  • 86
0
votes
1 answer

matching patterns in app.yaml configuration, POST 404 error

Since main.app is the default page, regardless of an index.html page in the root directory (GAE does not work like cgi/apache, unfortunately), I've made the form page main.app, and the query/response page response.py. After submitting form, I get…
p1nesap
  • 179
  • 1
  • 3
  • 13
0
votes
1 answer

Merge Google fusion tables via GQL api

Is it possible to merge Google Fusion Tables using GQL or other Javascript/REST API? I see how to do it manually via the application interface (i.e. select Merge from the menubar), but wonder if that can be done programmatically? Presumably the…
prototype
  • 7,249
  • 15
  • 60
  • 94
0
votes
1 answer

Google App Engine null sort order

According to Googles Documentation, null values have no sort order. Is there any way to configure this behavior. For instance, if I am sorting an integer property in ascending order, can I configure the datastore to return null values last or first?
Myles Megyesi
  • 251
  • 2
  • 7
0
votes
1 answer

single-property GQL causes unexpected composite index

If I execute this GQL query: GQLQuery("SELECT user FROM MyUser WHERE foo = :1", fooz) It will cause my index.yaml to make a composite index with both the user and foo properties. - kind: MyUser properties: - name: user - name: foo And if i…
Hai Phaikawl
  • 1,091
  • 8
  • 11
0
votes
1 answer

Unexpected empty results of GQL Query

Surprisingly, after having done a lot of queries without problem. I've run into the first strange GQL problem. Following are the properties of a model called Feedback: content date title type votes_count written_by and following are…
MrCooL
  • 926
  • 3
  • 15
  • 30
0
votes
2 answers

HOW to sort db.ReferenceProperty property?

I have two kind like this: class A(db.Model): propertyA = db.XxxProperty(required=True) class B(db.Model): reference = db.ReferenceProperty(A,collection_name="Bs",required=True) date = db.DateTimeProperty(auto_now_add=True) Now I want…
hakunami
  • 2,351
  • 4
  • 31
  • 50
0
votes
2 answers

Debugging GQL Queries

I have been trying to run this query: my_post = db.GqlQuery("SELECT * FROM Post where __key__ = KEY('Post', 1)") self.render("showpost.html", my_post = my_post) and my template showpost.html looks like this:
Prakhar
  • 3,486
  • 17
  • 44
  • 61
0
votes
2 answers

how to make next/previous buttons to toggle between gql query results

Say I have a website that has 100 products. Then this is filtered down to 5 sections containing 20 products each. If you were in one of the sections that contained 20 products (e.g. toys), what would be the optimal method to display only 5 toys per…
mrmo123
  • 725
  • 1
  • 8
  • 23
0
votes
1 answer

one-to-many GQL query and putting results into a dictionary

I have a google database called Main. class Main(db.Model): name = db.StringProperty() phone = db.StringProperty() There's another database Photo which references Main through a one-to-many relationship. class Photo(db.Model): main =…
mrmo123
  • 725
  • 1
  • 8
  • 23
-1
votes
2 answers

i have an issue with rendering content from graphCMS, the categories in particular

learning how to build a blog with nextjs and graphCMS, been able to get some content using gql queries but for no understandable reason, i can't seem to render the categories.name content onto the site and I am not getting an error. i would like to…
-1
votes
1 answer

Using GraphQL useQuery Variables

I'm currently on client side trying to make a query but can't go through. However it works when testing at the back-end. back-end docs & getting response front-end code (getting 400 code) const QUERY_SPECIFIC_CATEGORY_PRODUCTS = gql` query…
Al1
  • 308
  • 3
  • 9
-1
votes
1 answer

Inserting variable values in GraphQL query

I have a basic graphql query as a string which executes as expected before I try to modify it and add input variables (the query is long so I will only include the beginning of the query which is where the variable needs to be inserted) query { …
iskandarblue
  • 7,208
  • 15
  • 60
  • 130
1 2 3
35
36