HibernateD and DDBC - ORM and DB abstraction layer for D

Robert jfanatiker at gmx.at
Wed Apr 3 15:50:39 PDT 2013


On Wednesday, 3 April 2013 at 17:22:46 UTC, Nick Sabalausky wrote:
> On Wed, 03 Apr 2013 18:54:13 +0200
> "Vadim Lopatin" <coolreader.org at gmail.com> wrote:
>
>> > Sounds cool.
>> >
>> > Can it be used with Vibe.d's system of asynchronous
>> > connections? If not, then perhaps a backend for mysql-native
>> > <https://github.com/rejectedsoftware/mysql-native/> could be 
>> > added?
>> 
>> Actually I'm using mysqln as backend. But I patched it, 
>> removing vibe dependancies. (Vibe connection replaced with 
>> standard one).
>
> Ahh, ok. In that case, I may diff the two and see about making 
> "vibe.d
> connections vs std connections" a configurable choice (with 
> vibe.d
> dependency disableable via -version switch). Then perhaps
> HibernateD/DDBC users and direct mysql-native users can both 
> benefit
> from whichever form they need. Plus that way you wouldn't need 
> to be
> bothered with keeping a separate fork of mysqln in sync.

:-S The better way would be to just depend on a Stream interface
and switch implementations by instantiating different classes. -> 
The used Stream interface would of course need to be factored out 
of vibe, ideally into the standard library.

This would be way more flexible: Users of the library can use 
either implementation without even having to recompile the 
library. No additional runtime cost either.

"-version" should not be used too liberally in my opinion, 
because it is really inflexible, especially when it comes to 
binary/shared libraries.


Best regards,

Robert


More information about the Digitalmars-d-announce mailing list