diff options
| author | Barry Warsaw | 2012-07-26 00:22:19 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-07-26 00:22:19 -0400 |
| commit | 6724d3688f5cf612f722a2d7504eeb50caf8dbe9 (patch) | |
| tree | 5323a0b94824e7353569c4146b3e94f43aad98de /src/mailman/interfaces/database.py | |
| parent | 01415190ab44e69a8f09a6411564a7cb288404e8 (diff) | |
| parent | e08c2d6d9ef6c4e6d78c054cecd5829c5711617e (diff) | |
| download | mailman-6724d3688f5cf612f722a2d7504eeb50caf8dbe9.tar.gz mailman-6724d3688f5cf612f722a2d7504eeb50caf8dbe9.tar.zst mailman-6724d3688f5cf612f722a2d7504eeb50caf8dbe9.zip | |
Diffstat (limited to 'src/mailman/interfaces/database.py')
| -rw-r--r-- | src/mailman/interfaces/database.py | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/mailman/interfaces/database.py b/src/mailman/interfaces/database.py index 040bce77c..1f39daee7 100644 --- a/src/mailman/interfaces/database.py +++ b/src/mailman/interfaces/database.py @@ -23,6 +23,8 @@ __metaclass__ = type __all__ = [ 'DatabaseError', 'IDatabase', + 'IDatabaseFactory', + 'ITemporaryDatabase', ] @@ -49,12 +51,6 @@ class IDatabase(Interface): configuration file setting. """ - def _reset(): - """Reset the database to its pristine state. - - This is only used by the test framework. - """ - def begin(): """Begin the current transaction.""" @@ -66,3 +62,22 @@ class IDatabase(Interface): store = Attribute( """The underlying Storm store on which you can do queries.""") + + + +class ITemporaryDatabase(Interface): + """Marker interface for test suite adaptation.""" + + + +class IDatabaseFactory(Interface): + "Interface for creating new databases.""" + + def create(): + """Return a new `IDatabase`. + + The database will be initialized and all migrations will be loaded. + + :return: A new database. + :rtype: IDatabase + """ |
