Am 13.10.2011, 20:16 Uhr, schrieb simendsjo <simend...@gmail.com>:

On 13.10.2011 19:49, bls wrote:
Am 13.10.2011 18:44, schrieb simendsjo:
I was thinking more like
1) etc.c.mysql/pg - c interface
2) std.sql.mysql/pg - d interface using templates, ranges etc
3) Database classes - common interface
4) ORM

Sorry, I don't get it. IMHO 2) and 3) are at the same level.. F.I.
a draft :

http://pastebin.com/n8H0QF8X


2) doesn't hide any features of the database. If the database supports a feature, it's here. 3) is a common interface - will hide the specific database, including features unique for this db.

At any level, you should be able to drop down to the lower levels if necessary.

Of course... 4) could be built directly on 1), 2) or 3). Step 2) isn't really needed as long as you can get internal handles and drop down to 1), but having a clean D interface instead would be nice.

2) would be a thin wrapper around the C API. I think that runs against Phobos' philosophy especially with eventually four layers of abstraction. I'm just saying. Wouldn't mind personally.

Reply via email to