On 7/12/06, Kilian CAVALOTTI <[EMAIL PROTECTED]> wrote:
No. Q objects do not support custom SQL - they are just wrappers that can be used to wrap groups of keyword search parameters ( e.g., article__name__contains='foo') so that they can be combined using logical operations.
If you want custom SQL, you must use extra(), or obtain a cursor and write all the SQL from scratch.
Yours
Russ Magee %-)
Hi all,
I'd like to know if Q objects support custom SQL queries, as used in extra()
function?
No. Q objects do not support custom SQL - they are just wrappers that can be used to wrap groups of keyword search parameters ( e.g., article__name__contains='foo') so that they can be combined using logical operations.
If you want custom SQL, you must use extra(), or obtain a cursor and write all the SQL from scratch.
Yours
Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---