cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scherler <thorsten.scher...@wyona.org>
Subject [wiki] Difference between esql and sql? Area of usage?
Date Thu, 13 Mar 2003 13:30:37 GMT
Hello group,

/I found different ways for SQL in cocoon. On the one hand there is 
<esql:.../>, on the other <sql:.../>. 

/This is the start of the following wiki-page that I started to 
summarize my experience with cocoon sql / esql. 
http://wiki.cocoondev.org/Wiki.jsp?page=SQL/
/*/consider this a work in progress - and I just started/*
Agenda:
- Difference between sql and esql => first page
- example1 sql / esql (beginner example of both approaches with the same 
result) => second page
- example2 sql / esql (Parameter example of both approaches with the 
same result) => third page
- example3 esql (nested example) => fourth page
- example4 esql (nested example + <xsp:logic>) => fifth page
/
for the first page:
/*please correct me if I am wrong, I am a beginner*
The main difference that I see is that <sql:.../> is based on a 
transformer and <esql:...> on a generator. [1]
One advantage in XSP is that you can add more logic to a document. You 
can use Java and esql-logicsheet within XSP.
One advantage in using  SQL is that you can have multiple transformer 
within a match.
Both are based on different logicsheets.
...

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

third page:
simple pipline with a normal "Select id, department_id, name from  
employee Where id=?" with a 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.
<query1>

select ap_id as id from sales 
<query2>
 select * from ap_tab where ap_id =<query1-result>id<query1-result>
</query2>
</query1>

...

fifth page:
http://wiki.cocoondev.org/Wiki.jsp?page=XSPTransformCustomDate

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

Any help welcome -> just post your comment to this mail (reply).

King regards
Thorsten

Reference:
[#1] http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=103979425914445&w=2

/
/


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message