[std.database]

bls bizprac at orange.fr
Mon Oct 10 08:13:58 PDT 2011


Am 10.10.2011 16:07, schrieb Steve Teale:

> interface SQLDBConnection

How do you support different database connection requirements. f.i.
a non default port number
What about special parameters only available on db system xxx ?
MySQL  : protocol etc.
PostGreSQL : loglevel, charSet etc.


// JDBC enables us to use..
String url = "jdbc:postgresql://localhost/test";
Properties props = new Properties();
props.setProperty("user","steve");
props.setProperty("password","teale");
props.setProperty("ssl","true");
Connection conn = DriverManager.getConnection(url, props);

atm I am not sure about the implementation of DriverManager, but I can 
imagine that DriverManager follows the prototype respective the  factory 
pattern.

If you like, have a look at my msg..  std.database design suggestion.
my 2 cents






More information about the Digitalmars-d mailing list