I found different ways for SQL in cocoon. On the one hand there is <esql:.../>, on the other <sql:...>. So consider this a work in progress -- Scherler

As is the case with most things in cocoon, there are a variety of ways to accomplish the same task. In addition to the ESQL logicsheet and the SQL transformer mentioned aboved, there are also a variety of SQL actions. -- LarryLansing


SQLdifferenceESQL:[[BR]] The main difference that I see is that <sql:.../> is based on a transformer and <esql:...> on a generator.

second page:
simple pipline
"Select id, department_id, name from employee"
sql-transform and esql-generation.

third page:
simple pipline
"Select id, department_id, name from employee Where id=?"
sql-transform and a esql-generation.
Introduction to <esql:parameter/> and <xsl:param/>.

fourth page:
nested example with esql - 2 approaches:
a) select * from ap_tab where ap_id = <esql:parameter type="int"><esql:get-int column="id" ancestor="1"/></esql:parameter>
b) You need a <xsp:logic>int ap_id = <esql:get-int column="id"/> before the inner query begins and then use <xsp:expr>ap_id</xsp:expr> in the inner query to recall it.
select ap_id as id from sales <query2>
select * from ap_tab where ap_id =<query1-result>id<query1-result>

fifth page:

I will work on a regular basis on it and everybody is welcome to edit the page!

SQL (last edited 2009-09-20 23:43:01 by localhost)