On Sep 29, 2009, at 5:42 PM, Evgeny Ryabitskiy wrote:

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 = @bind($MyParamName 'NUMERIC' 2)
/* pass BindDirective with precision 0 here */

Trying to understand whether the second option is redundant. Do you feel like option #1 won't be sufficient and we need to mix BindDirective with #bind? Maybe you have a good example why this is important?


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.

Yeah, the idea here is to fully emulate #result() directive behavior, so the properties will be the same as the #result() parameters.

BTW if we can come up with a sensible implementation of CAY-1282 that you just opened, it will be great. This will require some smart matching of column names obtained from ResultSetMetadata with explicitly mapped columns. Not impossible I guess.

P.S. Sorry for so slow answering, GMail page is banned at my work proxy :/

No worries. People here are used to asynchronous communication.

Andrus

Reply via email to