[std.database]

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Oct 9 11:22:43 PDT 2011


On 10/9/11 11:54 AM, Adam Ruppe wrote:
> The way I'd do it is:
>
> interface Database {
>    // support shared functions here, and other stuff useful enough to
>    // warrant emulation
> }
>
> class Postgres : Database {
>    // implement the interface, of course, but also all other postgres
>    // specific stuff
> }
>
>
> When you go to use it, if you're  happy with the basics, declare
> Databases.
>
> If you need something special, use Postgres objects.

Makes sense. JDBC does that, too.

Andrei


More information about the Digitalmars-d mailing list