cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo" <agalla...@agsoftware.dnsalias.com>
Subject Re: _esql_connection.connection should be public
Date Mon, 12 May 2003 12:26:50 GMT
Torsten Curdt dijo:
>> IMHO a new esql tag would be the best.
>> If we make it outside esql we have to care about all imports and
>> try/catch and what else is realted to java.sql.* in the xsp. This is
>> not necessary when we make it with esql.
>> If we create a new tag for returning the connection, I propose also to
>> create a tag for returning a ResultSet and ResultSetMetaData.
>> Than we have more freedom in manipulating/assigning all kind of DB
>> related data.
>
> not sure if ResultSet and ResultSetMetaData is really necessary but...
> care enough for a patch? ;-)

Hi, sorry to go into your discussion, but maybe
I dont know if this is a valid but something like:

Syntax:
<get-field pool="MyPoolName" table="MyTableName" 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;

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.

Best Regards,

Antonio Gallardo.




Mime
View raw message