Jump to page: 1 2
Thread overview
D need an ORM library!
Aug 20, 2018
binghoo dang
Aug 20, 2018
Jesse Phillips
Aug 20, 2018
Russel Winder
Aug 20, 2018
Matthias Klumpp
Aug 21, 2018
binghoo dang
Aug 21, 2018
Russel Winder
Aug 22, 2018
binghoo dang
Aug 21, 2018
bauss
Aug 22, 2018
binghoo dang
Aug 22, 2018
bauss
Aug 22, 2018
bauss
Aug 22, 2018
Russel Winder
August 20, 2018
hi,

I thinks D need an ORM library for Sqlite/Mysql/PostgreSQL, entity currently support all the three targets, but entity's API is too complex and cumbersome for using.

Is there a more light-weight and simpler implementation like ActiveAndroid ?

Thanks!


---

Binghoo Dang
August 20, 2018
On Monday, 20 August 2018 at 02:30:16 UTC, binghoo dang wrote:
> hi,
>
> I thinks D need an ORM library for Sqlite/Mysql/PostgreSQL, entity currently support all the three targets, but entity's API is too complex and cumbersome for using.
>
> Is there a more light-weight and simpler implementation like ActiveAndroid ?
>
> Thanks!
>
>
> ---
>
> Binghoo Dang

There are a number of things out there, but personally don't know there state or simplicity.

2016 there was a talk: http://dconf.org/2016/talks/nowak.html

But personally I preferred this one: http://dconf.org/2016/talks/smith.html
https://github.com/cruisercoder/dstddb
August 20, 2018
On Mon, 2018-08-20 at 15:58 +0000, Jesse Phillips via Digitalmars-d- learn wrote:
> On Monday, 20 August 2018 at 02:30:16 UTC, binghoo dang wrote:
> > hi,
> > 
> > I thinks D need an ORM library for Sqlite/Mysql/PostgreSQL, entity currently support all the three targets, but entity's API is too complex and cumbersome for using.

Can I suggest that SQLAlchemy is excellent. It has the full on ORM for those that want it, but also an expression language so you do not have to write SQL in strings if you are not using the ORM.

Being able to write Python that generated SQL (Builder pattern) has made working with SQLite almost a joy.

> > Is there a more light-weight and simpler implementation like ActiveAndroid ?
> > 
> > Thanks!
> > 
> > 
> > ---
> > 
> > Binghoo Dang
> 
> There are a number of things out there, but personally don't know there state or simplicity.
> 
> 2016 there was a talk: http://dconf.org/2016/talks/nowak.html
> 
> But personally I preferred this one: http://dconf.org/2016/talks/smith.html https://github.com/cruisercoder/dstddb
-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



August 20, 2018
On Monday, 20 August 2018 at 15:58:37 UTC, Jesse Phillips wrote:
> [...]
>
> There are a number of things out there, but personally don't know there state or simplicity.
>
> 2016 there was a talk: http://dconf.org/2016/talks/nowak.html
>
> But personally I preferred this one: http://dconf.org/2016/talks/smith.html
> https://github.com/cruisercoder/dstddb

This all looks very dead. Is there any project still alive? The only effort that still seems to be actively developed as far as I can see is hunt-entity...

And I agree, SQLAlchemy is pretty great!
August 21, 2018
On Monday, 20 August 2018 at 23:24:04 UTC, Matthias Klumpp wrote:
> On Monday, 20 August 2018 at 15:58:37 UTC, Jesse Phillips wrote:
>> [...]
>>
>> There are a number of things out there, but personally don't know there state or simplicity.
>>
>> 2016 there was a talk: http://dconf.org/2016/talks/nowak.html
>>
>> But personally I preferred this one: http://dconf.org/2016/talks/smith.html
>> https://github.com/cruisercoder/dstddb
>
> This all looks very dead. Is there any project still alive? The only effort that still seems to be actively developed as far as I can see is hunt-entity...
>
> And I agree, SQLAlchemy is pretty great!

yeah, Only entity is likely a living ORM implementation in D. But, it's API is too complicated, and API is not stable from my experience.

SQLAlchemy is very great, and I remember that <GSOC 2018 Ideas> in D wiki has mentioned this, but the status is "Proposed Project Mentors: TBA".
August 21, 2018
On Tue, 2018-08-21 at 01:42 +0000, binghoo dang via Digitalmars-d-learn
wrote:
[…]
> 
> SQLAlchemy is very great, and I remember that <GSOC 2018 Ideas> in D wiki has mentioned this, but the status is "Proposed Project Mentors: TBA".

SQLAlchemy is how SQL building and ORM should be done, in Python. For other programming languages it has to be an inspiration, but not used as a template for an API – different languages encourage different idiomatic solutions to the same problem. I know of a C++11 variant that had the same approach as SQLAlchemy but done in C++1 idiomatic style, but then I stopped using C++. I haven't looked for a Rust version yet, but I am hoping one is there.

If there was a D version of SQLAlchemy, that would be wonderful. Feel free to s/TBA/Russel Winder/

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



August 21, 2018
On Monday, 20 August 2018 at 02:30:16 UTC, binghoo dang wrote:
> hi,
>
> I thinks D need an ORM library for Sqlite/Mysql/PostgreSQL, entity currently support all the three targets, but entity's API is too complex and cumbersome for using.
>
> Is there a more light-weight and simpler implementation like ActiveAndroid ?
>
> Thanks!
>
>
> ---
>
> Binghoo Dang

Currently (When I get time again) working on implementing PostgreSQL and Sqlite support for Diamond.

Mysql and Mssql should work out the box.

https://github.com/DiamondMVC/Diamond

Some examples will come later, unless you use the latest stable version of Diamond then you have examples for MySql, but the implementation changes with the next release.

http://diamondmvc.org/docs/data/#database

I wouldn't call it light-weight like you explain, because it does have the whole framework, but you could technically just strip out the part of compile it with the appropriate flags to exclude the parts you don't need like the webserver.

Else take a look at https://github.com/buggins/hibernated and perhaps https://github.com/buggins/ddbc is enough.
August 22, 2018
On Tuesday, 21 August 2018 at 10:48:30 UTC, bauss wrote:

> Currently (When I get time again) working on implementing PostgreSQL and Sqlite support for Diamond.
>
> Mysql and Mssql should work out the box.
>
> https://github.com/DiamondMVC/Diamond
>
> Some examples will come later, unless you use the latest stable version of Diamond then you have examples for MySql, but the implementation changes with the next release.
>
> http://diamondmvc.org/docs/data/#database
>
> I wouldn't call it light-weight like you explain, because it does have the whole framework, but you could technically just strip out the part of compile it with the appropriate flags to exclude the parts you don't need like the webserver.
>
> Else take a look at https://github.com/buggins/hibernated and perhaps https://github.com/buggins/ddbc is enough.

yeah, Diamond is great, but I think it will be more wonderful if it's database ORM can be separated to a standalone project, that's would be useful for the application that's is not WEB oriented but need an ORM.
August 22, 2018
On Tuesday, 21 August 2018 at 08:22:34 UTC, Russel Winder wrote:

> If there was a D version of SQLAlchemy, that would be wonderful. Feel free to s/TBA/Russel Winder/

Great! there are many people waiting for this! ^_^
August 22, 2018
On Wednesday, 22 August 2018 at 06:14:40 UTC, binghoo dang wrote:
> On Tuesday, 21 August 2018 at 10:48:30 UTC, bauss wrote:
>
>> Currently (When I get time again) working on implementing PostgreSQL and Sqlite support for Diamond.
>>
>> Mysql and Mssql should work out the box.
>>
>> https://github.com/DiamondMVC/Diamond
>>
>> Some examples will come later, unless you use the latest stable version of Diamond then you have examples for MySql, but the implementation changes with the next release.
>>
>> http://diamondmvc.org/docs/data/#database
>>
>> I wouldn't call it light-weight like you explain, because it does have the whole framework, but you could technically just strip out the part of compile it with the appropriate flags to exclude the parts you don't need like the webserver.
>>
>> Else take a look at https://github.com/buggins/hibernated and perhaps https://github.com/buggins/ddbc is enough.
>
> yeah, Diamond is great, but I think it will be more wonderful if it's database ORM can be separated to a standalone project, that's would be useful for the application that's is not WEB oriented but need an ORM.

Diamond works without web though. You can disable all web features and simply just import the modules for the orm etc.

The ORM was used to be standalone, but became a huge dependency, so was just integrated into it.

I would suggest
« First   ‹ Prev
1 2