Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

ORM #6

Open
FSX opened this issue Aug 14, 2011 · 9 comments
Open

ORM #6

FSX opened this issue Aug 14, 2011 · 9 comments

Comments

@FSX
Copy link
Owner

FSX commented Aug 14, 2011

Since the blocking-style API is done it's easier to write top-down code.

Maybe Peewee can be adapted so it uses Momoko.

@FSX
Copy link
Owner Author

FSX commented Oct 6, 2011

I'm not sure if it's feasible to adapt or make an ORM for Momoko. Personally I don't like ORMs, because it looks like complex things like joins and relations look even more complex in ORM style. And I probably won't use them if not needed.

I haven't studied how an ORM exactly works, but if it doesn't require an connection and has functions that just generate SQL and return it a client can be made that feeds that SQL into an async query.

Feedback please, if possible. :)

@FSX
Copy link
Owner Author

FSX commented Dec 6, 2011

Ok, I won't need an ORM for myself so I won't do this.

@FSX FSX closed this as completed Dec 6, 2011
@vfasky
Copy link

vfasky commented May 28, 2013

@FSX
Copy link
Owner Author

FSX commented May 29, 2013

I'll study and test it next week. I don't have time this week. :)

@FSX FSX reopened this Jun 13, 2013
@kamelzcs
Copy link
Contributor

I just wondering how do you use momoko? In my view, some sql-generator is necessary, for example, when try to insert a row which has none-options, the hard code sql way will not work.

Very basic featured ORM would still be in need, such as insert,select,update and delete.

Any ideas?

@haizaar
Copy link
Collaborator

haizaar commented Dec 2, 2014

Currently there are no plans to invest in ORM. You can apply Serializer approach - create SQL serialization for you models and then imply momoko.

@kamelzcs
Copy link
Contributor

kamelzcs commented Dec 3, 2014

  1. What do you mean by Serializer approach? Auto sql generator functions?
    I cant find more examples which use Momoko except maigfrga
    But the hardcode way to use Momoko is not flexible enough I think.
  2. Why there is no plan to invest in ORM? Is ORM not practical or not useful for asynchronous libraries such Momoko?
    In my view, ORM roughly equals sql generator + sql execute + object serialization. Momoko seems lies more in the sql execute part.

@haizaar
Copy link
Collaborator

haizaar commented Dec 3, 2014

Yes, I'm saying you can write/use independent sql generator and then use momoko to execute it.

I'm using momoko to execute complex two-page long queries to database and stream back the results. I personally don't have a use for ORM, although I don't undervalue it by any means.

I would happily develop ORM for you if I had a free time, but currently I don't and demand for ORM for momoko is rather low.

You are welcome to send pull requests :)

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

No branches or pull requests

5 participants
@haizaar @FSX @vfasky @kamelzcs and others