On Sat, Nov 24, 2001 at 10:13:12PM -0500, Thomas A.Lowery wrote:
> 
> I'd like to see some utility methods added to DBI.
> 
> Something that returns an array (or reference) to all the currently
> supported SQL_* data types.

I've just added this to the docs:

    =head2 DBI Constants
     
    Constants representing the values of the SQL standard types can be
    imported individually by name, or all together by importing the
    special C<:sql_types> tag.
     
    The names and values of all the defined SQL standard types can be
    produced like this:
     
      foreach (@{ $DBI::EXPORT_TAGS{sql_types} }) {
        printf "%s=%d\n", $_, &{"DBI::$_"};
      }
     
    These constants are defined by SQL/CLI, ODBC or both.
    C<SQL_BIT> is (currently) omitted, because SQL/CLI and ODBC provide
    conflicting codes.
     
    See the L</type_info>, L</type_info_all>, and L</bind_param> methods
    for possible uses.
     
    Note that just because the DBI defines a named constant for a given
    data type doesn't mean that drivers will support that data type.

> Something that returns a hash (or reference) of SQL_* Name and Value.

For what purpose, exactly?

That might just be an external module that defines a whopping big hash.

> Something that provides a current list of all handler attributes (with
> current values), possible information like valid values, read-only ...

For what purpose, exactly?

The DBI could export a hash keyed by 'standard' (non-driver-private)
attribute name and holding attributes of the attribute (type,
read-only etc). Patches welcome!

Tim.

Reply via email to