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'
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
>
> 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
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-
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
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
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',
'
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
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
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
10 matches
Mail list logo