Questions tagged [gqlquery]

129 questions
0
votes
1 answer

GAE by using GQL, how to use SQL's like query?

def post(self): selector = self.request.get('search') search = db.GqlQuery("SELECT * FROM Product WHERE productName = :selector", selector=selector) products = search.fetch(10) values = { 'products' : products } …
user520987
  • 41
  • 3
0
votes
0 answers

GqlQuery error for simple registration form in Python

Sorry, for the weird title but I wanted to elaborate what you would be working with. So here is what I want to do: Grab the user_id and hash from my cookie. (Complete) Put it in a gql query that finds the user_id and hash in my database (In…
Mr.Bill
  • 179
  • 14
0
votes
1 answer

AppEngine GqlQuery (WHERE NOT)

I want to find all employees from a company where the telephone number is NOT empty. Now I have this: db.GqlQuery('SELECT * FROM Employee ' 'WHERE company = :company ' 'AND phone > :nophone', company=company, nophone=None) But this…
Elias
  • 3,300
  • 4
  • 34
  • 38
0
votes
1 answer

How do a make a login feature that retrieves the user from the database?

I am making a basic web page that has a sign up page and a login page. I am using google app engine, python, and HTML. This is my user function: class User(db.Model): name = db.StringProperty(required=True) pw_hash =…
0
votes
1 answer

GQL query by key syntax no longer works in GAE console

I have Datastore Viewer URLs stored for specific queries such as: SELECT * FROM User WHERE __key__ = key('User',9999) which now, in the updated console interface, don't work. Has the syntax changed?
leontx
  • 1,165
  • 1
  • 14
  • 24
0
votes
1 answer

GqlQuery with selfreferenceproperty key

I have an entity with a selfreferencyproperty and I wanted to search with a WHERE condition on the selfref field's key. My intent is to reduce DB hits by building a list of keys, then iterating over the same entity to build a nested list. I am using…
0
votes
1 answer

gqlQuerry comparing datetime objects

Here is the relevant code copied from my application on GAE. today = datetime.datetime.strptime(date_variable, "%d/%m/%Y") yesterday = ref_today - datetime.timedelta(days=1) tomorrow = ref_today + datetime.timedelta(days=1) logging.info('%s : %s …
0
votes
0 answers

workaround on projection queries with equality filter

I have the following model in python Google App Engine: class UserAction(ndb.Model): author_gae_key = ndb.KeyProperty(indexed=True) target_gae_key = ndb.KeyProperty(indexed=True) # key of word, topic, etc. action_type =…
user3217125
  • 579
  • 5
  • 12
0
votes
2 answers

How do I execute this query in GQL [Google App engine]?

I have a table of projects with two of it's columns as 'language' and 'tag'. After the user gives an input, I want to output all the projects whose language is input or tag is input. Sql query for above would be this, Sql query: Select * from…
Wasim Thabraze
  • 780
  • 1
  • 12
  • 29
0
votes
1 answer

How to perform this GqlQuery?

I have the datastore as follows, class Data(db.Model): project = db.StringProperty() project_languages = db.ListProperty(str,default=[]) When user inputs a language (input_language), I want to output all the projects which contains the…
Wasim Thabraze
  • 780
  • 1
  • 12
  • 29
0
votes
1 answer

GQL query checking numerical id within a list of ids

I'm trying to compare the unique numerical id of an element in my database with a list of longs. My GQL query should return those elements which have this id I'm passing as part of their array of longs. I've tried using a statement of the…
0
votes
1 answer

How do I use GQL to select a group that look like this Key('Group', '1779_1528')

How do I use GQL to select a group that look like this Key('Group', '1779_1528'). i tried: Select * from User where group = '1779_1528' Select * from User where group = Key('Group', '5335_5556') Select * from User where group HAS ANCESTOR…
phongyewtong
  • 5,085
  • 13
  • 56
  • 81
0
votes
0 answers

GQL query for webapp2 Unique logins

I want to use GQL to find specific entries in Google App Engine Datastore. The entities that I want locate are webapp2 unique user records. I have tried structuring the query with keys, strings, etc, without success. EDIT: the entities' model is…
coffeerv
  • 1
  • 4
0
votes
2 answers

How to prevent multiple submission in database

I have made a simple guestbook where I have a