Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 21570 invoked by uid 500); 12 May 2003 13:07:20 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 21557 invoked from network); 12 May 2003 13:07:20 -0000 Received: from mailserver1.hrz.tu-darmstadt.de (130.83.126.41) by daedalus.apache.org with SMTP; 12 May 2003 13:07:20 -0000 Received: from paris (paris.dvs1.informatik.tu-darmstadt.de [130.83.27.43]) by mailserver1.hrz.tu-darmstadt.de (8.12.9/8.12.8) with ESMTP id h4CD5ebx017841; Mon, 12 May 2003 15:05:41 +0200 Received: from bremen.dvs1.informatik.tu-darmstadt.de (bremen [130.83.27.69]) by paris (Postfix) with ESMTP id BB50CFF1A; Mon, 12 May 2003 15:05:40 +0200 (MET DST) Received: from haul by bremen.dvs1.informatik.tu-darmstadt.de with local (Exim 3.36 #1 (Debian)) id 19FCzs-0007ca-00; Mon, 12 May 2003 15:05:40 +0200 Date: Mon, 12 May 2003 15:05:40 +0200 To: Antonio Gallardo Cc: cocoon-dev@xml.apache.org Subject: Re: _esql_connection.connection should be public Message-ID: <20030512130540.GO1218@bremen.dvs1.informatik.tu-darmstadt.de> Reply-To: haul@informatik.tu-darmstadt.de References: <3EBF65FD.10206@dff.st> <3EBF6AE6.EBA1CE7F@wincor-nixdorf.com> <3EBF720C.1080607@dff.st> <3EBF7AF0.1EF964B9@wincor-nixdorf.com> <3EBF815F.1020107@dff.st> <3EBF886E.46B11760@wincor-nixdorf.com> <3EBF8D35.3080805@dff.st> <33572.10.0.0.5.1052742410.squirrel@ags01.agsoftware.dnsalias.com> <20030512123001.GF1227@bremen.dvs1.informatik.tu-darmstadt.de> <33591.10.0.0.5.1052743533.squirrel@ags01.agsoftware.dnsalias.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <33591.10.0.0.5.1052743533.squirrel@ags01.agsoftware.dnsalias.com> Organization: Databases and Distributed Systems Group, Darmstadt University of Technology User-Agent: Mutt/1.5.4i From: Christian Haul X-MailScanner: Found to be clean X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On 12.May.2003 -- 06:45 AM, Antonio Gallardo wrote: > Christian Haul dijo: > > On 12.May.2003 -- 06:26 AM, Antonio Gallardo wrote: > >> Torsten Curdt dijo: > >> Syntax: > >> >> field="MyRequestedfield" condition="anotherfield=3" default="ERROR"/> > >> > >> internal process: > >> 1-Create a conection to "MyPoolName" Database. > >> 2-Create a SQL string to retrieve the field from the given table using > >> the given condition: > >> > >> SELECT MyRequestedfield FROM MyTableName WHERE MyRequestedfield; > > Sorry, :) > > SELECT MyRequestedfield FROM MyTableName WHERE @condition; > > >> > >> 3-If there is ONE recordset then return the VALUE for the field, > >> else: return default > >> > >> 4-Close the connection to the database pool. > >> > >> What about something like this? this is just a first draft. > >> Is something like that what are you looking for? > >> > >> It would be enough to take the company name from a Database. > > > > Maybe that should go into a logicsheet that _uses_ esql? > > Why not into esql? This is a very simple SQL query that every RDBMS can > execute without errors. IMHO this layers on top of esql. In addition, esql is quite complex and powerful already. Adding such a tag would complicate things. Actually, thinking about it, it is a little more difficult than at first sight since the tag needs to be usable from an expression. Thus the result needs to be computed in a method and not in place => either a method of the XSP or a helper class. Helper classes are way cleaner => not much to share with esql. What happens if several such tags appear on a page? Would each generate a query to the DB? Should they be combined, how? Chris. -- C h r i s t i a n H a u l haul@informatik.tu-darmstadt.de fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08