On Jul 11, 2011, at 5:46 PM, Tarek Ziadé wrote:

> Hello
> 
> We're using with_hint() to add comments to sql queries, but that'll
> be work only with selects.
> 
> I guess I can do a compiler extension to be able to add a /* comment
> */ in my queries, but I was wondering:
> 
> unless I missed something, wouldn't it be useful to have a
> with_comment() method to be able to add a comment to a select, insert
> or update statement ?

It would be useful yes, as well as available on Query as we've had some 
requests for this.   Assuming the format of SQL comments doesn't change much 
across backends, it would be an easy patch (with unit tests of course).

Still unanswered is what commenting would be desirable for INSERT/UPDATE/DELETE 
emitted during a flush, if any.

-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to