On Sat, Jul 20, 2002 at 09:15:18AM -0500, Paul DuBois wrote: > >The uploaded file > > > > DBI_AdvancedTalk_2002.tar.gz > > > >has entered CPAN as > > > > file: $CPAN/authors/id/T/TI/TIMB/DBI_AdvancedTalk_2002.tar.gz > > size: 2492561 bytes > > md5: f89d88150d7156afb25a7b8816f3052b > > > >No action is required on your part > >Request entered by: TIMB (Tim Bunce) > >Request entered on: Fri, 19 Jul 2002 20:50:59 GMT > >Request completed: Fri, 19 Jul 2002 20:52:24 GMT > > > > Virtually Yours, > > Id: paused,v 1.80 2002/03/10 06:40:03 k Exp k > > Thanks for uploading this. > > I was surprised on slide 78 to see a quote_identifier() example > for DBD::mysql, because I've not been able to get that to work. > (Uses " to quote rather than `, which I took to mean that the > default DBI method was being used rather than overridden with > a DBD::mysql-specific method. > > Does it really quote with ` for you with DBD::mysql?
Only if DBD::mysql supports the required get_info types: =item C<get_info> I<NEW> B<Warning:> This method is experimental and may change. $value = $dbh->get_info( $info_type ); Returns information about the implementation, i.e. driver and data source capabilities, restrictions etc. It returns C<undef> for unknown or unimplemented information types. For example: $database_version = $dbh->get_info( 18 ); # SQL_DBMS_VER $max_select_tables = $dbh->get_info( 106 ); # SQL_MAXIMUM_TABLES_IN_SELECT See L</"Standards Reference Information"> for more detailed information about the information types and their meanings and possible return values. The DBI curently doesn't provide a name to number mapping for the information type codes or the results. Applications are expected to use the integer values directly, with the name in a comment, or define their own named values using something like the L<constant> pragma. Because some DBI methods make use of get_info(), drivers are strongly encouraged to support I<at least> the following very minimal set of information types to ensure the DBI itself works properly: Type Name Example A Example B ---- -------------------------- ------------ ------------ 17 SQL_DBMS_NAME 'ACCESS' 'Oracle' 18 SQL_DBMS_VER '03.50.0000' '08.01.0721' 29 SQL_IDENTIFIER_QUOTE_CHAR '`' '"' 41 SQL_CATALOG_NAME_SEPARATOR '.' '@' 114 SQL_CATALOG_LOCATION 1 2 =cut At some point in the future I'll probably be defining a minimum level of API compliance for DBI drivers. get_info will be required. The DBI::DBD module contains information on how to implement get_info for a driver. It's nearly trivial for databases that have good ODBC drivers available: perl -MDBI::DBD -e write_getinfo_pm dbi:ODBC:foo_db username password > DBD/<foo>/GetInfo.pm Tim.
