Tim Bunce wrote:
Thanks for the feedback, Tim.On Sun, Dec 15, 2002 at 10:16:47PM -0800, Jonathan Leffler wrote:Dear Tim (and others who've worked on the metadata methods), I'd like to check on my understanding of what's required from the metadata methods such as $dbh->tables. [...]
{Yes, I missed reading quote_identifier:-(}
Yet another question -- given the specifications of type_info_all and type_info, how does type_info get hold of the SQL_DATA_TYPE, SQL_DATETIME_SUB and INTERVAL_PRECISION fields, given that they are not listed in the type_info_all structure?
Also, the spiel for SQL_DATA_TYPE says:
<quote>This column is the same as the DATA_TYPE column, except for interval or datetime types. For interval and datetime data types, the SQL_DATA_TYPE field will return SQL_INTERVAL or SQL_DATETIME, and the SQL_DATETIME_SUB field will return the subcode for the specific interval or datetime data type. If this field is NULL, then the driver does not support or report on interval or date types.</quote>
Questions arising:
1. That last 'date' should be 'datetime' to be consistent.
2. What does the DATA_TYPE field contain when this field contains
SQL_DATETIME or SQL_INTERVAL? Not that value - but which value?
In the context of type_info_all, you say 'driver-specific columns of information ... start at column index 50 to leave room for expansion'. How do you write an initializer for the gap between the 14 (17?) defined attributes and the index where the driver-specific attributes can start? Or is that a subtle hint not to define driver-specific attributes? I'm looking at the code with lines like:
[ 'INTEGER', SQL_INTEGER, undef, "", "", undef, ... ],
With the first 14 columns defined, there has to be 36 empty columns left unefined, or zeroed, or something; is there a neat notation to do that? 36*undef or something useful? Or do you have to manually go in and add the entries at type_info_all[n][50] = $newval; and repeat ad nauseam?
--
Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED]) #include <disclaimer.h>
Guardian of DBD::Informix 1.04.PC1 -- http://dbi.perl.org/