make "commit" a no-op
[matthijs/upstream/django-ldapdb.git] / ldapdb / backends / ldap / base.py
index 1b21647ebe97e2a7f64a5299748f08fd98fc8188..85b857fb8fd4d6d7913ebe2bf9a8577928d122d6 100644 (file)
@@ -45,12 +45,14 @@ class DatabaseFeatures(BaseDatabaseFeatures):
         self.connection = connection
 
 class DatabaseOperations(BaseDatabaseOperations):
+    compiler_module = "ldapdb.backends.ldap.compiler"
+
     def quote_name(self, name):
         return name
 
 class DatabaseWrapper(BaseDatabaseWrapper):
-    def __init__(self, settings_dict, alias='ldap'):
-        super(DatabaseWrapper, self).__init__(settings_dict, alias=alias)
+    def __init__(self, *args, **kwargs):
+        super(DatabaseWrapper, self).__init__(*args, **kwargs)
 
         self.charset = "utf-8"
         self.features = DatabaseFeatures(self)
@@ -59,6 +61,9 @@ class DatabaseWrapper(BaseDatabaseWrapper):
     def close(self):
         pass
 
+    def _commit(self):
+        pass
+
     def _cursor(self):
         if self.connection is None:
             self.connection = ldap.initialize(self.settings_dict['NAME'])
@@ -67,6 +72,9 @@ class DatabaseWrapper(BaseDatabaseWrapper):
                 self.settings_dict['PASSWORD'])
         return DatabaseCursor(self.connection)
 
+    def _rollback(self):
+        pass
+
     def add_s(self, dn, modlist):
         cursor = self._cursor()
         return cursor.connection.add_s(dn.encode(self.charset), modlist)