> It will work exactly like #bind directive if the parameter is BindDirective,
> as #result if a parameter is a ResultDirective, etc. It seems to be equally
> counterintuitive to pass a special wrapper object in a variable inside of
> #bind, as it is in a standalone variable :-) But in the later case we get a
> more concise syntax that can help in case of large queries.
Ok, I like your idea! So I can suggest to use BindDirective in 2 cases:
1) When we don't have bind in template:
SELECT * FROM Table1 where PersonName = $MyParamName
2) When we have #bind in template but wish to overwrite it's
parameters (JDBC type and precision) via API.
SELECT * FROM Table1 where PersonID =..ind($MyParamName 'NUMERIC' 2)
/* pass BindDirective with precision 0 here */
About ResultDirective... it is used for SQL return... so we can pass
name, jdbc type and precision (no value) to parameters and use it's as
hints while mapping to return values.
Any more ideas? )
Evgeny Ryabitskiy.
P.S. Sorry for so slow answering, GMail page is banned at my work proxy :/
This archive was generated by hypermail 2.0.0 : Tue Sep 29 2009 - 10:43:11 EDT