You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marcus Crafter <cr...@dresdnerbank.de> on 2000/10/05 22:20:39 UTC

[C2] SQLTransformer diff

Hi All,

	Hope everything is going well around the Cocoon globe! :-)

	Attached is a patch which enables SQL inserts, updates, stored
	procedure invocations, etc, in the C2 SQLTransformer.

	The patch adds support for an attribute 'isupdate' to the 'query' tag
	where the SQL normally resides. If this 'isupdate' flag is set to
	anything but 'false' (case ic) then Statement.executeUpdate() will be
	called instead of Statement.executeQuery().

	The result from the call of the update/insert/sp/etc is printed in the
	resulting output file within 'returncode' tags.

	eg:

<execute-query xmlns="http://apache.org/cocoon/SQL">
   <query isupdate="true">
        delete from mytable where id='10';
   </query>
</execute-query>

	will result in output like:

<ROWSET><ROW><returncode>1</returncode></ROW></ROWSET>

	whereby the '1' is the returncode from the Statement.executeUpdate()
	invocation (ie. number of lines deleted/inserted, or 0).

	This is my first patch, there's more to come so please feel free to
	comment. I want to learn to do things properly. :-)

	I've tested the code successfully as much as I can in my environnent.
	Please let me know if there are any problems in yours.

	Cheers,

	Marcus
-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@osa.de
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:           After Hours    : +49 69 49086750

Re: [C2] SQLTransformer diff

Posted by Donald Ball <ba...@webslingerZ.com>.
On Wed, 11 Oct 2000, Marcus Crafter wrote:

> Hi There!
> 
> On Tue, 10 Oct 2000, Wang, gonghui wrote:
> 
> > Just curious, what is your opinion of SQLTransformer vs. esql in cocoon 2.0
> > (not available now?)
> > I thought esql is can handle more stuff, such as multiple connections in one
> > xml file, conncection pool, and axsp taglib is preferred  ?
> 
> 	I spoke with Donald Ball before submitting my patch for the
> 	SQLTransformer asking a similar question (response is included below).
> 	
> 	Basically, esql is the way of the future, and will be where the primary
> 	development efforts will go. Unfortunately the esql taglib is as of
> 	yet not available for Cocoon 2 and requires some porting effort which
> 	is currently being worked on. In our case here, we were looking to move
> 	to Cocoon 2 now for several reasons but we support to call stored
> 	procedures, etc, was mandatory.
> 
> 	So, I implemented what we needed and submitted it, as it wasn't to
> 	tough to do and we needed it straight away. When esql is available for
> 	Cocoon 2 though, we'll also be looking to take it on.
> 
> 	Donald, is there anything you'd like to add ?

just that i anticipate releasing esql for c1 and c2 for real shortly after
apachecon.

- donald


Re: [C2] SQLTransformer diff

Posted by Marcus Crafter <cr...@dresdnerbank.de>.
Hi There!

On Tue, 10 Oct 2000, Wang, gonghui wrote:

> Just curious, what is your opinion of SQLTransformer vs. esql in cocoon 2.0
> (not available now?)
> I thought esql is can handle more stuff, such as multiple connections in one
> xml file, conncection pool, and axsp taglib is preferred  ?

	I spoke with Donald Ball before submitting my patch for the
	SQLTransformer asking a similar question (response is included below).
	
	Basically, esql is the way of the future, and will be where the primary
	development efforts will go. Unfortunately the esql taglib is as of
	yet not available for Cocoon 2 and requires some porting effort which
	is currently being worked on. In our case here, we were looking to move
	to Cocoon 2 now for several reasons but we support to call stored
	procedures, etc, was mandatory.

	So, I implemented what we needed and submitted it, as it wasn't to
	tough to do and we needed it straight away. When esql is available for
	Cocoon 2 though, we'll also be looking to take it on.

	Donald, is there anything you'd like to add ?

	Cheers,

	Marcus

--- attached message ---

Re: [C2] SQLTransformer diff

Posted by "Wang, gonghui" <gw...@houston.geoquest.slb.com>.
Hello, Marcus,

Just curious, what is your opinion of SQLTransformer vs. esql in cocoon 2.0 (not
available now?)
I thought esql is can handle more stuff, such as multiple connections in one xml
file, conncection pool, and axsp taglib is preferred  ?

thanks for any feedback, as I have some old sqlquery stuff trying to migration to
cocoon 2.0


Marcus Crafter wrote:

> Hi All,
>
>         Hope everything is going well around the Cocoon globe! :-)
>
>         Attached is a patch which enables SQL inserts, updates, stored
>         procedure invocations, etc, in the C2 SQLTransformer.
>
>         The patch adds support for an attribute 'isupdate' to the 'query' tag
>         where the SQL normally resides. If this 'isupdate' flag is set to
>         anything but 'false' (case ic) then Statement.executeUpdate() will be
>         called instead of Statement.executeQuery().
>
>         The result from the call of the update/insert/sp/etc is printed in the
>         resulting output file within 'returncode' tags.
>
>         eg:
>
> <execute-query xmlns="http://apache.org/cocoon/SQL">
>    <query isupdate="true">
>         delete from mytable where id='10';
>    </query>
> </execute-query>
>
>         will result in output like:
>
> <ROWSET><ROW><returncode>1</returncode></ROW></ROWSET>
>
>         whereby the '1' is the returncode from the Statement.executeUpdate()
>         invocation (ie. number of lines deleted/inserted, or 0).
>
>         This is my first patch, there's more to come so please feel free to
>         comment. I want to learn to do things properly. :-)
>
>         I've tested the code successfully as much as I can in my environnent.
>         Please let me know if there are any problems in yours.
>
>         Cheers,
>
>         Marcus
> --
>         .....
>      ,,$$$$$$$$$,      Marcus Crafter
>     ;$'      '$$$$:    Computer Systems Engineer
>     $:         $$$$:   Open Software Associates GmbH
>      $       o_)$$$:   82-84 Mainzer Landstrasse
>      ;$,    _/\ &&:'   60327 Frankfurt Germany
>        '     /( &&&
>            \_&&&&'     Email : Marcus.Crafter@osa.de
>           &&&&.        Business Hours : +49 69 9757 200
>     &&&&&&&:           After Hours    : +49 69 49086750
>
>   ------------------------------------------------------------------------
>                     Name: sqltrans.diff
>    sqltrans.diff    Type: Plain Text (TEXT/PLAIN)
>                 Encoding: BASE64
>
>   ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org