django-db-utils

Software screenshot:
django-db-utils
Dettagli del software:
Versione: 0.1
Data di caricamento: 11 May 15
Sviluppatore: Disqus
Licenza: Libero
Popolarità: 5

Rating: nan/5 (Total Votes: 0)

django-db-utils è un app Django che contiene utility per il database Django.
attach_foreignkey
Metodo di scelta rapida che gestisce un LEFT OUTER JOIN divinatorio.
da dbutils.helpers importazione attach_foreignkey
qs = lista (Model.objects.all ())
attach_foreignkey (qs, Model.author)
SkinnyQuerySet
Una QuerySet che elimina la cache risultato in memoria.
da dbutils.querysets importare SkinnyQuerySet
per foo in SkinnyQuerySet (modello):
& Nbsp; pippo stampa
RangeQuerySet
(Vedi anche: RangeQuerySetWrapper)
Scorre un set di risultati utilizzando MIN / MAX sulla chiave primaria e passando attraverso.
Molto efficiente, ma ORDER BY dichiarazioni non funzionerà.
da dbutils.querysets importare RangeQuerySet
per foo in RangeQuerySet (modello):
& Nbsp; pippo stampa
IterableQuerySetWrapper
Scorre un QuerySet con limite e l'offset.
Per l'efficienza utilizzare RangeQuerySetWrapper.
da dbutils.querysets importazione IterableQuerySetWrapper
per foo in IterableQuerySetWrapper (Model.objects.all ()):
& Nbsp; stampa foo

Requisiti

  • Python
  • Django

Altri software di sviluppo Disqus

gargoyle
gargoyle

20 Feb 15

nose-performance
nose-performance

20 Feb 15

postfix-stats
postfix-stats

14 Apr 15

Commenti a django-db-utils

I commenti non trovato
Aggiungi commento
Accendere le immagini!