Re: viewing generated SQL without running the query

2012-02-23 Thread larry.mart...@gmail.com
On Feb 21, 7:32 pm, diafygi wrote: > There's a previous thread about this[1], but it was closed back in > 2006 without resolution. So I'd like to check back in and see if there > is a way to get a complete query string without executing the query. > > At first, I thought I

Re: viewing generated SQL without running the query

2012-02-23 Thread Kelly Nicholes
Can't you get a queryset, like print MyObject.objects.all().query ? On Feb 21, 7:32 pm, diafygi wrote: > There's a previous thread about this[1], but it was closed back in > 2006 without resolution. So I'd like to check back in and see if there > is a way to get a complete

Re: [re-open] viewing generated SQL without running the query

2012-02-21 Thread Russell Keith-Magee
On 22/02/2012, at 10:32 AM, diafygi wrote: > There's a previous thread about this[1], but it was closed back in > 2006 without resolution. So I'd like to check back in and see if there > is a way to get a complete query string without executing the query. > > At first, I thought I could just

[re-open] viewing generated SQL without running the query

2012-02-21 Thread diafygi
There's a previous thread about this[1], but it was closed back in 2006 without resolution. So I'd like to check back in and see if there is a way to get a complete query string without executing the query. At first, I thought I could just use the QuerySet.query.__str__(), but that does not put

Re: viewing generated SQL without running the query

2006-08-29 Thread Gary Wilson
Malcolm Tredinnick wrote: > On Tue, 2006-08-29 at 03:53 +, Gary Wilson wrote: > > I see that there is a _get_sql_clause() method, but is there a function > > that will return the constructed query string? > > Deja vu. I tried to implement something like this a little while back. > The thing

Re: viewing generated SQL without running the query

2006-08-29 Thread Malcolm Tredinnick
On Tue, 2006-08-29 at 03:53 +, Gary Wilson wrote: > I see that there is a _get_sql_clause() method, but is there a function > that will return the constructed query string? Deja vu. I tried to implement something like this a little while back. The thing that is hard about getting it to work

Re: viewing generated SQL without running the query

2006-08-29 Thread DavidA
Gary Wilson wrote: > I see that there is a _get_sql_clause() method, but is there a function > that will return the constructed query string? You can just do the same construction that's done in django/db/models/query.py: >>> from danet.blog.models import Post, Tag >>> qs =

viewing generated SQL without running the query

2006-08-28 Thread Gary Wilson
I see that there is a _get_sql_clause() method, but is there a function that will return the constructed query string? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,