Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orm? #43

Open
daviswalker opened this issue Jan 17, 2015 · 10 comments
Open

Orm? #43

daviswalker opened this issue Jan 17, 2015 · 10 comments

Comments

@daviswalker
Copy link

Has anyone experimented with different options for an ORM to sit on top of SQLite?

@hamedmohammadi
Copy link

this is far from what you are looking for dude.this repo is created for a practical cross platform solutions that facilitate to create high level library just once for all platforms and reuse code .
so you can use and develop what you want int this environment or look for it some other place .
:) hope my answer help

@skabbes
Copy link
Contributor

skabbes commented Jan 20, 2015

Hey @hamedmohammadi I'm not sure that comment is very helpful, this is a place for people to help each other and experiment and discuss. So, I think actually this is a good place for practical discussions like this.

As far as ORM's go - I don't have any good answers unfortunately. I have a few ideas of my own on architecture for data modeling, but not ORMs. I'd love to hear other opinions on this.

@daviswalker please keep me up to date on anything you find - I'd be curious to hear.

@daviswalker
Copy link
Author

Let me know if there's a better place for this kind of "discussion board" topic than the issues list.

After some searching and experimentation we've started thinking more about a view model interface, in particular a way to deliver update notifications to the right UI at the right time. You've got a simple example here in your user interface example, but when the app gets complicated I imagine there's a need for some real smarts that detects changes to the database, updates the corresponding view models, and delivers those notifications upwards. Is there anything in existence to help with this, I wonder?

In iOS this could be done as a fetched results controller, which you initialize with a query and every time the output of the query changes you get called. For example.

@skabbes
Copy link
Contributor

skabbes commented Jan 23, 2015

Ya, I'm a big fan of the view model way of doing things as well. I've been brainstorming some ideas for observing changes to the database as you suggest. I had some local experimentations that I pushed up here: https://github.com/libmx3/mx3/tree/wip/observe_sqlite

The idea is to have to 2 sqlite connections (but one database) in WAL mode on the same database. Then, by starting a read transaction on one connection, you can fetch the old and new versions, and build a changeset of that transaction, modeled here.

Hopefully this isn't reinventing the wheel, but either way it is a fun little project.

@hamedmohammadi
Copy link

ok @skabbes i intent to help may be it was not the right way . sry 👍

@skabbes
Copy link
Contributor

skabbes commented Jan 24, 2015

@hamedmohammadi No problem, I just think this project is probably even more useful as a discussion forum as it is just raw code.

@tslater
Copy link

tslater commented Jan 26, 2015

Seems to me like a c++ ORM makes the most sense so you can share as much of
your code as possible.
So far hilberlite seems to be the best i've seen...

https://github.com/paulftw/hiberlite

On Sat, Jan 24, 2015 at 11:08 AM, Steven Kabbes [email protected]
wrote:

@hamedmohammadi https://github.com/hamedmohammadi No problem, I just
think this project is probably even more useful as a discussion forum as it
is just raw code.


Reply to this email directly or view it on GitHub
#43 (comment).

@skabbes
Copy link
Contributor

skabbes commented Jan 26, 2015

Hiberlite doesn't seem to be very mature, not very well maintained, not exception safe etc. I dug up a few others, POCO::Data, QxORM, and not an ORM but sqlpp11 but haven't vetted them yet.

However, I am not a huge fan or ORM style db abstractions. Everything that I've worked on more advanced than toy apps are hindered by them, not helped. Does anyone else echo that sentiment?

@ghost
Copy link

ghost commented Jul 27, 2016

Hi @daviswalker , I would recommend SqliteCpp if you still need it. It is not an ORM, but from my experience it is suitable to put it on the top of SQLite.

@etchbee
Copy link

etchbee commented May 28, 2017

@skabbes For ORM kind of interface, take a look at ODB, which is based on sqlite. I have personally used it in my pet project along with djinni and it works well both on iOS as well as android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants