On Mon, Oct 13, 2008 at 07:52:06PM +0100, Martin J. Evans wrote: > Martin Evans wrote: >> Thanks to all who have responded with clarification. I have implemented >> ParamTypes in DBD::ODBC as a hash reference with parameter number as key >> and each value is a hash reference with keys of 'TYPE' and values of SQL >> type number. >> >> This will be in 1.17_2. >> >> Martin > One last thing that came to mind when I was doing this. Is a DBD author > free to add additional keys to the hashref hanging off the parameter key? I > only ask because in DBD::ODBC's case there is some other useful info that > it could be provide including: > > o the described type (i.e., the SQL type SQLDescribeParam returned) which > may be different from the bound type if you specify a bind type. > > o the parameter size > o decimal digits, scale > o nullable > > In addition, for all DBD's you cannot tell if the parameter was bound as in > or in/out.
You can add anything you like so long as 1. the keys have your driver private attribute prefix, so other driver won't choke on them. 2. your driver won't choke if bind_param is called with those extra keys. Tim.