[web2py] Re: Web2py and Projection Queries

2012-06-13 Thread howesc
there is an update in trunk, please see comments here: https://groups.google.com/forum/?fromgroups#!topic/web2py/HWy0NuelElA On Tuesday, June 12, 2012 12:24:48 PM UTC-7, howesc wrote: > > and thinking about backward compability, if we start automatically doing > projection queries and users don'

[web2py] Re: Web2py and Projection Queries

2012-06-12 Thread howesc
and thinking about backward compability, if we start automatically doing projection queries and users don't have the proper indexes the queries will fail until they specify the indexes. (though it could just be an upgrade step for users to generate the proper indexes). is there a strong prefer

[web2py] Re: Web2py and Projection Queries

2012-06-12 Thread Anthony
> > It is a requirement that if a list of fields is specific in the > select(*fields) a superset of those fields be returned. Not a subset and > not an error. This is because of backward compatibility. We need to detect > problems with *fields and find a workaround. Or at the very least, make

[web2py] Re: Web2py and Projection Queries

2012-06-12 Thread Massimo Di Pierro
It is a requirement that if a list of fields is specific in the select(*fields) a superset of those fields be returned. Not a subset and not an error. This is because of backward compatibility. We need to detect problems with *fields and find a workaround. On Tuesday, 12 June 2012 10:37:26 UTC-

[web2py] Re: Web2py and Projection Queries

2012-06-12 Thread howesc
yes, unfortunately the restrictions on projection queries are a bit of a pain: - each property queried must be indexed - i think that if any of the indexed properties is empty (as opposed to null) the row may not be returned (i have to recheck the docs on this) - can't use == and "project" the

[web2py] Re: Web2py and Projection Queries

2012-06-12 Thread Anthony
According to your model, valor is a text field, and projection queries do not allow text fields either. Anthony On Tuesday, June 12, 2012 7:54:04 AM UTC-4, Alex Benfica wrote: > > Hi Anthony, > > You are rigth... but I left only the Field valor and still returns empty. > :) > > That is the tabl

[web2py] Re: Web2py and Projection Queries

2012-06-12 Thread Alex Benfica
Hi Anthony, You are rigth... but I left only the Field valor and still returns empty. :) That is the table... Field('nome', 'string', required = True, ), Field('valor', '

[web2py] Re: Web2py and Projection Queries

2012-06-11 Thread Anthony
Is tabela.valor_blob a Blob field? The GAE documentation says projections can only include indexed properties, so no Text or Blob properties -- see https://developers.google.com/appengine/docs/python/datastore/queries#Query_Projection. I would think that would result in an error, though. Antho

[web2py] Re: Web2py and Projection Queries

2012-06-11 Thread Alex Benfica
Hi Massimo and howesc! Testing again... I found a problem: Do not return errors ( but returns no rows... ). rows = self.db(self.tabela.nome == nome).select(self.tabela.valor, self.tabela.valor_blob) Returns the desired rows... rows = self.db(self.tabela.nome == nome).sel

[web2py] Re: Web2py and Projection Queries

2012-06-11 Thread Alex Benfica
Doing some research I found the docs... "You cannot project a property that also is referenced in an equality filter. For example SELECT A FROM kind WHERE A = 1 is not supported, but SELECT A FROM kind WHERE B = 1 or SELECT A FROM kind WHERE A > 1 is supported." So I did ... self.db(self.tabe