From: jlaine Date: Mon, 11 Apr 2011 09:20:45 +0000 (+0000) Subject: register LDAP compiler X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=2d6433b98c090eae864447b1985465a3ce15805e;p=matthijs%2Fupstream%2Fdjango-ldapdb.git register LDAP compiler git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@1019 e071eeec-0327-468d-9b6a-08194a12b294 --- diff --git a/ldapdb/backends/ldap/base.py b/ldapdb/backends/ldap/base.py index 99b2728..062f5c0 100644 --- a/ldapdb/backends/ldap/base.py +++ b/ldapdb/backends/ldap/base.py @@ -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 diff --git a/ldapdb/backends/ldap/compiler.py b/ldapdb/backends/ldap/compiler.py index a3cde18..69417a5 100644 --- a/ldapdb/backends/ldap/compiler.py +++ b/ldapdb/backends/ldap/compiler.py @@ -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 +