Re: Where is dictfetchall ?

2009-04-10 Thread Malcolm Tredinnick
On Fri, 2009-04-10 at 13:25 -0400, Alex Gaynor wrote: [...] > Take a look at the values() method on a queryset: > http://docs.djangoproject.com/en/dev/ref/models/querysets/#values-fields Since the original poster was explicitly asking about custom SQL situations, this isn't a valid solution. Sure

Re: Where is dictfetchall ?

2009-04-10 Thread Malcolm Tredinnick
On Fri, 2009-04-10 at 10:24 -0700, MS wrote: > Hi Malcolm! > > > > then is there any good (built-in) way > > > to write custom SQL queries wich would return dicts instead of tuples? > > > > You know the order the values will be returned in and you know the names > > of the columns. So you can cr

Re: Where is dictfetchall ?

2009-04-10 Thread Alex Gaynor
On Fri, Apr 10, 2009 at 1:24 PM, MS wrote: > > Hi Malcolm! > > > > then is there any good (built-in) way > > > to write custom SQL queries wich would return dicts instead of tuples? > > > > You know the order the values will be returned in and you know the names > > of the columns. So you can cr

Re: Where is dictfetchall ?

2009-04-10 Thread MS
Hi Malcolm! > >  then is there any good (built-in) way > > to write custom SQL queries wich would return dicts instead of tuples? > > You know the order the values will be returned in and you know the names > of the columns. So you can create an iterator that returns the > dictionary results: > >

Re: Where is dictfetchall ?

2009-04-10 Thread Malcolm Tredinnick
On Fri, 2009-04-10 at 04:50 -0700, MS wrote: [...] > If it's not available any longer Which it isn't. > then is there any good (built-in) way > to write custom SQL queries wich would return dicts instead of tuples? You know the order the values will be returned in and you know the names of the

Where is dictfetchall ?

2009-04-10 Thread MS
Hi All, Who dumped dictfetchall from Django? I can see it used to be there, but I can't find it in 1.0. http://code.djangoproject.com/ticket/2662 http://blog.doughellmann.com/2007/12/using-raw-sql-in-django.html If it's not available any longer then is there any good (built-in) way to write custo