i have made a hack to make the sql/echo look somewhat better -  
level-indented + more line-separations. 
it auto-applies itself over the sqlachemy at runtime.
usage: just import sahack4src

e.g.
SELECT pu_human.address_id AS pu_human_address_id, ....
FROM (SELECT person.address_id AS address_id, ....
FROM human JOIN person ON person.db_id = human.db_id UNION ALL SELECT 
CAST(NULL AS INTEGER) AS address_id, ....
FROM (SELECT human.age AS age, human.name AS name, ....
FROM human 
WHERE human.atype = ?) AS bz4human) AS pu_human 
WHERE pu_human.age > ? AND pu_human.friend_id = pu_human.db_id ORDER 
BY pu_human.oid

becomes:

SELECT pu_human.address_id AS pu_human_address_id, ....
FROM (
    SELECT person.address_id AS address_id, ....
    FROM human JOIN person ON person.db_id = human.db_id 
UNION ALL
 
    SELECT CAST(NULL AS INTEGER) AS address_id, ....
    FROM (
        SELECT human.age AS age, human.name AS name, ....
        FROM human
        WHERE human.atype = ?
    ) AS bz4human
) AS pu_human
WHERE pu_human.age > ? AND pu_human.friend_id = pu_human.db_id
ORDER BY pu_human.oid

=======
Mike, are u interested in making this inside sqlalchemy? 
it's something like 5-10 lines changed. i can prepare a patch..

svil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: hacksrc.py
Description: application/python

Attachment: sahack4echo.py
Description: application/python

Reply via email to