register LDAP compiler
authorjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 11 Apr 2011 09:20:45 +0000 (09:20 +0000)
committerjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 11 Apr 2011 09:20:45 +0000 (09:20 +0000)
git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@1019 e071eeec-0327-468d-9b6a-08194a12b294

ldapdb/backends/ldap/base.py
ldapdb/backends/ldap/compiler.py

index 99b2728..062f5c0 100644 (file)
@@ -45,6 +45,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
         self.connection = connection
 
 class DatabaseOperations(BaseDatabaseOperations):
+    compiler_module = "ldapdb.backends.ldap.compiler"
+
     def quote_name(self, name):
         return name
 
index a3cde18..69417a5 100644 (file)
@@ -32,6 +32,8 @@
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
+from django.db.models.sql import compiler
+
 import ldap
 
 class SQLCompiler(object):
@@ -107,3 +109,18 @@ class SQLCompiler(object):
             yield row
             pos += 1
 
+class SQLInsertCompiler(compiler.SQLInsertCompiler, SQLCompiler):
+    pass
+
+class SQLDeleteCompiler(compiler.SQLDeleteCompiler, SQLCompiler):
+    pass
+
+class SQLUpdateCompiler(compiler.SQLUpdateCompiler, SQLCompiler):
+    pass
+
+class SQLAggregateCompiler(compiler.SQLAggregateCompiler, SQLCompiler):
+    pass
+
+class SQLDateCompiler(compiler.SQLDateCompiler, SQLCompiler):
+    pass
+