Added support to use Virtual Fields in autocomplete widget.
Gotchas:
- Using Virtual Fields is slower than normal fields.
- Virtual Fields must be declared with name and table_name attributes.
The problem is only a styling issue and not a HTML one.
It was solved in 864dbe73f2 by adding a `readonly ` class to labels which allow for properly vertical align with CSS.
This reverts commit 353db90a64 which add
specific HTML for some filed types and which breaks display of comments.
Any query like SELECT COUNT(*) from (SELECT COUNT(*) FROM ...) will fail with 'No column name was specified for column 1 of '_tmp'', so I'm providing an alias for the subquery's field
unicode characters in these strings are lost in self.vars.
This conditions sets it back to the original input.
Might be, that this should be done at another place, but it works.
Why didn't we think before ? References are lazy, but when asked
for representation why should we fetch the same referenced record
over and over ?
NB: the code caches only represent() fetching records from tables, that
are the only idempotent represent() calls out there. We could cache
every representation only asking for every represent() call to be
idempotent. As I feel there will be someone returning random values,
I left it out.
I'll make a PR soon for pyDAL to fix the same behaviour.
since there is no more a proper place to put the new regex, it's on top
of the module for speedup. The patch leaves open a few corner-cases,
but since we have "headers" to alter the headers in SQLTABLE, any
corner case can be fixed passing properly filled "headers" parameter.
This just makes the simple case described on the issue work fine, that
should accomodate the 99% of the usecases for with_alias() needs
at the field level.