#13630: DatabaseOperations doesn't have same constructor with SQLITE and 
PostgreSQL
backend
------------------------------------------+---------------------------------
 Reporter:  calexium                      |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.2       
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 Using ''sqlite3'' backend on Django 1.2.1, the '''DatabaseOperations'''
 object is constructed without any parameter (no change from older
 versions).
 Example:

 {{{
 from django.db import backend

 backend.DatabaseOperations().quote_name(my_value)

 }}}

 But using ''postgresql_psycopg2'' backend, the '''DatabaseOperations'''
 constructor need a ''connection'' as parameter :
 Example:

 {{{
 from django.db import backend, connection

 backend.DatabaseOperations(connection).quote_name(my_value)
 }}}

 So this is not possible to have a code working with all backends.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13630>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to