Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
With block helper that enables and disables server side cursors.

src/d/j/django-orm-2.0.5/django_orm/cache/query.py   django-orm(Download)
from django_orm.cache.utils import get_cache_key_for_pk, get_cache
from django_orm.cache.exceptions import CacheMissingWarning
from django_orm.postgresql import server_side_cursors
 
CACHE_KEY_PREFIX = getattr(settings, 'ORM_CACHE_KEY_PREFIX', 'orm.cache')
            qs = self.model._orm_manager.no_cache().filter(pk__in=ids)
            if connection.vendor == 'postgresql':
                with server_side_cursors(qs, itersize=10):
                    for obj in qs.iterator():
                        yield obj

src/d/j/django-orm-extensions-3.0b3/django_orm/cache/query_deprecated.py   django-orm-extensions(Download)
from django_orm.cache.utils import get_cache_key_for_pk, get_cache
from django_orm.cache.exceptions import CacheMissingWarning
from django_orm.postgresql import server_side_cursors
 
CACHE_KEY_PREFIX = getattr(settings, 'ORM_CACHE_KEY_PREFIX', 'orm.cache')
            qs = self.model._orm_manager.no_cache().filter(pk__in=ids)
            if connection.vendor == 'postgresql':
                with server_side_cursors(qs, itersize=10):
                    for obj in qs.iterator():
                        yield obj