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 99b27285ca37e792d9e7bca094922cef8ba7827a..062f5c0ff0635207f33d9c982715dae4ea71e683 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 a3cde180ba0d3649ac6ffa9e6992168e35219ea7..69417a5ef6cbd0c5e32423e93cc5732adb77bbca 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
+