Mercurial > dive4elements > river
changeset 6110:5ba28b563614
Fix datacage for user data by adding facet filtering.
Now the facets are joined in the user data select statement
and afterwards we just filter on the facet name where previously
new queryies were created.
Grouping also fixes the repeating folders caused by the change
in the statements during the large perfomance cleanup.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 27 May 2013 15:36:56 +0200 |
parents | 2a4ff87ef357 |
children | 6815714c1f97 |
files | artifacts/doc/conf/meta-data.xml |
diffstat | 1 files changed, 13 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml Mon May 27 15:27:31 2013 +0200 +++ b/artifacts/doc/conf/meta-data.xml Mon May 27 15:36:56 2013 +0200 @@ -390,41 +390,21 @@ <!-- Macros to load user data --> - <dc:macro name="select-facets"> - <!-- FIXME : this is broken now! --> - <dc:context> - <dc:statement> - SELECT a.gid AS aid, - f.id AS fid, - f.name AS facet_name, - f.num AS facet_num, - f.description AS facet_description - FROM artifacts a - JOIN outs o ON o.artifact_id = a.id - JOIN facets f ON f.out_id = o.id - WHERE a.id = ${a_id} - AND f.name = ${facet_type} - </dc:statement> + <dc:macro name="differences"> + <dc:filter expr="$facet_name = 'w_differences'"> <dc:if test="dc:has-result()"> - <dc:macro-body/> + <differences> + <dc:for-each> + <w_differences + description="{$facet_description}" + factory="winfo" + artifact-id="{$aid}" + ids="{$aid}" + out="w_differences"/> + </dc:for-each> + </differences> </dc:if> - </dc:context> - </dc:macro> - - <dc:macro name="differences"> - <dc:variable name="facet_type" value="w_differences"/> - <dc:call-macro name="select-facets"> - <differences> - <dc:for-each> - <w_differences - description="{$facet_description}" - factory="winfo" - artifact-id="{$aid}" - ids="{$aid}" - out="w_differences"/> - </dc:for-each> - </differences> - </dc:call-macro> + </dc:filter> </dc:macro> <dc:macro name="reference-curves">