Django

Code

Show
Ignore:
Timestamp:
10/24/08 04:36:22 (3 months ago)
Author:
mtredinnick
Message:

Fixed #9307 -- Added the ability to pickle the Query class used by the Oracle
backend.

This allows Querysets to be cached for Oracle and should provide a model for
adding pickling support to other (external) database backends that need a
custom Query class.

Thanks to Justin Bronn for some assistance with this patch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/models/sql/query.py

    r9251 r9272  
    2828    from sets import Set as set     # Python 2.3 fallback 
    2929 
    30 __all__ = ['Query'
    31  
    32 class Query(object): 
     30__all__ = ['Query', 'BaseQuery'
     31 
     32class BaseQuery(object): 
    3333    """ 
    3434    A single SQL query. 
     
    17581758# default. 
    17591759if connection.features.uses_custom_query_class: 
    1760     Query = connection.ops.query_class(Query) 
     1760    Query = connection.ops.query_class(BaseQuery) 
     1761else: 
     1762    Query = BaseQuery 
    17611763 
    17621764def get_order_dir(field, default='ASC'):