Patches item #1432078, was opened at 2006-02-15 13:56
Message generated for change (Comment added) made by phd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1432078&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Etienne Posthumus (epoz)
>Assigned to: Oleg Broytmann (phd)
Summary: Add DISTINCT to sqlbuilder.py Select
Initial Comment:
When using SQLBuilder do build database-independent
queries, I would like to do DISTINCT queries.
This already exists in normal SQLObject
ClassName.select, but not in the builder.
This tiny patch adds it.
----------------------------------------------------------------------
>Comment By: Oleg Broytmann (phd)
Date: 2006-02-20 18:05
Message:
Logged In: YES
user_id=4799
First, I would like to ask you to avoid copy/paste
programming. (-: Please refactor your code - there is
duplicate code in 'if' and 'else' branches. I think you can
just conditionally insert "DISTINCT" or '' (an empty string).
Second, I'd like to ask you to add a test. May be create
test_sqlbuilder.py, and test
assert str(Select(...)) = "SELECT..."
Something like this...
Third, it would be very kind of you if you add a few strings
about Select() to docs/SQLBuilder.txt - now when you
understand sqlbuilder and Select().
Thank you in advance!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1432078&group_id=74338
|