Skip to content

Commit 66bcb53

Browse files
committed
Document support for driver names to dbi_dsn.
Only in mssql at this point.
1 parent 9ba2b48 commit 66bcb53

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

lib/URI/db.pm

+6-4
Original file line numberDiff line numberDiff line change
@@ -273,17 +273,19 @@ Returns a L<DBI> DSN appropriate for use in a call to C<< DBI->connect >>. The
273273
attributes will usually be pulled from the URI host name, port, and database
274274
name, as well as the query parameters. If no driver is known for the URI, the
275275
C<dbi:$driver:> part of the DSN will be omitted, in which case you can use the
276-
C<$DBI_DRIVER> environment variable to identify an appropriate driver.
277-
Otherwise, each database URI does its best to create a valid DBI DSN. Some
278-
examples:
276+
C<$DBI_DRIVER> environment variable to identify an appropriate driver. If the
277+
URI supports multiple drivers, pass the name of the one you want to
278+
C<dbi_dsn()>. Currently only URI::myssql supports alternate drivers, ADO,
279+
ODBC, or Sybase. Otherwise, each database URI does its best to create a valid
280+
DBI DSN. Some examples:
279281
280282
| URI | DSN |
281283
|--------------------------------------+--------------------------------------------------|
282284
| db:pg:try | dbi:Pg:dbname=try |
283285
| db:mysql://localhost:33/foo | dbi:mysql:host=localhost;port=33;database=foo |
284286
| db:db2://localhost:33/foo | dbi:DB2:HOSTNAME=localhost;PORT=33;DATABASE=foo |
285287
| db:vertica:dbadmin | dbi:ODBC:DSN=dbadmin |
286-
| db:mssql://foo.com/pubs?Driver=MSSQL | dbi:ODBC:Host=foo.com;Database=pubs;Driver=MSSQL |
288+
| db:mssql://foo.com/pubs?Driver=MSSQL | dbi:ADO:Host=foo.com;Database=pubs;Driver=MSSQL |
287289
288290
=head3 C<dbi_params>
289291

t/pod-spelling.t

+2
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ DSN
1919
Hackor
2020
PostgreSQL
2121
Sqitch
22+
ODBC
23+
Sybase

0 commit comments

Comments
 (0)