cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Melhem <micha...@dresdnerbank.de>
Subject esql and xsp...
Date Thu, 09 Nov 2000 19:46:28 GMT
Hi,

Upon migrating to cocoon2 and esql, I have noticed that I can 
nolonger dynamically manipulate individual queries within a single
connection object (using xsp).

I often find it useful to dynamically break down a query into 
component sub-queries which are determined at runtime.
This way, each query will return into its own branch of the xml tree -
facilatating ease of computation in any subsequent steps/transforms.

----------------------------------------------
Example:
In the following example...each "where_clause" corresponds to a specific 
date range selected by the user at runtime. I want each range to return 
into its own branch to ease calculation of subtotals 
...
	<xsp:logic>
		// for-loop which performs the required
		// number of queries on the database
		//
		// one loop/query per specified range
		for (...)
		{
			In here determine the correct "where_clause" 
			for the corresponding range...			
	</xsp:logic>
	
			<query 
				connection="conn"
				error-stacktrace-attribute="stacktrace"
			>
				SELECT * 
    				FROM <xsp:expr>table</xsp:expr>
				WHERE <xsp:expr>where_clause</xsp:expr> 
				ORDER BY blah.. 
			</query>
	<xsp:logic>
		}// end for-loop	
	</xsp:logic>
...
--------------------------------

How do I manage the above under c2 and esql?

Any help or feedback would be much appreciated!!!

Kind Regards,
Michael Melhem





Mime
View raw message