Author Login
Post Reply
Jochen Theodorou wrote:
> Marc DEXET schrieb:
> I mean the missing javadoc for the methods you added to
> Sql... I see you
> have attached a complete Sql class today... please show me only the
> patch. the sql class is far to big to see where exactly you
> made changes.
Uhm, uhm, I say we can open a subscription to buy you new glasses :)
http://jira.codehaus.org/secure/attachment/36644/SqlPatch2008_08_22.txt
> conceptual documentation is also always welcome. Maybe you
> want to write
> some examples in our wiki...
I will write this with pleasure as soon as the patch will have some "official" aspect.
It's not good for me to write "official" documentation in wiki if the feature is not "official". Or I write it by side, as a sort of groovy-fiction :) and we'll change it after commit ?
> ehm no ;) I am by no means a sql expert, I am used to OODBMs and raw
> SQL, but not all the jdbc stuff ;) So I don't exactly know what Aaron
> means, I was just asking.
We're two :)
>> holdOn is replaced par cacheStatement(Closure closure) and
>> setPersistent(Boolean b) is repalced by
>> cacheStatement(Boolean b).
> >
>> cacheStatement(Closure closure) is usefull for request nesting in the
>> closure-look way Sql.cacheStatement {
>> sql.eachRow(...) {
>> sql.eachRow(...)
>> }
>> }
> which makes me think that we should maybe turn this into an
> builder, so
> you won't have to write "sql." all the time.
It's a good idea to me.
>> cacheStatement(Boolean b) is usefull for just avoid wasting resource
>>
>> sql.cacheStatement = true
>> sql.eachRow(...) {}
>> ...
>> sql.eachRow(...) {}
>> ...
>> sql.cacheStatement = false
>
> somehow I don't like this very much... most of the time we
> try to limit
> the scope of resources automatically. your
> cacheStatement(Closure) does
> this very good. But here... What happens if the last line is
> forgotten? I have to think about that part a bit... I will take a
> close
> look at it
> once you have attached the patch
For me, this last feature is a option to be use at your own risk.
We have to recommand closure-like feature, but if you want to something with the second for your pattern, as a kind of general property, it's at your own risk.
Perhaps could we add a shutdowhook for closing resources if the last feature is used ?
So specialy for you, direct URLs :P
Patch againt groovy-1.6-beta1
http://jira.codehaus.org/secure/attachment/36644/SqlPatch2008_08_22.txt
Junit
http://jira.codehaus.org/secure/attachment/36645/junitSql_2008_08_22.txt
Cordialement,
--
Marc DeXeT
CNRS - DSI
Pôle Expertises
<http://www.dsi.cnrs.fr>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email