django-db-utils

Software Screenshot:
django-db-utils
Software Details:
Version: 0.1
Upload Date: 11 May 15
Developer: Disqus
Distribution Type: Freeware
Downloads: 5

Rating: nan/5 (Total Votes: 0)

django-db-utils is a Django app that contains utilities for your Django database.

attach_foreignkey

Shortcut method which handles a pythonic LEFT OUTER JOIN.

from dbutils.helpers import attach_foreignkey

qs = list(Model.objects.all())

attach_foreignkey(qs, Model.author)


SkinnyQuerySet

A QuerySet which eliminates the in-memory result cache.

from dbutils.querysets import SkinnyQuerySet

for foo in SkinnyQuerySet(Model):
 print foo


RangeQuerySet

(See also: RangeQuerySetWrapper)

Iterates through a result set using MIN/MAX on primary key and stepping through.

Very efficient, but ORDER BY statements will not work.

from dbutils.querysets import RangeQuerySet

for foo in RangeQuerySet(Model):
 print foo


IterableQuerySetWrapper

Iterates through a QuerySet using limit and offset.

For efficiency use RangeQuerySetWrapper.

from dbutils.querysets import IterableQuerySetWrapper

for foo in IterableQuerySetWrapper(Model.objects.all()):
 print foo

Requirements:

  • Python
  • Django

Other Software of Developer Disqus

Comments to django-db-utils

Comments not found
Add Comment
Turn on images!