Thilosophy has asked for the wisdom of the Perl Monks concerning the following question:
I started writing some tests using DBD::Mock, but have hit a problem right at the beginning. My module asks the DBI handle for the database product name using get_info(17) (see the excerpt from the DBI docs below) because it needs to dispatch among different SQL dialects. Unfortunately, DBD::Mock returns nothing.
Can DBD::Mock be made to say what I want for any of the driver info properties? Looking at the docs (and the source) I could not figure out how. And I think it should also say something like "DBD::Mock v0.xy" by default.
From the DBI docs: Because some DBI methods make use of get_info(), drivers are strongly encouraged to support 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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can DBD::Mock mock get_info() ?
by dragonchild (Archbishop) on Apr 08, 2005 at 01:50 UTC | |
by Thilosophy (Curate) on Apr 08, 2005 at 02:28 UTC | |
by dragonchild (Archbishop) on Apr 08, 2005 at 12:16 UTC |