4 ms·
1 point by ashimema 0 minutes ago | edit | delete Love DBIx::Class.. but it's not a good/perfect fit for Mojolicious by a long way.. it's blocking by nature an
by ashimema 10y ago
1 point by ashimema 0 minutes ago | edit | delete
Love DBIx::Class.. but it's not a good/perfect fit for Mojolicious by a long way.. it's blocking by nature and thus doesn't play too nicely if your aiming to write a non-blocking mojo app.
reply
- mst 10y agoFor the few queries where you need async (most should be fast enough in the first place), there's no reason you can't use $rs->as_query to get hold of the SQL and bind values and then feed those into Mojo::Pg.
- SwellJoe 10y agoIs there such a thing as a non-blocking SQL query? Doesn't it always have to be wrapped up in something to make it non-blocking? I think my question is: Is there an SQL ORM in any language that is non-blocking during queries, without the programmer having to wrap it in some sort of promise/callback/whatever? I really have no idea about ORMs, so I don't know anything about the state of the art. I'm trying to imagine what such a creature would look like...it seems like if your queries are going to potentially make you wait for any amount of time, you'd need to account for that at the caller side, even if things happen on the ORM side.