-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please make DBI::Const::GetInfoType and %GetInfoType hash public #65
Comments
I agree with the general need. I've wanted the same myself before. Rather than exporting the hash, and leaving people at risk of typos, I'd prefer a solution that lets code declare the constants that are needed. Something like:
Adding a trivial |
Or those numbers can be contant perl functions (not variables) like for SQL_INTEGER, SQL_DOUBLE which are exported by :sql_types. |
Yes, that would be more consistent. |
So what about |
I don't think that's worth the cost of supporting in the DBI package itself given there there are many values and few would be used. It should be easy enough to add to DBI::Const::GetInfoType though:
by adding an |
Usage |
Anyway, DBI documentation already says to use https://metacpan.org/pod/DBI#get_info
|
@timbunce Are you going to add |
I'd welcome a PR. |
%GetInfoType
hash from theDBI::Const::GetInfoType
package provides mapping from string identifiers to DBI get_info numeric values. But documentation says this package is "new" and "nothing what is written here is guaranteed". Which means that it is not ready for public API usage and for stable applications.Package
DBI::Const::GetInfo::ODBC
is even more strict and its documentation contains: "The API for this module is private and subject to change.". So is not for public usage too.I would really like to use human readable identifiers (e.g.
SQL_DBMS_VER
) instead of magic number 18.So can you please make current API of the
%GetInfoType
hash public and reflect it intoDBI::Const::GetInfoType
documentation?E.g. code:
is more readable as:
The text was updated successfully, but these errors were encountered: