[std.database]

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Oct 11 14:32:40 PDT 2011


On 10/11/11 4:00 PM, Johann MacDonagh wrote:
> On 10/11/2011 1:57 AM, Piotr Szturmaj wrote:
>> Johann MacDonagh wrote:
>>> Maybe "Database" should be an abstract class rather than an interface?
>>> That's how ADO.net does it:
>>>
>>> http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx
>>>
>>>
>>
>> Why "Database" instead of PGConnection, MySqlConnection,
>> SQLiteConnection, etc. ? And of course base SqlConnection.
>
> No, I agree. The base type should be DbConnection (I dunno,
> SqlConnection is a little too specific, I like DbConnection better),
> extended by PGConnection, MySqlConnection, SqliteConnection, etc...

The database engine should be codified in the connection string, not in 
the type name.

Andrei


More information about the Digitalmars-d mailing list