[std.database]
bls
bizprac at orange.fr
Sat Oct 15 15:36:52 PDT 2011
Am 14.10.2011 16:23, schrieb Steve Teale:
> OK, for what it's worth, the compiler generated documentation (well, more
> or less) for my mysqlD effort is now on my web site. The same directory
> also has the source files and a Code::Blocks project for anyone who uses
> the latter.
>
> I added links to these files at the bottom of the doc.
>
> I'll put the stuff on github as soon as I figure out how. The page for
> now is:
>
> http://britseyeview.com/software/mysqld/
Hi Steve,
don't want to be the first one, but heck, after waiting a day ...
LIKE : RowSet
The RowSet implementation is pretty cool. Especially the convenience
implementation. Guess this RowSet implementation will ease D ORM
development.
MISS : MetaData
Without thinking too much about Object Relational Mappers and GUI
Adaptors...
Having Meta information is not a bad thing. In other words NEEDED.
A draft :
string[] GetDataBases()
string[] GetSchemas()
IColumns GetColumns()
string [] GetStoredPredures()
etc...
Why ? - Enable creating a Visual DB Toolkit, ER Designer, D ORM source
code generator....
MISS : Mapping Functionality
Map D types to database types and vice versa
Why ? - See ORM
MISS/WANT LATER : Transaction and stored procedure support
Makes IMHO not too much sense to implement MySQL TTS and Stored proc.
specific code right now.
Why ? Seems to be hard to create a common Interface. (nested
Transactions are not avail. on all systems, just to face one thing)
Nevertheless. A DB without TTS is not worth to be included into std.database
MISS/EXOTIC : Database Events
CallBack Implementation for DB Server triggered events
-----------------------------------------------------------------------
FWIW
Since creating an universal Database Interface has much to do with
abstraction and ergo with OOP patterns...
From an OOP view .. What is needed at Level _Two_ ? (DB classes)
_GoF pattern_ :
The Factory Design pattern -> In order to enable database independent
development.
OR
The Prototype pattern -> smarter than Factory, but this pattern requires
the implementation of ICloneable respective MemberwiseClone
The Observer Pattern ->
Get and transfer DB Server-side Events to interested parties.
What is needed at Level _Three_ ? (Object Relation Mapper)
Enterprise patterns
- The Data Mapper pattern
- The Active Record Pattern (optional)
- The Unit Of Work Pattern
------ UOW Pattern is using the (GoF) Memento Pattern
Random thoughts..
I guess that we will need std.uid ( getGUID() getOID() etc ) and also
std.serialisation -> ( orange library) to make std.database work.
Finally .. as I see the Levels
1 etc.c
2 Database classes - D query language
3 ORM classes
4 GUI Adaptor classes
I hope this comments are useful. will try your MySQL stuff on WIN 7
asap, and (maybe) create a more detailed ORM design within the
following days.. Thanks, Bjoern
More information about the Digitalmars-d
mailing list