object-relational mappers

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Thu Apr 3 16:06:15 CEST 2008

Luis M. González a écrit :
> I have come to the same conclusion.
> ORMs make easy things easier, but difficult things impossible...

Not my experience with SQLAlchemy. Ok, I still not had an occasion to 
test it against stored procedures, but when it comes to complex queries, 
it did the trick so far - and (warning: front-end developper 
considerations ahead) happened to be much more usable than raw strings 
to dynamically *build* the queries.

> The best approach I've seen so far is webpy's (if we are talking of
> web apps).
> It isn't an ORM, it is just a way to make the database api easier to
> use.
> Queries don't return objects, they return something similar to
> dictionaries, which can be used with dot notation ( for example,
> result.name is equal to result['name'] ).
> A simple select query would be db.select('customers') or
> db.select('customers', name='John').
> But you can also resort to plain sql as follows: db.query('select *
> from customers where name = "John"').
> Simple, effective and doesn't get in your way.

Seems nice too in another way. Is that part independant of the rest of 
the framework ? If so, I'll have to give it a try at least for admin 

More information about the Python-list mailing list