Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] Expose URL property in BaseDataSource

8 views
Skip to first unread message

Loïc PÉRON

unread,
Mar 11, 2013, 10:23:22 AM3/11/13
to
Hi all,

The attached patch does the following:

- changes visibility of Driver.parseUrl to public static
- changes visibility of BaseDataSource.getUrl to public
- add setUrl to BaseDataSourc based on Driver.parseUrl

Adding this property to all datasources simplifies their set-up by
using the same url/user/pass as with DriverManager.

--
Loïc PÉRON
mailto:loic.peron<at>bigfoot.com
pgjdbc-seturl.patch

Dave Cramer

unread,
Mar 11, 2013, 6:32:05 PM3/11/13
to
Looking at the spec these are not part of the Datasource API ? Or am I mistaken ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


--
Sent via pgsql-jdbc mailing list (pgsql...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc


Loïc PÉRON

unread,
Mar 12, 2013, 7:20:12 AM3/12/13
to
2013/3/11 Dave Cramer <p...@fastcrypt.com>:
> Looking at the spec these are not part of the Datasource API ? Or am I
> mistaken ?

No they are not, but in fact no connection property is mandated by the
spec regarding DataSources.

It is simply a convenient way of configuring the DataSource, similar
to the configuration through DriverManager: url+user+pass

As the URL parsing is already present in Driver, and the URL building
in BaseDataaSource, I just connected url parsing to the BaseDataSource
attributes.

We currently use Oracle, HSQLDB and Postgresql, which is the only one
not exposing a URL property for datasources.

--
Lo�c P�RON
phone:(33) 683 880 177

Loïc PÉRON

unread,
Mar 19, 2013, 6:51:18 PM3/19/13
to
Hi,

Is the patch attached to my initial message
(http://www.postgresql.org/message-id/CAFKiveQyuA+PQ310pV3tLB5y...@mail.gmail.com)
acceptable? Does it need more work?

--
Loïc PÉRON
0 new messages