Re: RFI: Database URIs
Tim Bunce <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.sybase.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Nov 22, 2013 at 05:13:53PM -0800, David E. Wheeler wrote: > DBI Folks & Gisle, > > I want to add support for specifying database connections as URIs to Sqitch, my DB change management system. I started working on it today, following the examples of JDBC and PostgreSQL. Before I release, though, I’d like a bit of feedback on a couple of things. > > First, I'm using the database name as the scheme in the URL. Some examples: > > postgresql://user@localhost:5433/dbname > sqlite:///path/to/foo.db > > This is to make it easy to tell one DB from another. But I'm wondering if I should follow the example of JDBC more closely, and prepend "db:" or something to them. More like DBI DSNs, too. However, it would require a bit more work, as URI.pm does not currently recognize multiple colon-delimited strings as scheme names AFAICT. :-( Why not define a direct translation from a URL to a DBI DSN? A translation that doesn't require knowledge of any driver-specifics. Tim.