struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Lamb <>
Subject Re: Struts DB Access :: Best Practices
Date Thu, 10 Mar 2005 19:34:07 GMT
On 10 Mar 2005, at 11:55, Scott Lamb wrote:

>>  - consistent dynamic sql (from what I see, there are different ways
>> for altering the order and the where clauses..are there others?)
> There's also the <s:bindlist/>, which is similar to your iterator.

Ahh, lost a later draft with more here.

There's no general-purpose lexical bind (like Oracle Forms & Reports' 
&foo). I also don't have a way of quoting SQL identifiers, as I haven't 
found the need. I sometimes execute queries like this:

     cursor grants is
     select    grantee, granted_role
     from      dba_role_privs
     where     granted_role in ('FOO', 'BAR');
     for grant in grants loop
         execute immediate 'revoke ' || 
                           || ' from ' || quote_identifier(grantee);
     end loop;
show errors

but those are infrequent admin tasks, and I'm happy just typing that 
block into SQL*Plus. I don't know why you'd do that from a web app.

This is another case where I try to avoid implementing the feature 
before I see what needs it. I waited on lexical binds and added instead 
bind lists, conditionals, and dynamic order by clauses when each 
presented its need. They've all been much better for the task than 
lexical binds would be, and there might be some more left of that 

Scott Lamb <>

View raw message